Oba-san
- Join Date:
- Sep 2003
- Location:
- Ohio
- Posts:
- 62,757
- Plugin Contributions:
- 1
Displaying Sold Out Image in place of Add to Cart
I do not know the variable in your code for the products_id, but find that and replace $your_products_id with it ...
Something like this may work for you:
<p class="desc"> <?php echo ($list_box_contents[$row][1]['text']); ?>
<?php
if (zen_get_products_stock($your_products_id) > 0) {
?>
<p class="submit">
<input type="button" class="add2cart medium_button" onclick="window.location.href='<?php echo ($list_box_contents[$row][1]['link'])."&action=buy_now"; ?>';" value="Add to Cart"/>
</p>
<?php
} else {
?>
<p class="desc">Out of Stock</p>
<?php
}
?>
</div>
</div>
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!