@version $Id: tpl_product_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
The latest revision of this file was in 2006, and it reportedly worked perfectly on someone's site in 2008.
@version $Id: tpl_product_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
The latest revision of this file was in 2006, and it reportedly worked perfectly on someone's site in 2008.
This worked perfectly for me on 1.3.8.a.
Any clues on the limited stock code? That would be great if possible.
There is another thread where people have worked out the code for red/yellow/green light markers on products, using tests for stock level.
This seems like a very straight forward mod, but every time I try it it breaks my site.
In my includes/templates/mytemplate/tpl_product_info_display.php I have changed the line:
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
to
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity > 0 ? TEXT_PRODUCT_IN_STOCK : TEXT_PRODUCT_NOT_IN_STOCK) . '</li>' : '') . "\n"; ?>
and in my includes/languages/english/mytemplate/product_info.php file under the line:
define('TEXT_PRODUCT_QUANTITY', ' Units in Stock');
I have added
define('TEXT_PRODUCT_IN_STOCK', 'In Stock');
define('TEXT_PRODUCT_NOT_IN_STOCK', 'Out of Stock');
Now when I view a product all I see is the header, and column 1 (on the left). It seems to have broken the main column, column 2 (on the right) and the footer.
I am running zencart 1.39d, with simple SEO URLs, Imagehandler and Zen Light Box.
I really want this mod, and it seems so basic to apply, it's very frustrating. Any help would be greatly appreciated!
Is this the first mod you have tried to do? How are you making the edits? What you posted looks right, but what really matters is what the file on your server looks like. Can we see your site to look at the error directly?
Thanks for the speedy replies!
I installed simple SEO URL's myself which was considerably more involved than this mod to install and I have done all the customizations to my site myself. I've been using notepad++ and filezilla to ftp the edited files. My site isn't functional yet so I'll upload the edited tpl_product_info_display.php and product_info.php and you can see the error for yourself. My site is Nintendoparts.com.au.
,
I directly copied and pasted this line, same thing.... header, and column 1, but no main column, no column2 and no footer on product pages.
Thanks for the help.
I checked the latest MyDEBUG file. It says:
[24-Jul-2010 04:05:31] PHP Parse error: syntax error, unexpected T_REQUIRE in /public_html/includes/templates/mytemplate/templates/tpl_product_info_display.php on line 1
I had a look at line 1 in the edited tpl_product_info_display.php it has a " <?php " (without the quotes) just like the original tpl_product_info_display.php file. I haven't made any changes near line 1, the code I've been replacing is located on line 241. Any ideas?
Thanks again for all your help with this.
Bookmarks