Magento : Livraison offerte avec Kiala Locate And Shipping

Voici comment rendre l’excellent module « Kiala Locate And Shipping » compatible avec les promotions « Livraison offerte »

( Attention fonctionne uniquement si l’utilisation des grilles tarifaires est désactivée )

Editer le fichier :
app/code/community/Kiala/LocateAndSelect/Model/Carrier/Kiala.php

La modification est à apporter dans la fonction « CollectRates »

/**
     * Collect rates via the original table rates and adapt to Kiala
     *
     * @param Mage_Shipping_Model_Rate_Request $data
     * @return Mage_Shipping_Model_Rate_Result
     */
    public function collectRates(Mage_Shipping_Model_Rate_Request $request)
    {
 
        if (!$this->kialaHelper()->isActive('frontend')) {
            return false;
        }
 
        if ($this->kialaHelper()->useTablerates()) {
            $result = parent::collectRates($request);
            if (!$result) {
                return false;
            }
            $method = current($result->getRatesByCarrier('tablerate'));
            if (!$method) {
                Mage::Log("Tablerate not initialised. To add shipping costs, configure magento's standard Tabelrate  shipping method without activating it."

Magento : Livraison offerte avec Kiala Locate And Shipping Lire la suite »