2

Hello everybody,

I need to for my webshop to have free shipping when you buy 3 or more products. When you buy less then 3 product it will cost you €6,75. I have made the free shipping and flat rate through admin>system>configuration but now it show free shipping and flat rate. Costumers can choose which one they want. I have set miminum amount of products to 3 by free shipping but that doesn't work. When i put 1 product in my cart and go to Shipping Method i still see both. Does anybody knows how to fix this? Tnx

Tnx guys for helping me with this problem. It's working now. Instead of working with products i did it with price.I took the amount between the prices of 2 and 3 products

enter image description here

enter image description here

1

Create a custom shipping method for this.
See here a tutorial on how to do it..

The only thing you need to change is the collectRates method.
Make it look like this:

public function collectRates(Mage_Shipping_Model_Rate_Request $request)
  {
    // skip if not enabled
    if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
        return false;
    }
     $result = Mage::getModel('shipping/rate_result');
     // create new instance of method rate
     $method = Mage::getModel('shipping/rate_result_method');
      // record carrier information
      $method->setCarrier($this->_code);
      $method->setCarrierTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/title'));

      // record method information
      $method->setMethod($this->_code);
      $method->setMethodTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/title'));

      //calculate the price:
      $itemsCount = 0;
      foreach ($request->getAllItems() as $item){
           //get only real products
           if (!$item->getParentItemId()) {
               $itemsCount++;
           }
      }
      if ($itemsCount >= 3) {
          $price = 0;
      }
      else {
          $price = 6.75; //or you can use a config value
      }


      $method->setPrice($price);
      $result->append($method);
    }

    return $result;
  }
1

The minimum amount for free shipping method in system configuration is the product price amount, not product quantity. You can achieve this using shopping cart price rules. Create a new rule, and under the conditions tab select Total Items Quantity equals or greater than 3, and under the actions tab, select Free Shipping for Shipment with matching items. This way, you can add multiple items with different quantity (ex. 3 items with qty. 1), and the final quantity in the cart will count (in this case 3). This method has been tested in magento 1.8.1 enter image description here enter image description here

  • I did that but it didn't work. i still see both flat rate and free shipping – user3047147 Jul 9 '14 at 9:43
  • did you remove the initial settings for free shipping? – Alex Dinca Jul 9 '14 at 9:47
  • I only have free shipping enabled yes the rest is empty in de configuration – user3047147 Jul 9 '14 at 9:52
  • try disabling the free shipping method – Alex Dinca Jul 9 '14 at 10:05
  • tried that but it didnt work – user3047147 Jul 9 '14 at 14:32

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.