Skip to main content

PHP in Product Description

13 years 11 months ago - 13 years 11 months ago #80120 by JosephTheLee
Hello,

I apologize if this has been covered before (searching the forums for anything with PHP in the terms produces overwhelming results, obviously).

Anyway, I'm interested in using PHP in the product description field. Unfortunately, it seems to be commented out on the front end. Is there a way for me to allow PHP in that field?

Or, more direct to my current application--is there a good way to have information in the product description field populated from a database?

Here's a link to one of the products on my store: wizardsnorman.com/index.php/component/hi.../category_pathway-22

The bolded fields (eg., Rarity) will be the same across all of that type of product; I would like to have the variable information (eg., Common) be filled in dynamically.

Any advice would be appreciated.

Best wishes,
Joseph
Last edit: 13 years 11 months ago by JosephTheLee.

Please Log in or Create an account to join the conversation.

13 years 11 months ago #80124 by Jerome
Replied by Jerome on topic PHP in Product Description
Hi,

The product description is stored in the database, that's why it's not possible to store PHP into (or execute php from it).
I think that the best solution would be to use custom field and you could insert your PHP directly in the product view ("product | show_default").
You can use the plugin system (and plugin triggers) in order to catch some events and fill/save your variables in the database or process them during the loading.

Best regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: JosephTheLee

Please Log in or Create an account to join the conversation.

13 years 10 months ago #80277 by JosephTheLee
Excellent recommendations. Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum