Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Buy Now Button Along With Add To Cart Needed On Product Page Rate Topic   - - - - -

 
  • cool999
  • Senior Member
  • Trial users
  • Join Date: 26-Jul 12
  • 269 posts

Posted 07 June 2017 - 08:55 AM #1

I want to have a Buy Now button just beside Add to Cart button on the product page. I am using energothemes themes VIVASHOP .

 

When the Buy Now is clicked the user should go directly to the checkout page and if he has any previous product in the cart that should also be shown on the checkout page along with the current one.

 

Please see the screenshot below (shown by red arrow) -

Capture.jpg



 
  • cool999
  • Senior Member
  • Trial users
  • Join Date: 26-Jul 12
  • 269 posts

Posted 07 June 2017 - 09:01 AM #2

Moderators Please Edit the topic Title to - Buy Now Button along with Add to Cart Needed on Product Page



 
  • beencart
  • Senior Member
  • Authorized Reseller
  • Join Date: 27-Feb 17
  • 191 posts

Posted 07 June 2017 - 09:33 AM #3

Hello! You need a custom modification, please contact us to sales@beencart.ru.



 
  • cool999
  • Senior Member
  • Trial users
  • Join Date: 26-Jul 12
  • 269 posts

Posted 07 June 2017 - 10:06 AM #4

Hello! You need a custom modification, please contact us to sales@beencart.ru.

This is a very basic work people have helped in the past in the forum.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19976 posts

Posted 07 June 2017 - 02:03 PM #5

app/controllers/frontend/checkout.php

 

Try to add

if (defined('AJAX_REQUEST')) {
    Tygh::$app['ajax']->assign('force_redirection', fn_url('checkout.cart'));
}

after

unset($cart['skip_notification']);

(!) Not tested


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • cool999
  • Senior Member
  • Trial users
  • Join Date: 26-Jul 12
  • 269 posts

Posted 07 June 2017 - 02:13 PM #6

app/controllers/frontend/checkout.php

 

Try to add

if (defined('AJAX_REQUEST')) {
    Tygh::$app['ajax']->assign('force_redirection', fn_url('checkout.cart'));
}

after

unset($cart['skip_notification']);

(!) Not tested

I just need to add a button beside add to cart on the product view page. I don't think this will do what I want. Please help ecom. Thanks.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19976 posts

Posted 08 June 2017 - 05:05 AM #7

Not sure if 3rd party theme has default hooks, but try to use My changes module and create the following file

 

design/themes/TEMA/templates/addons/wishlist/hooks/products/add_to_cart.post.tpl

 

Then put your code there and clear cache to check the result


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • cool999
  • Senior Member
  • Trial users
  • Join Date: 26-Jul 12
  • 269 posts

Posted 08 June 2017 - 06:09 AM #8

Not able to understand what exactly needs to be done and which code. Have you understood what I want to achieve. I just need a Buy Now button on the product page along with add to cart. When clicked on Buy Now customers should go directly to checkout page adding the current product in the cart along with any other item which is already in the cart (if any). Please explain in easy way. Thanks alot....

Not sure if 3rd party theme has default hooks, but try to use My changes module and create the following file

 

design/themes/TEMA/templates/addons/wishlist/hooks/products/add_to_cart.post.tpl

 

Then put your code there and clear cache to check the result



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19976 posts

Posted 08 June 2017 - 01:02 PM #9

In the mentioned file you can add button, which should be displayed next to the Add to cart button. It will be required to add extra parameter, which can be used to check if the customer should be redirected to cart. The code for this redirection can be found in post #5 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • cool999
  • Senior Member
  • Trial users
  • Join Date: 26-Jul 12
  • 269 posts

Posted 14 June 2017 - 12:03 PM #10

I tried but couldn't make it work.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19976 posts

Posted 14 June 2017 - 12:56 PM #11

Hire someone to make this work for you. Looks like it is required to examine 3rd party theme in this case


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)