0

Is it possible to have a shipping discount for just one shipping method in CartThrob?

Basically, our client would like to set up Free Shipping Over X, with X being $150 but have the free shipping ONLY apply to UPS Ground shipping (which is $10).

My guess is that this isn't exactly possible. It seems like a workaround would be to use "Amount Off For Orders Over X", however I'm positive that our client won't go for that.

0

You could modify the Cartthrob_discount_free_shipping_over_x. Open it up… find this:

        if ($this->core->cart->subtotal() >= $this->core->sanitize_number($this->plugin_settings('order_over')))
    {
        $this->core->cart->set_discounted_shipping(0);
    }

change it to this:

        if ($this->core->cart->subtotal() >= $this->core->sanitize_number($this->plugin_settings('order_over')))
    {
        if ($this->core->cart->shipping_option() == "YOUR METHOD HERE")
        {
            $this->core->cart->set_discounted_shipping(0);
        }
    }

Review some of the other plugins if you feel like adding settings for the shipping option, or want to create a completely new plugin based on that existing one. I suggest putting it in the cartthrob > third_party > discount_plugins folder for ease of maintenance.

Here's some docs related to discount plugin creation: http://cartthrob.com/docs/developers/discount_plugins/index.html

0

So this was all confusing. Turns out all the client needed to do was set the amount that shipping should be free in their shipping settings. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.