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

adding a buy button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-02-2006, 11:33 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default adding a buy button

I've searched the forum but can't find the answer...

I'm trying to add a 'buy now' button, but I can't work out how to call it. I can do the basic include

Code:
{include file="buttons/buy_now.tpl"}

but it doesn't actually do the add to cart bit. I think I need a href value, but how do I do this?

thanks,
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #2  
Old 05-02-2006, 12:33 PM
 
balinor balinor is offline
 

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

Default

Hey Amy, there is already a buy now button in the products.tpl and product_t.tpl templates...you just need to un-comment it.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-02-2006, 01:12 PM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default

this isn't for thise templates. It's for a new menu I've created for basic products that will stay the same on each page, but will contain half a dozen or so products that people will hopefully add to their cart, kind of like clip striops in retail I suppose.

Anyway, I've set up an extra table in the database, and I've pulled the thumbnail etc and links to each product, but I wanted to add a buy button too but O'm stuck on the href bit.

I'm not sure if I need to query the database to get this or how to go about it.
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #4  
Old 05-02-2006, 07:13 PM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default

The easiest way would be to add a link to the button for example:


Just change the productid to whatever the product is. The good thing is there is no JavaScript involved.
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 06:56 AM.

   

 
X-Cart forums © 2001-2020