Post by nefram » Wed Dec 21, 2011 3:13 am

Hello everyone. I need some help with an VQmod script that i try to change. The script was made by Qphoria
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>

Newbie

Posts

Joined
Fri Mar 18, 2011 2:19 am
Who is online

Users browsing this forum: No registered users and 3 guests