Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

buy button with variants

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-03-2009, 07:04 AM
 
rshandel rshandel is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 125
 

Default buy button with variants

Some of the products I sell have product variants (color for example) and I'm wondering is it possible to display the colors in a drop down box on the products list page or would this cause too much load on the server?

Also, the products that have variants display only the "buynow" button on the product list page, and when clicked, it adds the default color to the shopping cart. I thought since it wasn't displaying the color drop down the "buynow" button link would take user to the product page. How can I change this function?
Thanks.
Richard
__________________
x-cart 4.1.12
x-cart 4.2
Reply With Quote
  #2  
Old 03-03-2009, 07:22 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: buy button with variants

http://forum.x-cart.com/showthread.php?t=45484&highlight=variant+products
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-03-2009, 07:51 AM
 
rshandel rshandel is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 125
 

Default Re: buy button with variants

Thanks. Did you ever test this mod to see if its bloated?

Regarding my other question, is X-Cart supposed to change the link on the buynow button is the product has a variant rather than just adding the default color to the cart?
__________________
x-cart 4.1.12
x-cart 4.2
Reply With Quote
  #4  
Old 03-03-2009, 07:54 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: buy button with variants

Unfortunately that is the way it works by default. And no, haven't tried that mod as that will add a ton of page load time to categories having to filter through all of those variants. Impractical for all but the smallest shops I think.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 03-03-2009, 08:02 AM
 
rshandel rshandel is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 125
 

Default Re: buy button with variants

Ok, I guess I can put a condition statement in the buy_now.tpl. Do you happen to know what the variant data field is called ( I exported the product database, but didn't see the field name)?
__________________
x-cart 4.1.12
x-cart 4.2
Reply With Quote
  #6  
Old 03-03-2009, 08:06 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: buy button with variants

You could use this as an {if} statement:

{if $products[product].is_product_options}

Basically that says 'if a product has options'. Use it to change the buy now button to say 'view details' and link to the product detail page for example.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 03-03-2009, 08:20 AM
 
rshandel rshandel is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 125
 

Default Re: buy button with variants

great! thanks again.
__________________
x-cart 4.1.12
x-cart 4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:14 PM.

   

 
X-Cart forums © 2001-2020