starfox221 Posted June 12, 2010 Posted June 12, 2010 Basically, the situation that I have is that I have products that have prices (of course), but then my store also offers products that require you to request a quote, so in those situations, I'd rather not display a price. I have tried entering nothing in the price field when adding a product, but I am trying to figure out a solution to circumvent it defaulting to $0.00. Is there a way to do this? Maybe Database side? Also, how to achieve this on shipping, as well? If either is at all possible.
Guest Posted June 15, 2010 Posted June 15, 2010 Have you looked at this ? http://addons.oscommerce.com/info/6675 Chris
FIMBLE Posted June 15, 2010 Posted June 15, 2010 The quote system is really for custom quotes not really products, the way it works is only the customer and store owner can see the quote so its not really for this. The easy way i would suggest would be to make a slight change to your currency class. From catalog / includes / classes / currencies.php Line 72 & 73 find function display_price($products_price, $products_tax, $quantity = 1) { return $this->format($this->calculate_price($products_price, $products_tax, $quantity)); } and change it to function display_price($products_price, $products_tax, $quantity = 1) { if ($products_price > 0.01) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); }else{ return 'Contact us for a quote'; } } Set your prices for the quote to 0.00 as you were doing, then instead of a price it will display the message, this will effect every price call on the store side. You could then go one step further and replace the buy now buttons with a contact us one. Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
starfox221 Posted June 16, 2010 Author Posted June 16, 2010 The quote system is really for custom quotes not really products, the way it works is only the customer and store owner can see the quote so its not really for this. The easy way i would suggest would be to make a slight change to your currency class. From catalog / includes / classes / currencies.php Line 72 & 73 find function display_price($products_price, $products_tax, $quantity = 1) { return $this->format($this->calculate_price($products_price, $products_tax, $quantity)); } and change it to function display_price($products_price, $products_tax, $quantity = 1) { if ($products_price > 0.01) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); }else{ return 'Contact us for a quote'; } } Set your prices for the quote to 0.00 as you were doing, then instead of a price it will display the message, this will effect every price call on the store side. You could then go one step further and replace the buy now buttons with a contact us one. That actually worked perfectly. When you say you could "replace" the buttons, do you mean store wide or just on those particular products? I'd rather have it just on those products, and actually, if it just removed the buy now button, that would work even better. I have built in contact forms of each of the product pages. Thanks so much for your help.
FIMBLE Posted June 16, 2010 Posted June 16, 2010 a simple if statement will do that if the product price is 0 then dont show the button Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
FIMBLE Posted June 16, 2010 Posted June 16, 2010 To do that open product_info.php and find around line 213 <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> Change it to <?php if ($product_info['products_price'] >0){ ?> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> <?php } ?> This will only show the add to cart button if the price is higher than 0.00 Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
loneparot Posted June 23, 2010 Posted June 23, 2010 thanks.. it works fimble.. how about the price... what to do so the 0.00 price will not show? thanks and take care
loneparot Posted June 25, 2010 Posted June 25, 2010 thanks. sorted.. but if i click review the "add to cart button" appears again thanks and take care
Recommended Posts
Archived
This topic is now archived and is closed to further replies.