| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Urgent! How to change "add-to-cart" to "contact us" if price is 0 | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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
__________________
X-Cart 4.4.3 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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.
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() 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. ---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#4
|
|||||||
|
|||||||
![]() 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:
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:
Afterwords I hide the "Quantity Text and box" at product_details.tpl product_details.tpl Line 111 and 190: Code:
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:
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
__________________
X-Cart 4.4.3 |
|||||||
|
#5
|
|||||||||
|
|||||||||
![]() 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.
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
|
|||
X-Cart forums © 2001-2020
|