How to check if on multiple address checkout page?
-
10-12-2020 - |
Question
I need a way to check if the customer is using multiple checkout.
Solution
Depending from where to check it you can either use Mage::app()->getRequest()
or if available (like in controllers) $this->getRequest()
...
$request = Mage::app()->getRequest();
if ($request->getModuleName() == 'checkout' && $request->getControllerName() != 'onepage')
# or
if ($request->getModuleName() == 'checkout' && $request->getControllerName() == 'multishipping')
OTHER TIPS
If customer is using multiple checkout then the URL of the website would be different then the normal checkout..
Multiple Checkout
https://www.domain.com/checkout/multishipping/
Normal Checkout
https://www.domain.com/checkout/onepage/
You can identify it by URL. Thanks :)
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange