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.
That is much simpler and would almost work. But due to varying production times, the deadline will vary by product. Is there a way to modify tpl_product_info_display.php to call a file like SSI (I assume not) or to link a single file with all the deadline details?
The PHP Include function does the same thing. Something like
<?php
include($template->get_template_dir('/tpl_dates.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_dates.php');
?>
where tpl_dates (in your templates folder) has an echo statement
displaying what you want.
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.
Okay, good. Is there anyway to just add the include statement into the product description file directly?
You have to edit tpl_product_info_display.php and put in the include statement I gave you (after of course creating your file tpl_dates.php).
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.