That is just the stock quantity code, not the customized code.
You need to use some code similar to post 53 or post 55 to get the behavior you want.
That is just the stock quantity code, not the customized code.
You need to use some code similar to post 53 or post 55 to get the behavior you want.
Right, I have made the changes but still see the same results. The site is currently up with the changes listed in post #53.
/includes/templates/yorkshire_clean/templates/tpl_product_info_display.php
includes -> languages -> english -> product_info.phpPHP Code:
<!--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 > 0 ? TEXT_PRODUCT_IN_STOCK : TEXT_PRODUCT_NOT_IN_STOCK) . '</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" />
Any idea what might be happening here?PHP Code:
define('TEXT_PRODUCT_WEIGHT', 'Shipping Weight: ');
define('TEXT_PRODUCT_QUANTITY', ' Units in Stock');
define('TEXT_PRODUCT_IN_STOCK', 'In Stock');
define('TEXT_PRODUCT_NOT_IN_STOCK', 'Out of Stock');
define('TEXT_PRODUCT_MODEL', 'Model: ');
-Joe
Any suggestions on what I can do about the above issue?
Joe
And you are certain the changed code is in the right file on the server? What are you getting? Only "in stock", only "out of stock", or nothing? Can you point to a product where this is happening? All of the categories I have looked in were empty. A product that is in stock and one that is out of stock would be best.
Yeah, I am pretty sure. I even tried editing the "/includes/templates/template_default/templates/tpl_product_info_display.php" file but didn't see a change. Here is a link to the site showing you how the info is currently displayed with the changes to the two files:
http://www.dancingferret.com/isotank...a282b40ff874f4
I did post a message about this on the Yorkshire Clean support thread and received a response saying it was a problem with my "customization" and not related to the template.
I am pretty new at this and have been able to fuddle through most of the other aspects of the Zen Cart system but this really has me stumped.
-Joe
Never edit the /template_default/ version of a file. If you have a copy of the file in your currently active template folder, the default version will never be used so editing it is pointless.
I see in the page source that the product details code is not outputting anything at all. What do you have for admin > Catalog > Product Types > Product-General > edit layout > Show Quantity in Stock?
Strangely, I had it set to 0 (false) although the quantities were still listed. I switched it over to 1 (true) and the same quantity info is still displaying.
Joe
Anyone have any thoughts on a fix for my issue? I am almost ready to make the site live but this issue is holding me back.
Joe
would like to know how to modify the mentioned modified code to also check for low stock and show my define
> 3-? In Stock
< 0 Special Ordered
< 1-3 Low Stock, Order today
This is what i did.
did the same to listingCode:<?php echo (($flag_show_product_info_quantity == 1 and $products_quantity > 3) ? '<li>' . TEXT_PRODUCT_IN_STOCK . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity <= 0) ? '<li>' . TEXT_PRODUCT_NOT_IN_STOCK . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity == 3) ? '<li>' . TEXT_PRODUCT_LOW_STOCK . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity == 2) ? '<li>' . TEXT_PRODUCT_LOW_STOCK . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity == 1) ? '<li>' . TEXT_PRODUCT_LOW_STOCK . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
not very pretty but it works
Bookmarks