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

How do I add Buy Now button on product page

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

Advanced Member
  
Join Date: Aug 2008
Location: Clearwater, FL
Posts: 52
 

Default How do I add Buy Now button on product page

Hi,

I've been searching on the forum and doing some trial and error myself but still can't seem to figure out how to add a Buy Now button to the product details page (product_details.tpl). Please share how to do this? Thanks!

X-Cart version is 4.3.1 with a few custom mods I built.
__________________
.

Contact me about modifying x-cart for your needs.

Xcart Gold versions:
4.5.x, 4.4.3, 4.4.1, 4.4.0, 4.3.1
4.1.10, 4.1.9, 4.1.8

Add-on modules:

Featured Product Carousel
and other various mods I've built
Reply With Quote
  #2  
Old 05-12-2010, 03:27 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: How do I add Buy Now button on product page

Admin area -> General settings -> Appearence settings -> Enable buttons "Buy Now" and "Add to wish list" in the products list
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 05-13-2010, 06:15 AM
  gallaghersean's Avatar 
gallaghersean gallaghersean is offline
 

Advanced Member
  
Join Date: Aug 2008
Location: Clearwater, FL
Posts: 52
 

Default Re: How do I add Buy Now button on product page

Yes, that will add the buttons to the product list page but what I'm looking for it adding the Buy Now button to the actual product page (aka product_details.tpl). This will require some coding I just don't know what exactly to add in order to add get that hooked up.
__________________
.

Contact me about modifying x-cart for your needs.

Xcart Gold versions:
4.5.x, 4.4.3, 4.4.1, 4.4.0, 4.3.1
4.1.10, 4.1.9, 4.1.8

Add-on modules:

Featured Product Carousel
and other various mods I've built
Reply With Quote
  #4  
Old 05-13-2010, 08:37 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: How do I add Buy Now button on product page

Buy Now button should be already there - it's called Add To Cart
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 05-13-2010, 08:48 AM
  gallaghersean's Avatar 
gallaghersean gallaghersean is offline
 

Advanced Member
  
Join Date: Aug 2008
Location: Clearwater, FL
Posts: 52
 

Default Re: How do I add Buy Now button on product page

No you're misunderstanding. Add to cart button adds product to the cart and returns the user to the product page. I want a buy now button that adds the product to the cart and brings the user to the checkout page.
__________________
.

Contact me about modifying x-cart for your needs.

Xcart Gold versions:
4.5.x, 4.4.3, 4.4.1, 4.4.0, 4.3.1
4.1.10, 4.1.9, 4.1.8

Add-on modules:

Featured Product Carousel
and other various mods I've built
Reply With Quote
  #6  
Old 05-13-2010, 08:53 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: How do I add Buy Now button on product page

This is a setting in admin - General Options - redirect customer to cart
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 05-13-2010, 01:41 PM
  gallaghersean's Avatar 
gallaghersean gallaghersean is offline
 

Advanced Member
  
Join Date: Aug 2008
Location: Clearwater, FL
Posts: 52
 

Default Re: How do I add Buy Now button on product page

Nope that's not it. What I want is to have both the "Add to Cart" and "Buy Now" buttons on the actual product page (aka product_details.tpl). Where "Add to Cart" button adds item to cart and brings user back to product page but if they click the "Buy Now" button then it adds item to cart and brings them to the checkout page.
__________________
.

Contact me about modifying x-cart for your needs.

Xcart Gold versions:
4.5.x, 4.4.3, 4.4.1, 4.4.0, 4.3.1
4.1.10, 4.1.9, 4.1.8

Add-on modules:

Featured Product Carousel
and other various mods I've built
Reply With Quote
  #8  
Old 05-14-2010, 10:30 AM
  gallaghersean's Avatar 
gallaghersean gallaghersean is offline
 

Advanced Member
  
Join Date: Aug 2008
Location: Clearwater, FL
Posts: 52
 

Default Re: How do I add Buy Now button on product page

I figured it out.... created my own mod for this... I did the following:
  1. Added line in cart.php to check if POST var "redirect" is set to true and if so then set $config["General"]["redirect_to_cart"] to Y.
  2. Added hidden input field "redirect"
  3. Added a HTML button to product_details.tpl
  4. Created some JavaScript so when that button is pressed it changes the hidden variable to true and then submits the form
__________________
.

Contact me about modifying x-cart for your needs.

Xcart Gold versions:
4.5.x, 4.4.3, 4.4.1, 4.4.0, 4.3.1
4.1.10, 4.1.9, 4.1.8

Add-on modules:

Featured Product Carousel
and other various mods I've built
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 12:10 PM.

   

 
X-Cart forums © 2001-2020