I need to redirect product add to cart button to checkout page instead of cart page
also product will delete in cart before new add by custom module.
so how to do?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
add one hidden field in product view page with name return_url
<input type="hidden" value="<?php $this->getUrl('checkout/onepage')?>" name="return_url"/>
Now the page 'll redirect to the checkout onepage after adding the product to cart.
Refer this controller file.