Jump to content


Corporate Sponsors


Latest News: (loading..)

Possible to post product with no prices?

price

3 replies to this topic

#1 Robert Baran

  • Community Member
  • 3 posts

Posted 05 February 2012, 05:55

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?

#2 burt

  • Community Sponsor
  • 6,975 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

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.
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/

#3 Jack_mcs

  • Community Member
  • 24,454 posts
  • Real Name:Jack
  • Gender:Male

Posted 05 February 2012, 17:53

View PostRobert 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?
I think the "call for price" contribution will do what you want.

#4 gimmiecpt

  • Community Member
  • 4 posts
  • Real Name:Adam

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
}
?>