$0 price should show "Call Us"

I saw some older threads where if you set the product price to zero the front-end would display a call us for pricing label.



I can’t find this in v2 :frowning:

[quote name=‘Dave the Slave’]I saw some older threads where if you set the product price to zero the front-end would display a call us for pricing label.



I can’t find this in v2 :([/QUOTE]





Content->Languages

Not sure what “Content->Languages” means or how a language setting would automatically display “Call Us for pricing” if an item price is set to zero.

I think I understand now - you thought I wanted to change what text was displayed. Nope.



Right now if a product price is set to zero, no price, nothing but Add to Wishlist appears. I don’t want that - I want it to read something like “Call for a Quote” or “Call for Pricing.” Not sure why I see older version topics showing this feature and it is not in v2.

[quote name=‘Dave the Slave’]I think I understand now - you thought I wanted to change what text was displayed. Nope.



Right now if a product price is set to zero, no price, nothing but Add to Wishlist appears. I don’t want that - I want it to read something like “Call for a Quote” or “Call for Pricing.” Not sure why I see older version topics showing this feature and it is not in v2.[/QUOTE]



I am diligently trying to understand my translator google :slight_smile:

I do not yet know what the problem?

NM. Something apparently is wrong at my end or maybe there is an additional setting I have not found yet to show contact_us_for_price on the product page.

You need to set the price to “0” and set Zero price action to “Do not allow to add product to cart”. You will see “[Contact us for price]” under the product code in the product block.



Bob

Yeah got it now - I was mucking around with the code last week and deleted some stuff I wasn’t supposed to.



But, something still mystifies me; why if I set the price to zero does the quantity box and other product options still appear?



Is there anyway to hide that stuff cuz it makes no sense if they have to call anyways?!?



EDIT - Figured out the obvious how to get rid of the options but the darn Add to Wishlist is still there!

I have not been able to figure out where the “Add to wishlist” link is yet.



But, I got to thinking about it and it might make sense to keep it there. Since the customer cannot add the item to the cart, they can still add it to their wishlist for future reference (e.g., they are not calling on the spot).



Bob

Okay, figured the “add to wishlist” link out. It is in /skins/YOURSKIN/customer/addons/wishlist/views/wishlist/components/add_to_wishlist.tpl



Bob

Yup I found it too, but I do not want anything to show except “Call for a price/quote”. As a shopper I would never bother adding something to any list if I had no idea how much it cost.



Anybody know how to ‘hide’ the wishlist button on a product that has zero price?

Just comment out the contents of /skins/YOURSKIN/customer/addons/wishlist/views/wishlist/components/add_to_wishlist.tpl

{* $Id: add_to_wishlist.tpl 6703 2009-01-03 14:05:52Z angel $ *}
[COLOR="Red"]{*[/COLOR]
{if $auth.user_id}
{include file="buttons/button.tpl" but_id=$but_id but_name=$but_name but_text=$lang.add_to_wishlist but_role="text" but_onclick=$but_onclick but_href=$but_href}
{else}
{assign var="c_url" value=$config.current_url|escape:url}
{include file="buttons/button.tpl" but_name="" but_text=$lang.add_to_wishlist but_role="text" but_href="$index_script?dispatch=auth.login_form&return_url=$c_url" but_onclick=""}
{/if}
[COLOR="Red"]*}[/COLOR]

Bob

Nope, that removes the link from all items.



Bob

Yup it removes wish list from all product pages. I don’t know much about if and hide statements but it seems if there were some condition like, if this happens (zero price) then these things (quantity box and wish list button) should be hidden. And I think this condition should be in the buy_now.tpl.

Okay, tried this and it works - add the parts in red:


{* $Id: add_to_wishlist.tpl 6703 2009-01-03 14:05:52Z angel $ *}

[COLOR="Red"]{if !($product.zero_price_action == "R" && $product.price == 0)}[/COLOR]
{if $auth.user_id}
{include file="buttons/button.tpl" but_id=$but_id but_name=$but_name but_text=$lang.add_to_wishlist but_role="text" but_onclick=$but_onclick but_href=$but_href}
{else}
{assign var="c_url" value=$config.current_url|escape:url}
{include file="buttons/button.tpl" but_name="" but_text=$lang.add_to_wishlist but_role="text" but_href="$index_script?dispatch=auth.login_form&return_url=$c_url" but_onclick=""}
{/if}
[COLOR="Red"]{else}
{/if}[/COLOR]




Bob

[quote name=‘Dave the Slave’]Yup it removes wish list from all product pages. I don’t know much about if and hide statements but it seems if there were some condition like, if this happens (zero price) then these things (quantity box and wish list button) should be hidden. And I think this condition should be in the buy_now.tpl.[/QUOTE]

Take a look at lines 135-150 in the buy_now.tpl for the quantity and quantity discounts. You should be able to add the same test as above around this code block.



Bob

THAT WORKED!



Thank you very much.