Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the default checkout url for a magento store?

Tags:

php

magento

I'm trying to send a user to checkout programmatically in Magento. I can send them to $this->_redirect('checkout/onepage'); but if they have some sort of third party checkout extension I won't be using the proper one. Is there a way to get the default checkout url for the site and redirect there?

like image 533
codeetcetera Avatar asked Jul 14 '12 16:07

codeetcetera


1 Answers

you can try with

$checkout_link = Mage::helper('checkout/url')->getCheckoutUrl();

this return checkout link in all conditions

  • while using any extensions such as OnePagecheckout or OneStepcheckout
  • if on extension were used it simply returns the basic checkout url
like image 133
MirzaShakir Avatar answered Nov 08 '22 12:11

MirzaShakir