Prestashop 1.5.3.1. free shipping

How to set a different free shipping border for each of my carriers? For exmple carrier 1: free shipping starts @ $100 carrier 1: free shipping starts @ $200

Upvotes: 1

Views: 1912

Answers (3)

Ok, that is not how I did it. I used the override to add a second free shipping price, then in cart.php i've connected it to a specific carrier(id) override:

'PS_SHIPPING_FREE_PRICE' => array(
                        'title' => $this->l('Free shipping starts at'),
                        'suffix' => $this->context->currency->getSign(),
                        'cast' => 'floatval',
                        'type' => 'text',
                        'validation' => 'isPrice'),
                    'PS_SHIPPING_FREE_PRICE2' => array(
                        'title' => $this->l('Free shipping2 starts at'),
                        'suffix' => $this->context->currency->getSign(),
                        'cast' => 'floatval',
                        'type' => 'text',
                        'validation' => 'isPrice'),
cart.php:

$configuration = Configuration::getMultiple(array( 'PS_SHIPPING_FREE_PRICE', 'PS_SHIPPING_FREE_PRICE2', 'PS_SHIPPING_HANDLING', 'PS_SHIPPING_METHOD', 'PS_SHIPPING_FREE_WEIGHT' ));

    // Free fees
        $free_fees_price = 0;
        if (isset($configuration['PS_SHIPPING_FREE_PRICE']))
            if($id_carrier==27)  
            $free_fees_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE2'], Currency::getCurrencyInstance((int)$this->id_currency));
        else
            $free_fees_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE'], Currency::getCurrencyInstance((int)$this->id_currency));

this is working fine for me, but every time you update your carrier, it gets new id, so you must update and cart.php Also its better to use the override for cart.php, but i just could not do it

Upvotes: 0

Jay Na
Jay Na

Reputation: 837

This is easy. Go to Back Office -> Shipping -> Price Ranges. You can add different ranges for each individual carrier. After creating all the ranges, click Shipping again. Scroll to bottom and you will see "Fees by carrier, geographical zone, and ranges". Voila!

Upvotes: 2

marius
marius

Reputation: 219

Edit the module to specific courier.

Upvotes: 1

Related Questions