In the product description, is there a way to use some sort of include statement to call a file. Much like you can with SSI's so I can update the one file and then have all the products with that include state updated.
In the product description, is there a way to use some sort of include statement to call a file. Much like you can with SSI's so I can update the one file and then have all the products with that include state updated.
The product description that you enter into the database can include HTML but not PHP. However, you could always modify tpl_product_info_display.php (perhaps conditionally on product id if that's what you need) to do an inclusion. What exactly are you trying to do?
Scott
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.
Many of the products we sell are gifts. As each holiday approached during the year, we post to deadline to guarantee delivery by that holiday. With over 100 products, that's a lot of changes. I'd like to have those few lines of text work just like an SSI so I can change, or even remove, the deadline info during the year.
OK - then you should follow the example provided here:
http://www.thatsoftwareguy.com/zenca...scription.html
Define PHP constants for the strings you want to use (ORDER_DEADLINE, etc.)
Reference these constants in your description
Update the values of the constants seasonally
Good luck,
Scott
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.
Scott,
Thanks for the suggestion. It looks like all stuff I can do and I'll give it try. But I'd love to hear a simpler way to do it.
Simpler (but less flexible) would be to just modify tpl_product_info_display.php to say
"Order by Dec 1 for Christmas Delivery"
and then change this before Easter, Thanksgiving, or whatever holidays your
clients are likely to buy for. This is just one change in one place.
Good luck,
Scott
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.
Scott,
Can you please tell the php code for modifying the tpl_product_info_display.php,
conditionally on a product ID.
Here is what I want to accomplish:
Edit the tpl_product_info_display.php to call a specific html file, based on the product ID.
Example:
This is a workaround for php include not being allowed in product description.PHP Code:If product ID 1 then ?php include("/includes/folder1/product_description_1.html"); ?>
else, continue checking
Best,
Vova
Last edited by reznikvova; 29 Jan 2008 at 04:53 PM.