I have to add php-code into the product description. Not on all products, only some. It seems zen-cart is ignoring anything between the php-tags. Is there a way to do it?
I have to add php-code into the product description. Not on all products, only some. It seems zen-cart is ignoring anything between the php-tags. Is there a way to do it?
php code cannot be embedded into product descriptions, as this data is housed in the database and is parsed AFTER the php code in the core files has done its job of assembling the page.
What are you trying to achieve? Maybe there's another way?
20 years a Zencart User
I want to make a box under some products which recommends related products (like "if you got this pink shirt, we recommend these yellow socks").
I would have written a php class which receives the product id and then searches the relating data from the DB.
Of course it can be done just by html, but it takes much more time to input image src, href etc.
Scott Wilson (swguy) has done this for you... he has written a number of modules that enable up-sell and cross-sell. Look at the Marketing section of the Free Add-ons (link above).
20 years a Zencart User
Thanks, schoolboy.
And thank you Scott Wilson.
You're welcome. :)
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.