Can I make free shipping on a specified product in magento 1?












0















I need to create a new product which my customer need not to pay shipping amount for this (ex: free shipping), but, it doesn't work, here is the snapshot for your reference.



enter image description here










share|improve this question





























    0















    I need to create a new product which my customer need not to pay shipping amount for this (ex: free shipping), but, it doesn't work, here is the snapshot for your reference.



    enter image description here










    share|improve this question



























      0












      0








      0


      0






      I need to create a new product which my customer need not to pay shipping amount for this (ex: free shipping), but, it doesn't work, here is the snapshot for your reference.



      enter image description here










      share|improve this question
















      I need to create a new product which my customer need not to pay shipping amount for this (ex: free shipping), but, it doesn't work, here is the snapshot for your reference.



      enter image description here







      magento-1 free-shipping






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 52 mins ago









      Himanshu

      930521




      930521










      asked Jul 12 '18 at 5:21









      YKBYKB

      464




      464






















          1 Answer
          1






          active

          oldest

          votes


















          0















          If you want per product basis shipment then you can go with below
          approach




          There are ready extension available in market you can use directly.



          Free :
          https://github.com/micronax/magento-attributeshipping



          Paid :
          https://marketplace.magento.com/kaushik-distance-based-shipping-charge.html



          If you want to make your own then create basic shipping extension and with in that you can write down your collectRates as per your logic, you can take reference of below code for that



          class Fgits_Shipping_Model_Carrier_Customrate extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
          {
          protected $_code = 'fgits_customrate';
          protected $_isFixed = true;
          public function collectRates(Mage_Shipping_Model_Rate_Request $request)
          {
          if (!$this->getConfigFlag('active')) {
          return false;
          }
          if (!$destCountry = strtolower($request->getDestCountryId())) {
          return false;
          }
          $result = Mage::getModel('shipping/rate_result');
          // Some meta-information
          $method = Mage::getModel('shipping/rate_result_method');
          $method->setCarrier('fgits_customrate');
          $method->setCarrierTitle($this->getConfigData('title'));
          $method->setMethod('fgits_customrate');
          $method->setMethodTitle($this->getConfigData('name'));
          // Check if cart total exceeds setting value
          $maxCartValue = floatval($this->getConfigData('maxCartValue'));
          if ($maxCartValue > 0 && $this->getCartTotal() >= $maxCartValue) {
          return false;
          }
          // Calculate shipping cost
          if (!$orderShippingCost = $this->determineShippgingCost($destCountry)) {
          return false;
          }
          // Set shipping cost
          $method->setPrice($orderShippingCost);
          $method->setCost($orderShippingCost);
          $result->append($method);
          return $result;
          }
          public function getAllowedMethods()
          {
          return array('fgits_customrate' => $this->getConfigData('name'));
          }
          public function determineShippgingCost($countryCode)
          {
          $cart = $this->getCart();
          $cart_items = $cart->getAllItems();
          $_helper = Mage::helper('catalog/output');
          $fn_name = 'getShippingCost'.ucfirst($countryCode);
          $cartShippingCost = 0.0;
          foreach($cart_items as $items) {
          $cur_fproduct = Mage::getModel('catalog/product')->load($items->getProduct_id());
          if ($shippingCost = $_helper->productAttribute($cur_fproduct, $cur_fproduct->$fn_name(), 'shipping_cost'.$countryCode)) {
          if ($cartShippingCost < $shippingCost) {
          $cartShippingCost = $shippingCost;
          }
          } else return false;
          }
          return (float) $cartShippingCost;
          }
          private function getCartTotal() {
          $quote = $this->getCart();
          $items = $quote->getAllItems();
          foreach ($items as $item) {
          $priceInclVat += $item->getRowTotalInclTax();
          }
          return $priceInclVat;
          return Mage::helper('checkout')->formatPrice($priceInclVat);
          }
          private function getCart() {
          Mage::getSingleton('core/session', array('name'=>'frontend'));
          $session = Mage::getSingleton('checkout/session');
          return $session->getQuote();
          }
          }





          share|improve this answer
























          • Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

            – YKB
            Jul 12 '18 at 7:07











          • @YKB because may be your default currency is rupee , so in admin it always show your default currency

            – Murtuza Zabuawala
            Jul 12 '18 at 8:25











          • Great! How will I come to know what currency is default on my Magento?

            – YKB
            Jul 12 '18 at 8:30











          • @YKB follow this blog templatemonster.com/help/…

            – Murtuza Zabuawala
            Jul 12 '18 at 8:33











          • @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

            – Murtuza Zabuawala
            Jul 12 '18 at 14:13











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f233237%2fcan-i-make-free-shipping-on-a-specified-product-in-magento-1%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0















          If you want per product basis shipment then you can go with below
          approach




          There are ready extension available in market you can use directly.



          Free :
          https://github.com/micronax/magento-attributeshipping



          Paid :
          https://marketplace.magento.com/kaushik-distance-based-shipping-charge.html



          If you want to make your own then create basic shipping extension and with in that you can write down your collectRates as per your logic, you can take reference of below code for that



          class Fgits_Shipping_Model_Carrier_Customrate extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
          {
          protected $_code = 'fgits_customrate';
          protected $_isFixed = true;
          public function collectRates(Mage_Shipping_Model_Rate_Request $request)
          {
          if (!$this->getConfigFlag('active')) {
          return false;
          }
          if (!$destCountry = strtolower($request->getDestCountryId())) {
          return false;
          }
          $result = Mage::getModel('shipping/rate_result');
          // Some meta-information
          $method = Mage::getModel('shipping/rate_result_method');
          $method->setCarrier('fgits_customrate');
          $method->setCarrierTitle($this->getConfigData('title'));
          $method->setMethod('fgits_customrate');
          $method->setMethodTitle($this->getConfigData('name'));
          // Check if cart total exceeds setting value
          $maxCartValue = floatval($this->getConfigData('maxCartValue'));
          if ($maxCartValue > 0 && $this->getCartTotal() >= $maxCartValue) {
          return false;
          }
          // Calculate shipping cost
          if (!$orderShippingCost = $this->determineShippgingCost($destCountry)) {
          return false;
          }
          // Set shipping cost
          $method->setPrice($orderShippingCost);
          $method->setCost($orderShippingCost);
          $result->append($method);
          return $result;
          }
          public function getAllowedMethods()
          {
          return array('fgits_customrate' => $this->getConfigData('name'));
          }
          public function determineShippgingCost($countryCode)
          {
          $cart = $this->getCart();
          $cart_items = $cart->getAllItems();
          $_helper = Mage::helper('catalog/output');
          $fn_name = 'getShippingCost'.ucfirst($countryCode);
          $cartShippingCost = 0.0;
          foreach($cart_items as $items) {
          $cur_fproduct = Mage::getModel('catalog/product')->load($items->getProduct_id());
          if ($shippingCost = $_helper->productAttribute($cur_fproduct, $cur_fproduct->$fn_name(), 'shipping_cost'.$countryCode)) {
          if ($cartShippingCost < $shippingCost) {
          $cartShippingCost = $shippingCost;
          }
          } else return false;
          }
          return (float) $cartShippingCost;
          }
          private function getCartTotal() {
          $quote = $this->getCart();
          $items = $quote->getAllItems();
          foreach ($items as $item) {
          $priceInclVat += $item->getRowTotalInclTax();
          }
          return $priceInclVat;
          return Mage::helper('checkout')->formatPrice($priceInclVat);
          }
          private function getCart() {
          Mage::getSingleton('core/session', array('name'=>'frontend'));
          $session = Mage::getSingleton('checkout/session');
          return $session->getQuote();
          }
          }





          share|improve this answer
























          • Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

            – YKB
            Jul 12 '18 at 7:07











          • @YKB because may be your default currency is rupee , so in admin it always show your default currency

            – Murtuza Zabuawala
            Jul 12 '18 at 8:25











          • Great! How will I come to know what currency is default on my Magento?

            – YKB
            Jul 12 '18 at 8:30











          • @YKB follow this blog templatemonster.com/help/…

            – Murtuza Zabuawala
            Jul 12 '18 at 8:33











          • @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

            – Murtuza Zabuawala
            Jul 12 '18 at 14:13
















          0















          If you want per product basis shipment then you can go with below
          approach




          There are ready extension available in market you can use directly.



          Free :
          https://github.com/micronax/magento-attributeshipping



          Paid :
          https://marketplace.magento.com/kaushik-distance-based-shipping-charge.html



          If you want to make your own then create basic shipping extension and with in that you can write down your collectRates as per your logic, you can take reference of below code for that



          class Fgits_Shipping_Model_Carrier_Customrate extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
          {
          protected $_code = 'fgits_customrate';
          protected $_isFixed = true;
          public function collectRates(Mage_Shipping_Model_Rate_Request $request)
          {
          if (!$this->getConfigFlag('active')) {
          return false;
          }
          if (!$destCountry = strtolower($request->getDestCountryId())) {
          return false;
          }
          $result = Mage::getModel('shipping/rate_result');
          // Some meta-information
          $method = Mage::getModel('shipping/rate_result_method');
          $method->setCarrier('fgits_customrate');
          $method->setCarrierTitle($this->getConfigData('title'));
          $method->setMethod('fgits_customrate');
          $method->setMethodTitle($this->getConfigData('name'));
          // Check if cart total exceeds setting value
          $maxCartValue = floatval($this->getConfigData('maxCartValue'));
          if ($maxCartValue > 0 && $this->getCartTotal() >= $maxCartValue) {
          return false;
          }
          // Calculate shipping cost
          if (!$orderShippingCost = $this->determineShippgingCost($destCountry)) {
          return false;
          }
          // Set shipping cost
          $method->setPrice($orderShippingCost);
          $method->setCost($orderShippingCost);
          $result->append($method);
          return $result;
          }
          public function getAllowedMethods()
          {
          return array('fgits_customrate' => $this->getConfigData('name'));
          }
          public function determineShippgingCost($countryCode)
          {
          $cart = $this->getCart();
          $cart_items = $cart->getAllItems();
          $_helper = Mage::helper('catalog/output');
          $fn_name = 'getShippingCost'.ucfirst($countryCode);
          $cartShippingCost = 0.0;
          foreach($cart_items as $items) {
          $cur_fproduct = Mage::getModel('catalog/product')->load($items->getProduct_id());
          if ($shippingCost = $_helper->productAttribute($cur_fproduct, $cur_fproduct->$fn_name(), 'shipping_cost'.$countryCode)) {
          if ($cartShippingCost < $shippingCost) {
          $cartShippingCost = $shippingCost;
          }
          } else return false;
          }
          return (float) $cartShippingCost;
          }
          private function getCartTotal() {
          $quote = $this->getCart();
          $items = $quote->getAllItems();
          foreach ($items as $item) {
          $priceInclVat += $item->getRowTotalInclTax();
          }
          return $priceInclVat;
          return Mage::helper('checkout')->formatPrice($priceInclVat);
          }
          private function getCart() {
          Mage::getSingleton('core/session', array('name'=>'frontend'));
          $session = Mage::getSingleton('checkout/session');
          return $session->getQuote();
          }
          }





          share|improve this answer
























          • Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

            – YKB
            Jul 12 '18 at 7:07











          • @YKB because may be your default currency is rupee , so in admin it always show your default currency

            – Murtuza Zabuawala
            Jul 12 '18 at 8:25











          • Great! How will I come to know what currency is default on my Magento?

            – YKB
            Jul 12 '18 at 8:30











          • @YKB follow this blog templatemonster.com/help/…

            – Murtuza Zabuawala
            Jul 12 '18 at 8:33











          • @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

            – Murtuza Zabuawala
            Jul 12 '18 at 14:13














          0












          0








          0








          If you want per product basis shipment then you can go with below
          approach




          There are ready extension available in market you can use directly.



          Free :
          https://github.com/micronax/magento-attributeshipping



          Paid :
          https://marketplace.magento.com/kaushik-distance-based-shipping-charge.html



          If you want to make your own then create basic shipping extension and with in that you can write down your collectRates as per your logic, you can take reference of below code for that



          class Fgits_Shipping_Model_Carrier_Customrate extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
          {
          protected $_code = 'fgits_customrate';
          protected $_isFixed = true;
          public function collectRates(Mage_Shipping_Model_Rate_Request $request)
          {
          if (!$this->getConfigFlag('active')) {
          return false;
          }
          if (!$destCountry = strtolower($request->getDestCountryId())) {
          return false;
          }
          $result = Mage::getModel('shipping/rate_result');
          // Some meta-information
          $method = Mage::getModel('shipping/rate_result_method');
          $method->setCarrier('fgits_customrate');
          $method->setCarrierTitle($this->getConfigData('title'));
          $method->setMethod('fgits_customrate');
          $method->setMethodTitle($this->getConfigData('name'));
          // Check if cart total exceeds setting value
          $maxCartValue = floatval($this->getConfigData('maxCartValue'));
          if ($maxCartValue > 0 && $this->getCartTotal() >= $maxCartValue) {
          return false;
          }
          // Calculate shipping cost
          if (!$orderShippingCost = $this->determineShippgingCost($destCountry)) {
          return false;
          }
          // Set shipping cost
          $method->setPrice($orderShippingCost);
          $method->setCost($orderShippingCost);
          $result->append($method);
          return $result;
          }
          public function getAllowedMethods()
          {
          return array('fgits_customrate' => $this->getConfigData('name'));
          }
          public function determineShippgingCost($countryCode)
          {
          $cart = $this->getCart();
          $cart_items = $cart->getAllItems();
          $_helper = Mage::helper('catalog/output');
          $fn_name = 'getShippingCost'.ucfirst($countryCode);
          $cartShippingCost = 0.0;
          foreach($cart_items as $items) {
          $cur_fproduct = Mage::getModel('catalog/product')->load($items->getProduct_id());
          if ($shippingCost = $_helper->productAttribute($cur_fproduct, $cur_fproduct->$fn_name(), 'shipping_cost'.$countryCode)) {
          if ($cartShippingCost < $shippingCost) {
          $cartShippingCost = $shippingCost;
          }
          } else return false;
          }
          return (float) $cartShippingCost;
          }
          private function getCartTotal() {
          $quote = $this->getCart();
          $items = $quote->getAllItems();
          foreach ($items as $item) {
          $priceInclVat += $item->getRowTotalInclTax();
          }
          return $priceInclVat;
          return Mage::helper('checkout')->formatPrice($priceInclVat);
          }
          private function getCart() {
          Mage::getSingleton('core/session', array('name'=>'frontend'));
          $session = Mage::getSingleton('checkout/session');
          return $session->getQuote();
          }
          }





          share|improve this answer














          If you want per product basis shipment then you can go with below
          approach




          There are ready extension available in market you can use directly.



          Free :
          https://github.com/micronax/magento-attributeshipping



          Paid :
          https://marketplace.magento.com/kaushik-distance-based-shipping-charge.html



          If you want to make your own then create basic shipping extension and with in that you can write down your collectRates as per your logic, you can take reference of below code for that



          class Fgits_Shipping_Model_Carrier_Customrate extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
          {
          protected $_code = 'fgits_customrate';
          protected $_isFixed = true;
          public function collectRates(Mage_Shipping_Model_Rate_Request $request)
          {
          if (!$this->getConfigFlag('active')) {
          return false;
          }
          if (!$destCountry = strtolower($request->getDestCountryId())) {
          return false;
          }
          $result = Mage::getModel('shipping/rate_result');
          // Some meta-information
          $method = Mage::getModel('shipping/rate_result_method');
          $method->setCarrier('fgits_customrate');
          $method->setCarrierTitle($this->getConfigData('title'));
          $method->setMethod('fgits_customrate');
          $method->setMethodTitle($this->getConfigData('name'));
          // Check if cart total exceeds setting value
          $maxCartValue = floatval($this->getConfigData('maxCartValue'));
          if ($maxCartValue > 0 && $this->getCartTotal() >= $maxCartValue) {
          return false;
          }
          // Calculate shipping cost
          if (!$orderShippingCost = $this->determineShippgingCost($destCountry)) {
          return false;
          }
          // Set shipping cost
          $method->setPrice($orderShippingCost);
          $method->setCost($orderShippingCost);
          $result->append($method);
          return $result;
          }
          public function getAllowedMethods()
          {
          return array('fgits_customrate' => $this->getConfigData('name'));
          }
          public function determineShippgingCost($countryCode)
          {
          $cart = $this->getCart();
          $cart_items = $cart->getAllItems();
          $_helper = Mage::helper('catalog/output');
          $fn_name = 'getShippingCost'.ucfirst($countryCode);
          $cartShippingCost = 0.0;
          foreach($cart_items as $items) {
          $cur_fproduct = Mage::getModel('catalog/product')->load($items->getProduct_id());
          if ($shippingCost = $_helper->productAttribute($cur_fproduct, $cur_fproduct->$fn_name(), 'shipping_cost'.$countryCode)) {
          if ($cartShippingCost < $shippingCost) {
          $cartShippingCost = $shippingCost;
          }
          } else return false;
          }
          return (float) $cartShippingCost;
          }
          private function getCartTotal() {
          $quote = $this->getCart();
          $items = $quote->getAllItems();
          foreach ($items as $item) {
          $priceInclVat += $item->getRowTotalInclTax();
          }
          return $priceInclVat;
          return Mage::helper('checkout')->formatPrice($priceInclVat);
          }
          private function getCart() {
          Mage::getSingleton('core/session', array('name'=>'frontend'));
          $session = Mage::getSingleton('checkout/session');
          return $session->getQuote();
          }
          }






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 12 '18 at 5:35









          Murtuza ZabuawalaMurtuza Zabuawala

          12.4k73361




          12.4k73361













          • Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

            – YKB
            Jul 12 '18 at 7:07











          • @YKB because may be your default currency is rupee , so in admin it always show your default currency

            – Murtuza Zabuawala
            Jul 12 '18 at 8:25











          • Great! How will I come to know what currency is default on my Magento?

            – YKB
            Jul 12 '18 at 8:30











          • @YKB follow this blog templatemonster.com/help/…

            – Murtuza Zabuawala
            Jul 12 '18 at 8:33











          • @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

            – Murtuza Zabuawala
            Jul 12 '18 at 14:13



















          • Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

            – YKB
            Jul 12 '18 at 7:07











          • @YKB because may be your default currency is rupee , so in admin it always show your default currency

            – Murtuza Zabuawala
            Jul 12 '18 at 8:25











          • Great! How will I come to know what currency is default on my Magento?

            – YKB
            Jul 12 '18 at 8:30











          • @YKB follow this blog templatemonster.com/help/…

            – Murtuza Zabuawala
            Jul 12 '18 at 8:33











          • @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

            – Murtuza Zabuawala
            Jul 12 '18 at 14:13

















          Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

          – YKB
          Jul 12 '18 at 7:07





          Okay, let me see, and also why my magento showing rupee symbol in admin panel when i got an order from international store (dollar)?

          – YKB
          Jul 12 '18 at 7:07













          @YKB because may be your default currency is rupee , so in admin it always show your default currency

          – Murtuza Zabuawala
          Jul 12 '18 at 8:25





          @YKB because may be your default currency is rupee , so in admin it always show your default currency

          – Murtuza Zabuawala
          Jul 12 '18 at 8:25













          Great! How will I come to know what currency is default on my Magento?

          – YKB
          Jul 12 '18 at 8:30





          Great! How will I come to know what currency is default on my Magento?

          – YKB
          Jul 12 '18 at 8:30













          @YKB follow this blog templatemonster.com/help/…

          – Murtuza Zabuawala
          Jul 12 '18 at 8:33





          @YKB follow this blog templatemonster.com/help/…

          – Murtuza Zabuawala
          Jul 12 '18 at 8:33













          @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

          – Murtuza Zabuawala
          Jul 12 '18 at 14:13





          @YKB If my answer solves your concern then mark as accepted so future take benefit from this post

          – Murtuza Zabuawala
          Jul 12 '18 at 14:13


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f233237%2fcan-i-make-free-shipping-on-a-specified-product-in-magento-1%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Magento 2 controller redirect on button click in phtml file

          Polycentropodidae