peterbjergsted Posted April 19, 2016 Share Posted April 19, 2016 Hi, In some countries i have free delivery after a certain amount, but in other countries they always have too pay shipping. The problem is that, if the customer change country i OPC, it doesn't change the shipping cost, before the customer clicking on a delivery method. Can i disable the default carrier, so the customer always have too click on a shipping method, also if there only is one? Regards Peter Link to comment Share on other sites More sharing options...
decorocco Posted April 26, 2016 Share Posted April 26, 2016 Hi, Exactly the same here. In my case I need it because the default carrier somehow keeps changing back to "pick up in store", which generates a lot of confusion/irritation (clients do not read carefully before checking out). Anyway: a solution to this would be really great (I am using 1.6.0.9 by the way). Best, Decorocco Link to comment Share on other sites More sharing options...
ideaindividual Posted September 9, 2020 Share Posted September 9, 2020 any solution? Link to comment Share on other sites More sharing options...
Roman Bittner Posted September 11, 2020 Share Posted September 11, 2020 You can override the getDeliveryOption() method in Cart class. I have PS 1.7.6 and works well for me. /** * Do not automatically select any carrier (ie. ignore backend configuration in: Shipping –> Preferences –> CARRIER OPTIONS –> Default carrier). * Consequently, there will be no shipping price in the cart. * Also, the customer will have to select the carrier during checkout phase. */ public function getDeliveryOption($default_country = null, $dontAutoSelectOptions = false, $use_cache = true) { return parent::getDeliveryOption($default_country, true, $use_cache); } 1 Link to comment Share on other sites More sharing options...
Slav Posted October 29, 2020 Share Posted October 29, 2020 (edited) @Roman Bittner So where exactly do you add this in the Classes/Cart.php ? I have 1.6.1.24 but I guess it is the same concept and would really like to force customers to chose delivery method. Thanks! Steffen Edited October 29, 2020 by Slav (see edit history) Link to comment Share on other sites More sharing options...
aramonkg Posted November 25, 2020 Share Posted November 25, 2020 On 9/11/2020 at 4:27 PM, Roman Bittner said: You can override the getDeliveryOption() method in Cart class. I have PS 1.7.6 and works well for me. /** * Do not automatically select any carrier (ie. ignore backend configuration in: Shipping –> Preferences –> CARRIER OPTIONS –> Default carrier). * Consequently, there will be no shipping price in the cart. * Also, the customer will have to select the carrier during checkout phase. */ public function getDeliveryOption($default_country = null, $dontAutoSelectOptions = false, $use_cache = true) { return parent::getDeliveryOption($default_country, true, $use_cache); } I tried this on 1.7.5.1 and get the error that getDeliveryOption is not a method of ObjectModel, which is correct. Am I missing something? Link to comment Share on other sites More sharing options...
PSLab Posted July 22, 2022 Share Posted July 22, 2022 On 9/11/2020 at 3:27 PM, Roman Bittner said: You can override the getDeliveryOption() method in Cart class. I have PS 1.7.6 and works well for me. /** * Do not automatically select any carrier (ie. ignore backend configuration in: Shipping –> Preferences –> CARRIER OPTIONS –> Default carrier). * Consequently, there will be no shipping price in the cart. * Also, the customer will have to select the carrier during checkout phase. */ public function getDeliveryOption($default_country = null, $dontAutoSelectOptions = false, $use_cache = true) { return parent::getDeliveryOption($default_country, true, $use_cache); } Hi, Your code works for me on PS 1.7.3.3 with some adjustments but now my problem is that the client have to confirm the shipping option twice before he can access to the next step. Any idea where do the problem coming from? Link to comment Share on other sites More sharing options...
Ali Samie Posted August 1, 2022 Share Posted August 1, 2022 As explained here: You can not do this in BO. As far as I know, most important things related to checkout process take place in "classes/checkout/CheckoutProcess.php" and for the delivery options relatively you need to see "classes/checkout/CheckoutDeliveryStep.php" 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