is this possible?
i've looked around and can't find anything about it.
i'm on 1.5.4
thanks
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:
3. ADD AFTER:
4. Open file product.tpl in catalog/view/theme/default/template/product/product.tpl
5. FIND:
6. REPLACE WITH:
Hope that is work fine.
1. Open file product.php in catalog/controller/product/product.php
2. FIND:
Code: Select all
$this->data['points'] = $product_info['points'];
Code: Select all
$this->data['quantity'] = $product_info['quantity'];
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; ?>" />
<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
</div>
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; ?>" />
<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 } ?>
Who is online
Users browsing this forum: Google [Bot] and 93 guests