Razzaq Posted October 19, 2010 Share Posted October 19, 2010 I have uploaded Prestashop on my Web Server now i want to skip the Carrier selection step when customer is placing order. Is there any easy way to skip this step. Please reply as soon as possible. Link to comment Share on other sites More sharing options...
rocky Posted October 19, 2010 Share Posted October 19, 2010 Try changing lines 95-96 of order.php from: autoStep(2); displayCarrier(); to: //autoStep(2); //displayCarrier(); autoStep(3); checkFreeOrder(); displayPayment(); then change line 24 of order-paymnet.tpl in your theme's directory from: <a href="{$base_dir_ssl}order.php?step=2" title="{l s='Previous'}" class="button">« {l s='Previous'} to: <a href="{$base_dir_ssl}order.php?step=1" title="{l s='Previous'}" class="button">« {l s='Previous'} Link to comment Share on other sites More sharing options...
steviger Posted December 7, 2010 Share Posted December 7, 2010 @ RazzaqThis worked for me. See this thread: click hereRegards,Steven Link to comment Share on other sites More sharing options...
beatstreet Posted July 16, 2011 Share Posted July 16, 2011 Yeah in PS 1.3 it works with these tips.Now its time to have it in PS 1.4, please ?Change controllers/OrderController.php is much different. Link to comment Share on other sites More sharing options...
rocky Posted July 17, 2011 Share Posted July 17, 2011 The code is very similiar. Try overriding the process() function in OrderController and change lines 97-98 (in PrestaShop v1.4.3) of OrderController.php from: $this->autoStep(); $this->_assignCarrier(); to: //$this->autoStep(); //$this->_assignCarrier(); $this->autoStep(); /* Bypass payment step if total is 0 */ if (($id_order = $this->_checkFreeOrder()) AND $id_order) { if (self::$cookie->is_guest) { $email = self::$cookie->email; self::$cookie->logout(); // If guest we clear the cookie for security reason Tools::redirect('guest-tracking.php?id_order='.(int)$id_order.'&email;='.urlencode($email)); } else Tools::redirect('history.php'); } $this->_assignPayment(); then change line 68 (in PrestaShop v1.4.3) of order-payment.tpl in your theme's directory from: <a href="{$link->getPageLink('order.php', true)}?step=2" title="{l s='Previous'}" class="button">« {l s='Previous'} to: <a href="{$link->getPageLink('order.php', true)}?step=1" title="{l s='Previous'}" class="button">« {l s='Previous'} I haven't tested this, but hopefully it will work. Link to comment Share on other sites More sharing options...
beatstreet Posted July 17, 2011 Share Posted July 17, 2011 Hey, sounds good.I`ve tested many things and for me only works to copy step=3 to step=2 change few lines and comment out old step=2.Else the order-address.js throws the error ".. address can`t be saved ..."The important in PS1.4.1 controllers/OrderController.php is to take: $this->processAddress(); $this->_assignCarrier(); from the old case 2: into a renamed copy of case 3: public function process() ... /* case 2: if(Tools::isSubmit('processAddress')) $this->processAddress(); $this->autoStep(); $this->_assignCarrier(); break; */ // copy all from case 3: and rename it case 2: and change first 3 lines // 1. because processCarrier is not yet executed comment out // and between insert ... end use new lines case 2: // if(Tools::isSubmit('processCarrier')) // insert $this->processAddress(); $this->_assignCarrier(); // end $this->processCarrier(); $this->autoStep(); /* Bypass payment step if total is 0 */ // ... and so on break; case 3: // unchanged break; and to display the new step=2 as payment also, few lines down copy case 3: also in renamed case 2: public function displayContent() ... /* case 2: self::$smarty->display(_PS_THEME_DIR_.'order-carrier.tpl'); break; */ case 2: self::$smarty->display(_PS_THEME_DIR_.'order-payment.tpl'); break; case 3: self::$smarty->display(_PS_THEME_DIR_.'order-payment.tpl'); break; default: self::$smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); break; also one change because step=3 isn´t real: maybe test this part public function autoStep() ... // elseif ($this->step >= 3 AND !self::$cart->id_carrier AND !$isVirtualCart) // Tools::redirect('order.php?step=2'); elseif ($this->step >= 2 AND !self::$cart->id_carrier AND !$isVirtualCart) Tools::redirect('order.php?step=1'); ok, i will post my solution in the thread from steviger tomorrow, if it is well. Because there are all steps to be done right for PS 1.3 and ....EDIT 07/18/2011: I made an update of the code, because of the back button in bankwire ! Link to comment Share on other sites More sharing options...
davers44 Posted July 27, 2011 Share Posted July 27, 2011 This seems to work now that I have a default carrier, but I plan adding more. Any idea how to merge address and carrier selection in the same step? Link to comment Share on other sites More sharing options...
steviger Posted March 14, 2012 Share Posted March 14, 2012 (edited) I was wondering why I didn't make any difference in my shop, but I'm using one page checkout... duh. I guess the only thing I have to do is in order-opc.tpl comment the carrier in line 92-94 <!-- Carrier --> {include file="$tpl_dir./order-carrier.tpl"} <!-- END Carrier --> Nope, that didn't work. Any tips on how to remove the carrier in the OPC page? Cheers! Steven Edited March 14, 2012 by steviger (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts