I would like to display certain products with prices and a add to shopping cart button, BUT for some items I would like not to have a price or a add to shopping cart button but still have the product image and description be displayed. Is that possible?
Latest News: (loading..)
3 replies to this topic
#1
Posted 05 February 2012, 05:55
#2
Posted 05 February 2012, 16:36
Yes. You need to set up some sort of logic (in admin/categories.php maybe) to differerentiate between a product that has price/buy or not.
Then, where ever a button or price is found, remove based on that logic.
Something probably already exists for that, if you search the add-ons area, you might strike lucky.
Then, where ever a button or price is found, remove based on that logic.
Something probably already exists for that, if you search the add-ons area, you might strike lucky.
The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...
Support is commercially available. The question is whether you value your business
highly enough to spend money on it.
For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/
Support is commercially available. The question is whether you value your business
highly enough to spend money on it.
For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/
#3
Posted 05 February 2012, 17:53
Robert Baran, on 05 February 2012, 05:55, said:
I would like to display certain products with prices and a add to shopping cart button, BUT for some items I would like not to have a price or a add to shopping cart button but still have the product image and description be displayed. Is that possible?
Recommended SEO Addons:
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#4
Posted 24 February 2012, 18:02
All I did to remove the buy now button and the price was change the price to 0 for the item and changed the following code in the product_info.php file.
change:
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
}
else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }
To This:
if ($product_info['products_price']==0){
echo ' ';
}
else{
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
}
else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }}
And Change This:
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
To this:
<div class="buttonSet">
<?php
if($product_info['products_price']==0){
echo ' ';
}
else{
?>
<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
<?php
}
?>
change:
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
}
else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }
To This:
if ($product_info['products_price']==0){
echo ' ';
}
else{
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
}
else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }}
And Change This:
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
To this:
<div class="buttonSet">
<?php
if($product_info['products_price']==0){
echo ' ';
}
else{
?>
<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
<?php
}
?>














