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

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

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

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

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.

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

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.

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

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

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

I tried but couldn't make it work.

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