PHP in Product Description

  • Posts: 2
  • Thank you received: 0
11 years 11 months ago #80120

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: 11 years 11 months ago by JosephTheLee.

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 11 months ago #80124

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: JosephTheLee

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

  • Posts: 2
  • Thank you received: 0
11 years 11 months ago #80277

Excellent recommendations. Thanks!

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

Time to create page: 0.063 seconds
Powered by Kunena Forum