![]() |
Urgent! How to change "add-to-cart" to "contact us" if price is 0
Hello All,
it would be nice if somebody could help me. For some products at our site it is forbidden to display the pricing. Is it in this case possible to change the "add-to-cart" button to "contact us" and to redict the customer to the contact form? Our x-cart is 4.4.3. Thanks a lot. Sincerely, Aristos |
Re: Urgent! How to change "add-to-cart" to "contact us" if price is 0
I haven't played with this in quite awhile but in earlier versions of x-cart if you gave a product a price of $0.00 it would display "Call for Price". I can't remember if it still displayed the "add to cart" button or not (I don't think it should).
Anyway, you should be able to use the "price = $0.00" part of the code to display the "ask a question about this product" link in the product details using a if/else routine. http://forum.x-cart.com/showthread.php?t=61432 discusses hiding the "add to cart" button. |
Re: Urgent! How to change "add-to-cart" to "contact us" if price is 0
More information in this thread: http://forum.x-cart.com/showthread.php?t=45694
In default cart, if you set a price to 0 - the customer will be asked to enter their own price - so that needs to be modified if you go that route. --- |
Re: Urgent! How to change "add-to-cart" to "contact us" if price is 0
Ok, after hours of searching and testing of the tpl.files I found the solutions.
Note: This may only work for Version 4.4.3. I changed the lbls (admin area/languages/english/labels) for "enter your own price" to "Request Quote" amd the "enter your own price note" with a linked contact message. Then I hide the add-to-cart button at the product_details.tpl , in red are the added changes: product_details.tpl Line 210 and 212: Code:
{if $product.appearance.buy_now_buttons_enabled} Then I hide also the following things at product_details.tpl: Changes to hide "OUR PRICE" and "box" if price is 0 product_details.tpl Line 66 and 81: Code:
<tr> Afterwords I hide the "Quantity Text and box" at product_details.tpl product_details.tpl Line 111 and 190: Code:
{if $product.taxed_price ne 0} Finally, I also hide the "buy now" botton for e.g. the product list under a category or for search results. products_list.tpl Code:
{if $active_modules.Product_Configurator and $is_pconf and $current_product} Please note: If you already made some other changes at that tpl.files, the given line-numbers won't be identical. Just search for the comments. I hope this will help, once I spent many hours to figure it out. Kind Regards |
Re: Urgent! How to change "add-to-cart" to "contact us" if price is 0
Not that I have any need for this but its possible someone else might. After putting in all your work its nice of you to share it.
|
All times are GMT -8. The time now is 05:43 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.