X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   adding a buy button (https://forum.x-cart.com/showthread.php?t=21500)

amy2203 05-02-2006 11:33 AM

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,

balinor 05-02-2006 12:33 PM

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. :)

amy2203 05-02-2006 01:12 PM

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.

wjbrewer 05-02-2006 07:13 PM

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.


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.