Community Add-Ons
| Maintainers: | Sid04 |
Buy/Add button removal if quantity = 0(for SPPC w/ Column Product Listing)
for osCommerce Online Merchant v2.2
A simple way to remove the "add to cart" and "buy now" buttons from cart if quantity is 0. This allows you to leave the product info and pricing displayed yet not allow the item to be purchased.
Also displays chosen text(EX: Out of Stock) in place of buttons(set in english.php).
This contribution is for use with SPPC 4.1.1( http://www.oscommerce.com/community/contributions,716 ) AND Column Product Listing(for SPPC)( http://www.oscommerce.com/community/contributions,3007 ). If you dont have both installed some of the lines below will be different...although not hard to change to suite your needs.
I recommend installing "Quick Price Updates for SPPC"( http://www.oscommerce.com/community/contributions,3798 ) if you havn't already. This will allow you to quickly change all your quantity values for products if you want to remove the buy/add options for a large numbers of products at one time for whatever reason(EX: for seasonal items that you wish customers to still be able to read about).
Buy/Add button removal V1.1
Corrected a minor error in products_new.php
This:
[CODE]
<((>--REPLACE WITH--<))>
<?php if ($products_new[$x]['products_quantity'] > 0 ) { ?>
[/CODE]
Should be:
[CODE]
<((>--REPLACE WITH--<))>
<?php if ($products_new['products_quantity'] > 0 ) { ?>
[/CODE]
Attached: Full Installation Package
