steviger Posted September 15, 2010 Share Posted September 15, 2010 Hi,I have only one default carrier in my shop and in the checkout, I would like customers to go directly go from address to payment. Skip the carrier part. Is that possible and if so, what's the trick?Thanks in advance!Steven Link to comment Share on other sites More sharing options...
Daniel Ciornei Posted September 15, 2010 Share Posted September 15, 2010 in order.php you must find /* 4 steps to the order */ switch (intval($step)) { case 1: you will find there the steps as case 1 , 2, 3 and 4if you want to skip carrier you have to replace case 2: if(Tools::isSubmit('processAddress')) processAddress(); autoStep(2); displayCarrier(); break; with case 2: if(Tools::isSubmit('processAddress')) processAddress(); autoStep(2); displayPayment(); break; this will skip carrier and go from adresses directly to payment.you will have to edit order-steps.tpl also to hide the carrier step. Link to comment Share on other sites More sharing options...
robkwal Posted September 15, 2010 Share Posted September 15, 2010 I only have one carrier too, never thought to ask for this hack! Glad I came across it!Regards,Rob Link to comment Share on other sites More sharing options...
steviger Posted September 16, 2010 Author Share Posted September 16, 2010 Hi Daniel,Thanks for your fast reply! One more question: In the order-steps.tpl I just delete these lines? {if $current_step=='payment'} {l s='Shipping'} {else} {l s='Shipping'} {/if} Thanks again!Steven Link to comment Share on other sites More sharing options...
steviger Posted September 16, 2010 Author Share Posted September 16, 2010 A final thing... When on the payment page and clicking on the previous button, it doesn't go back to address. The link is order.php?step=2 and that's probably the link to the carrier page. Any idea how to fix that so that it returns to address?That was really the last question Sorry to bother you but I found out myself. In themes/prestashop/order-payment.tpl you need to change this line: « {l s='Previous'} to this: « {l s='Previous'} So step 1 instead of 2... Link to comment Share on other sites More sharing options...
h4r15 Posted September 30, 2010 Share Posted September 30, 2010 It is a good tips and worked for me but my problem is, in this step there is also radio check for agreement which my buyer have to thick on it, and then i also offer gift wrap. how to move this 2 things to "address step"? Link to comment Share on other sites More sharing options...
steviger Posted October 1, 2010 Author Share Posted October 1, 2010 Hi,You can go to the themes/prestashop/order-carrier.tpl and on line 34 change the initial state of the checkbox to "checked". How the move the gift wrap part: I have no idea.Cheers,Steven Link to comment Share on other sites More sharing options...
Daddyslipdisk Posted October 1, 2010 Share Posted October 1, 2010 OMG! Thank you SOOO Much. The carrier thing doesn't even matter because we do free shipping here and the carrier changes dependent on a variety of factors that Prestashop could not handle figuring out. Bypassing the carrier is a LIFESAVER. I just finished with implementing your fix here and this problem that has eaten me alive for 2 days now is finally RESOLVED with this fix. Now my storefront actually works!!Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! Thank You! 1 Link to comment Share on other sites More sharing options...
steviger Posted October 5, 2010 Author Share Posted October 5, 2010 Glad I could help you Loads of succes with your shop.Cheers,Steven Link to comment Share on other sites More sharing options...
gerritsen142 Posted October 9, 2010 Share Posted October 9, 2010 It is a good tips and worked for me but my problem is, in this step there is also radio check for agreement which my buyer have to thick on it, and then i also offer gift wrap. how to move this 2 things to "address step"? Good question. I also would like to skip the carrier part and move the checkbox for agreement which my buyer to the 'address' part. Any solutions on this? Link to comment Share on other sites More sharing options...
TirDeFona Posted December 10, 2010 Share Posted December 10, 2010 Hi all,I've followed these instructions and it works ok, BUT when printing the invoice the field "shipment cost" appears as zero. The amount of the invoice is correct, but I've looked at the ps_orders table and the field id_carrier is set to zero.What else should we modify in order to set this field automatically to the carrier id value when placing an order?Thank you! Link to comment Share on other sites More sharing options...
magnatek Posted February 5, 2011 Share Posted February 5, 2011 I LOVE YOU GUYS!!!!!! Link to comment Share on other sites More sharing options...
Behc98 Posted March 18, 2011 Share Posted March 18, 2011 Hi all,I've followed these instructions and it works ok, BUT when printing the invoice the field "shipment cost" appears as zero. The amount of the invoice is correct, but I've looked at the ps_orders table and the field id_carrier is set to zero.What else should we modify in order to set this field automatically to the carrier id value when placing an order?Thank you! help pls Link to comment Share on other sites More sharing options...
Behc98 Posted March 18, 2011 Share Posted March 18, 2011 classes/cart.php line 82 replace $fields['id_carrier'] = 21; //default carrier no $fields['id_carrier'] = intval($this->id_carrier); Link to comment Share on other sites More sharing options...
beatstreet Posted May 23, 2011 Share Posted May 23, 2011 There is some code in classes/Cart.php that is usefull to avoid hardcoding.Besides all steps before that have to made,i change line 83 (in PS V-1.3.1) from: $fields['id_carrier'] = intval($this->id_carrier); to: $fields['id_carrier'] = intval(Configuration::get('PS_CARRIER_DEFAULT')); that takes the default carrier, also in ps_cart Link to comment Share on other sites More sharing options...
TirDeFona Posted May 24, 2011 Share Posted May 24, 2011 Thank you! Now it works perfectly! Link to comment Share on other sites More sharing options...
beatstreet Posted July 16, 2011 Share Posted July 16, 2011 I try to skip carrier in PS 1.4 but its harder, because of the controllers/OrderController.php is so structured.Know anybody the configuration ??thxedit:for me it is solved PS 1.4.1 the changes in OrderController.php see linkor i can copy it to this thread. Link to comment Share on other sites More sharing options...
perusi Posted August 9, 2012 Share Posted August 9, 2012 I've changed the line <form action="{$link->getPageLink('order.php', true)}" method="post"> to <form action="{$base_dir}modules/cashondelivery/validation.php" method="post" onsubmit="return acceptCGV();"> In order-address.tpl... Also...i've made changes in OrderController.php from here http://www.prestashop.com/forums/topic/74445-can-i-hide-carrier-selection-step-in-prestashop/ Everything works, except the messages the customers are leaving... From what i've tested, the problem is within the FORM ACTION. Any ideas? thanks Link to comment Share on other sites More sharing options...
darqor Posted May 12, 2013 Share Posted May 12, 2013 any solutions for prestashop 1.5? Link to comment Share on other sites More sharing options...
taoufiqaitali Posted May 14, 2013 Share Posted May 14, 2013 hello is this method work for prestashop 1.5 Link to comment Share on other sites More sharing options...
BSS Posted December 11, 2013 Share Posted December 11, 2013 Same here. need solution for ps 1.5.6.1 Link to comment Share on other sites More sharing options...
pskeeda Posted February 21, 2015 Share Posted February 21, 2015 quite a old thread, but if there is a solution for old version, there should be for ps 1.6.0.11?? help please Link to comment Share on other sites More sharing options...
ganeshshige Posted June 4, 2015 Share Posted June 4, 2015 How to skip step carrier in checkout in prestashop 1.6 Link to comment Share on other sites More sharing options...
neartion Posted March 22, 2016 Share Posted March 22, 2016 WHERE IS ORDER.PHP which i need to change? thanks Link to comment Share on other sites More sharing options...
kNife77 Posted June 25, 2016 Share Posted June 25, 2016 This is another solution that works for us (Prestashop 1.6.x): 1 - Go to theme/shopping-cart.tpl and find {if !$opc} <center> <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')|escape:'html':'UTF-8'}{else}{$link->getPageLink('order', true, NULL, 'step=1')|escape:'html':'UTF-8'}{/if}" class="button-exclusive btn btn-default btn-warning" title="{l s='Proceed to checkout'}" > <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </a></center> {/if} change it to: {if !$opc} {if $conditions} <p class="carrier_title">{l s='Terms of service'}</p> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv1" value="1" /> <label for="cgv1">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> {/if} <center> <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')|escape:'html':'UTF-8'}{else}{$link->getPageLink('order', true, NULL, 'step=1')|escape:'html':'UTF-8'}{/if}" class="button-exclusive btn btn-default btn-warning" id="butonProceed" title="{l s='Proceed to checkout'}" > <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </a></center> {/if} so now you will ask for TermsAndConditions on the step1. For that condition to work, go to global.js and add this: $('#butonProceed').on('click',function(e) { if( $('#cgv1').prop('checked') == false ){ alert("You must agree to the terms of service before continuing"); e.stopPropagation(); e.preventDefault(); return false;} }); Good. Now go to theme/order-address.tpl and find the proceed to checkout button: <button type="submit" name="processAddress" class="btn btn-warning btn-default"> <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </button> And change it to this: <button type="submit" name="processAddress" id="clickSingur" class="btn btn-warning btn-default"> <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </button> And at the end of the code, add this: <script>{literal} window.setInterval(clickSingur(), 1); function clickSingur(){ $('#clickSingur').click(); } {/literal}</script> Good. Now the address step will be skipped. Go to theme/order-carrier.tpl and find this {if $conditions AND $cms_id} <p class="carrier_title">{l s='Terms of service'}</p> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" {if ...} /> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> {/if} and change it to this: {if $conditions AND $cms_id} <p class="carrier_title">{l s='Terms of service'}</p> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" checked /> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> {/if} now find this: <button type="submit" name="processCarrier" class="btn btn-warning" > {l s='Proceed to checkout'} <i class="icon-chevron-right right"></i> </button> and change it to this: <button type="submit" id = "apasaSingur" name="processCarrier" class="btn btn-warning" > {l s='Proceed to checkout'} <i class="icon-chevron-right right"></i> </button> and at the end of the code add this: <script>{literal} window.setInterval(clickSingur(), 1); function clickSingur(){ $('#apasaSingur').click(); } {/literal}</script> Now the carrier step will be completed automaticly. Now go to theme/modules/cashondelivery/views/templates/front/validation.tpl and find: <button type="submit" class="btn btn-warning button " > <span>{l s='I confirm my order' mod='cashondelivery'} </span> </button> and change it to this: <button id="confirmaAutomat" type="submit" class="btn btn-warning button "> <span>{l s='I confirm my order' mod='cashondelivery'} </span> </button> And now at the end of the code add this: <script>{literal} window.setInterval(clickSingur(), 1); function clickSingur(){ $('#confirmaAutomat').click(); } {/literal}</script> And now the order will be confirmed automaticly. You can do that on any payment method validation tpl as well. Tested and working perfect;) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now