Forums / Templates, Stylesheets, Page Layout / Show Stock by Attributes info under product details

Show Stock by Attributes info under product details

Locked

Started by eagleye on 17 Jul 2008, 3:17 PM · Views: 991

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
17 Jul 2008, 3:17 PM
#1
eagleye avatar

eagleye

New Zenner

Join Date:
Jul 2008
Location:
Canada
Posts:
8
Plugin Contributions:
0

Show Stock by Attributes info under product details

So I already added this to product_info.php:

define('TEXT_STOCK_ATTRIBUTE', 'Available Sizes: ');

Then I modified the tpl_product_info_display.php like this:

<!--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_products_with_attributes_stock == 1 and $stock_attributes !=0) 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_products_with_attributes_stock == 1 and $stock_attributes !=0) ? '<li>' . TEXT_STOCK_ATTRIBUTE .  $stock_attributes . '</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 -->

So the result should be this:

  • Model: DCS-AB150
  • Shipping Weight: 0.89kgs
  • 5 Units in Stock
    * Available sizes: 3 small & 2 medium

But is not working

What am I doing wrong?... am I missing a step or something like that?

Thanks in advance

**Eagleye Printing, Design & Web Development**

"An eye for design, an eye for detail"