Hi gjh42,
Thank you for your reply, I have checked both TEXT_PRODUCT_QUANTITY values in the PHP files mentioned and they are identical?
Thanks again.
Steve
Hi gjh42,
Thank you for your reply, I have checked both TEXT_PRODUCT_QUANTITY values in the PHP files mentioned and they are identical?
Thanks again.
Steve
Then something is very peculiar... let's see your site and see if that gives any clues. Also, exactly what is the code you have in the vicinity of that constant name, in various files? (Give a couple lines before & after for context.)
DrByte many thanks for this. It workd perfectly for me. If I wanted to modify this to show the the number of units in stock when the item is in stock and display Out of Stock when not in stock what would I need to do to the above code?
Many thank in advance for your help.
Heres how i added an image: Copied image from source paseted it in product info.php
I managed to work it out. This works fine. Now shows number of items in stock (if items in stock) and displays On order, contact us for ETA (if out of stock).
includes -> templates -> tpl_product_info_display.php
PHP Code:
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity > 0 ? $products_quantity . TEXT_PRODUCT_QUANTITY : TEXT_PRODUCT_NOT_IN_STOCK) . '</li>' : '') . "\n"; ?>
includes -> languages -> english -> product_info.php
found this line of code
define('TEXT_PRODUCT_QUANTITY', ' Units in Stock');
and added this line below it:
PHP Code:
define('TEXT_PRODUCT_NOT_IN_STOCK', ' On order, contact us for ETA');
Last edited by Liamv; 31 Oct 2013 at 10:59 PM.
Now I would like to modify this so that I can have a different message from "On order, contact us for ETA" for products supplied by different manufacturers.
Anyone got any clues how I might achieve this?
Would all products of any one manufacturer have the same message? Or is it more complicated than that? How many different messages would you want?
Gjh42, I am having the same issues that Tinderbox was having in August 2013 and I am using the same template (yorkshire clean) that they were using. Basically, I am entering in the code to the two files as previously suggested but nothing appears to happen. No errors, no changes, etc... I am assuming this has something to do with the template but am not sure how to fix it. The site is: www.dancingferret.com/isotank/
Here is some of the code from the tpl_product_info_display.php file.
Code:<!--eof Add to Cart Box--> </div> </div> <br class="clearBoth" /> <hr id="product-divider" /> <!--bof Product details list --> <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?> <ul id="productDetailsList" class="floatingBox back"> <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?> </ul> <br class="clearBoth" /> <?php } ?> <!--eof Product details list -->
Any thoughts?
-Joe
Which copy of the file are you editing? (file/folder path) Are you sure the edited copy is actually saved on the server?
This is the original code:What custom code are you using? Post your code with a few lines before and after for context.PHP Code:
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
Hi, the file/folder path is
/includes/templates/yorkshire_clean/templates/tpl_product_info_display.php
Here is the section of code as it appears in the above file:
PHP Code:
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
Bookmarks