2

I need to have two buttons on my product page one with title buy now and second add to cart

On click of "add to cart" it needs to follow the normal add to cart process while on click of buy now it needs to add product to cart and redirect to checkout page.

Is it possible to achieve this???/

1

looking at the cart controller https://github.com/bragento/magento-core/blob/1.9/app/code/core/Mage/Checkout/controllers/CartController.php#L75

The goBack method looks for the return_url Parameter.

Adding this to the add to cart form action on the product page with the desired url adds the product and then redirects to the given url

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.