Jump to content

Bypassing shipping option during the checkout


Recommended Posts

This is not a tutorial but rather a marker to guide you on a right track. 

 

I ran in to a problem where i couldn't use virtual products to bypass the shipping tab while trying to checkout a product. So I just decided to bypass it. And as a future reference to someone, this might be gold. 

 

Go to controllers/front/orderController.php 

 

search line 141 and replace this 

			case 2:
				if (Tools::isSubmit('processAddress'))
					$this->processAddress();
				$this->autoStep();
				$this->_assignCarrier();
				$this->setTemplate(_PS_THEME_DIR_.'order-carrier.tpl');
			break;

with this 

			case 2:
				if (Tools::isSubmit('processAddress'))
				$this->processAddress();
				$this->autoStep();
				$this->_assignPayment();
				$this->setTemplate(_PS_THEME_DIR_.'order-payment.tpl');
			break;

I just hope that it will be useful for someone :)
Tho, there is still a lot to do - disable a error message, which display that you cant ship to that address and so on. But when your shipping is free and you dont want your clients going through one extra meaningless step then this is the answer. 

BR's

Link to comment
Share on other sites

×
×
  • Create New...