| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
if/then statement question for products.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Hello,
In the products.tpl template I want to exclude any product from showing the buy now button when there are options for that product. What would be the if/then statement to use? Also, I tried to exclude certain categories from showing the buy now button in the products.tpl but could not get it to work as I read in other posts. This is the code example that was given: Code:
This is the code I tried on a 4.0.18 version and it does not work: Code:
I would appreciate any help on these two issues. Thanks alot Louise
__________________
Louise Studio 57 Designs - X-Cart Customization Providing X-Cart Services since 2004 Hottest Blog Directory - Submit Your Blog for a Free Listing |
|||||||||
#2
|
|||||||
|
|||||||
![]() For hiding the buy now button for products with options, use this:
{if $product.is_product_options eq 'N'} That if statement for the buy now button should be fine...
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
![]() When debugging and looking for the variables, I was close with:
Code:
but I could not figure out the first part. Going by example I was coming up with $products[product].is_product_options. Sometimes it looks like its product and sometimes its products?? Can you explain this statement? Code:
I understand the is_product_options is pulled from the database...but how do you determine the first part of that code? Thanks, Louise
__________________
Louise Studio 57 Designs - X-Cart Customization Providing X-Cart Services since 2004 Hottest Blog Directory - Submit Your Blog for a Free Listing |
|||||||||
#4
|
|||||||
|
|||||||
![]() Can't explain it , just pulled it from the buy now template
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() FYI if your product has options the buy now button on the products page will take you to the product page. It will not take you to the cart.
I assume that this is done so the person will have to see the option selection pull down menu. |
|||||||
#6
|
|||||||
|
|||||||
![]() Quote:
You can disable this: In "general settings: appearance options" Quote:
The default (first) option is then selected.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() You know, I totally overlooked that option.
Some days you can't see the sky for the clouds (the ones in my head). ![]() ![]() Thanks, Louise
__________________
Louise Studio 57 Designs - X-Cart Customization Providing X-Cart Services since 2004 Hottest Blog Directory - Submit Your Blog for a Free Listing |
|||||||||
#8
|
|||||||||
|
|||||||||
![]() I don't see that option in my admin end. I'm running 4.1.8. Any Ideas?
__________________
Kyle K. The Honey Jar- Because Home Is Where Your Honey Is www.thehoneyjarhome.com x-cart gold v4.1.8 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|