Post by average_joe » Mon Sep 10, 2012 6:25 am

is this possible?
i've looked around and can't find anything about it.

i'm on 1.5.4

thanks

New member

Posts

Joined
Sat Sep 03, 2011 1:47 pm

Post by nosecret » Mon Sep 10, 2012 10:55 am

This method replace quantity and add to cart button with text sold out if product quantity <= 0. This method below using default theme. Backup your file first to safety.
1. Open file product.php in catalog/controller/product/product.php
2. FIND:

Code: Select all

$this->data['points'] = $product_info['points'];
3. ADD AFTER:

Code: Select all

$this->data['quantity'] = $product_info['quantity'];
4. Open file product.tpl in catalog/view/theme/default/template/product/product.tpl
5. FIND:

Code: Select all

        <div><?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          &nbsp;
          <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
        </div>
6. REPLACE WITH:

Code: Select all

<?php if ($quantity > 0) { ?>
        <div><?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          &nbsp;
          <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
        </div>
		<?php } else { ?>
		<div><span style="font-weight: bold; color:red;">Sold Out!</span></div>
		<?php } ?>
Hope that is work fine.

Active Member

Posts

Joined
Tue Dec 28, 2010 12:28 pm

Post by average_joe » Mon Sep 10, 2012 11:40 am

thank you very much. works great!

New member

Posts

Joined
Sat Sep 03, 2011 1:47 pm

Post by matte2k » Sat Sep 15, 2012 1:20 am

Does this work with 1.5.1.3?
Is it possible to wrap thin in to an vqmod?
That would be awsome!!

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm
Who is online

Users browsing this forum: Google [Bot] and 93 guests