| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
"Contact to order" for just one category | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
"Contact to order" for just one category
I have a site where all categories are totally normal except for one category where I want customers to contact me directly if they are interested in purchasing, rather than being able to add it to the cart and checkout. However, I want to show the price still.
I tried to use an if statement I found in another thread, but it doesn't seem to work on the product_details.tpl or perhaps it's only for older x-cart versions. This is what I have... Code:
But it doesn't do anything. Could someone tell me the proper way for hiding Add To Cart button for one category only on the product_details.tpl? If I just comment it out it gets rid of the button, so it seems like I'm in the right location.. Thanks!
__________________
shop jadefrolics illustrated prints, accessories, and other goodies http://shop.jadefrolics.com X-Cart Gold Version 4.4.1 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: "Contact to order" for just one category
Enable webmaster mode. Reload the page in question. In the webmaster mode pop up window, select the Show Variables button to see the smarty variables available to you and how they are set. Look for the variable that stores the current category, and what it is set to. On a category page, it probably is $cat or you can use something in the $current_category array, like $current_category.categoryid. You can also make sure that it is set to 251. On the product page, you can do the same thing and look for the category. Maybe you can use $product.categoryid, depending upon if the category in question is the product's Main category setting.
---
__________________
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) |
|||||||||
|
#3
|
|||||||||
|
|||||||||
Re: "Contact to order" for just one category
Thanks so much! Believe it or not, I had no idea that "Show Variables" was an option. Thus far I've not had to mess with that part.
After looking through the variables it was indeed $product.categoryid and now it works. Thanks again!
__________________
shop jadefrolics illustrated prints, accessories, and other goodies http://shop.jadefrolics.com X-Cart Gold Version 4.4.1 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|