1

I've been asked to basically create 3 options of shipping costs, the first is a flat rate if customers spend say $500 or less it costs $10 no matter what products or customer type they are.

The second is when the customer spends over $500 the shipping fee is now 2% of the subtotal.

The third is the customer receives free shipping when the order is over $2000.

I know how to work the free shipping but I believe I need a new shipping method to accommodate for the percentage shipping fee so the first flat rate can't be an option when the customer spends over $500, how do I go about this?

I also face the dilemma of creating a percentage cost of the subtotal of the cart when customers spend between $501 - $2000. I have found extensions with allow this but is there an option that magento offers?

1 Answer 1

1

You can create your new shipping method by using this link : http://inchoo.net/magento/custom-shipping-method-in-magento/

After creating shipping method

protected function _getStandardRate(){

   $rate = Mage::getModel('shipping/rate_result_method');
   $subtotal = Mage::getSingleton('checkout/session')->getQuote()->getSubtotal();
   if($subtotal < 500){
      $price = 10;
   }elseif($subtotal > 500 && $subtotal < 2000){
      $price = ($subtotal * 2)/100 ;
   }elseif($subtotal > 2000){
      $price = 0;
   }

   $rate->setCarrier($this->_code);
   $rate->setCarrierTitle($this->getConfigData('title'));
   $rate->setMethod('large');
   $rate->setMethodTitle('Standard delivery');
   $rate->setPrice($price);
   $rate->setCost(0);

   return $rate;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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