Contributions
Hide Price if $0
This contribution is intended to hide the price and purchase button from the catalog if no price has been entered, instead of showing a price of $0.00.
This may be of use if you want some items to be informational items only, such as services or to use your shop as a catalog only.
This contribution contains both the files that can be dropped in on a clean copy of OSC2.2M2 as well as instructions for manually applying this contribution for those who have already tinkered with the original files.
Expand All / Collapse All
I found it needed to include this instruction also for this contribution, in product_listing.php find this
section of code:
----------------------------------------
if (PRODUCT_LIST_PRICE > 0) {
if (tep_not_null($listing['specials_new_products_price'])) {
$lc_text .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
} else {
$lc_text .= ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
}
}
----------------------------------------
and change it to this:
----------------------------------------
if (PRODUCT_LIST_PRICE > 0) {
if (tep_not_null($listing['specials_new_products_price'])) {
$lc_text .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
} else {
}
}
----------------------------------------
This will prevent the price from showing as $0.00 when you click on a main categorie or similar, this removes
the price from showing at all for any product until you go to the products page. I hope this is helpful!
The attatched download is just exactly these instructions so no need to open it really.
Sorry, there was some minor errors, corrected here ;)
Added option in categories to select whether each one will use the shopping cart or not.
If NOT using, display a button named "contact us" with a link to the Contact form.
This is the fix for step 4 so that the buy now button link works correctly! This is a great contribution! Thanks to everyone.
This is an update to the great contribution by (Islander2u) Eric Montgomey, I have added an alternate step 7 to the instructions to make this compatible with the Random New Products Contrib.
Minor update with a few extra notes and files included.
It had been pointed out to me that two files had been overlooked in my prior release. These are now included.
Enjoy
This contribution is intended to hide the price and purchase button from the catalog if no price has been entered, instead of showing a price of $0.00.
This may be of use if you want some items to be informational items only, such as services or to use your shop as a catalog only.
This contribution contains both the files that can be dropped in on a clean copy of OSC2.2M2 as well as instructions for manually applying this contribution for those who have already tinkered with the original files.
Note: Contributions are used at own risk.