Jump to content

Disable default carrier, so the customer has too choose


peterbjergsted
 Share

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

  • 4 years later...

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);

    }

 

  • Thanks 1

Share this post


Link to post
Share on other sites

  • 1 month later...
  • 4 weeks later...
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?

Share this post


Link to post
Share on other sites

  • 1 year later...
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?

Share this post


Link to post
Share on other sites

  • 2 weeks later...

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"

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More