http://forum.opencart.com/viewtopic.php?f=131&t=27693
What i want to change is the mode of display. I want for the products with 0 quantity to show Out of stock and for the product with quantity bigger then 50 to display on demand. The part with out of stock is working but when i put the condition bigger than 50 it still display the normal button. Any ideea how i need to modified?
Code: Select all
<file name="catalog/view/theme/*/template/product/product.tpl">
<operation><!-- v15x -->
<search position="replace"><![CDATA[
<a id="button-cart" class="button"><span><?php echo $button_cart; ?></span></a>
]]></search>
<add trim="true"><![CDATA[
<?php if (!$product_info['quantity'] > 0) { ?>
<a onclick="return;" class="button"><span><?php echo $this->language->get('button_out_of_stock'); ?></span></a><br />
<?php } elseif (!$product_info['quantity'] > 50) { ?>
<a id="button-cart" class="button"><span>On Demand/span></a><br />
<?php } else {?>
<a id="button-cart" class="button"><span><?php echo $button_cart; ?></span></a><br />
<?php } ?>
]]></add>
</operation>
</file>