Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
How to activate free shipping for individual products? 
 
EspressoItalia
Jr. Member
 
Total Posts:  6
Joined:  2008-11-24
 

Hi Everyone

We have recently moved one of our websites over to Magento, but we are just trying to work out if it is possible to activate free shipping for individual products. I know in the backend of Magento you can activate free shipping for orders above a certain $ amount, but i haven’t found a way to activate this feature for an individual product or group of products. Sorry if this is a stupid questions, im just trying to get a grasp of the new system!

Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

Out of the box, that can’t be done with Magento.
But some of the best shipping extensions around are from Webshopapps, and this one:
http://www.magentocommerce.com/extension/1357/product-matrix-shipping will do what you want, and has terrific support from the author, Karen.

No connection to Webshopapps, other than a very happy user and admirer!

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebShopApps
Guru
 
Avatar
Total Posts:  460
Joined:  2008-05-30
London, UK
 

Hi,

Just seen this post. Yes I have extensions in this space - if you need to say offer Free Shipping on some products when using live rates (e.g. UPS) for the rest then you are looking at something like the Shipping Override extension. Shipping Override has a lot of options around manipulating live rates.

If you have a store defined set of rates (e.g. you are using Matrixrate table rate solution) then you are looking more towards ProductMatrix will allows a mass of features around custom rate handling - there really isn’t anything better on the market.

See webshopapps.com for demos and screencasts.

Contact me with your requirements and I’ll advise as to your options. I can even give you a personalised demo to play with if required.

Rgds

Karen

 
Magento Community Magento Community
Magento Community
Magento Community
 
szotyi
Sr. Member
 
Total Posts:  153
Joined:  2008-11-29
 

admin: catalog/attributes/manage attributes
click create attribute and set:
Attribute Code: freeshipping
Catalog Input Type for Store Owner: Yes/No
Click Manage Label/Options tab
Set admin to: Free Shipping
Save

admin: catalog/attributes/manage attributes sets
select default (or what you need)
from the third column drag freeshipping and drop to the second column (general folder) save it

admin/catalog/manage products
select some products by clicking the checkboxes at the left
go to Actions (near to Add product at the top right corner), select update attributes, click submit
find ‘free shipping’, click the chekbox change, then set the dropdown to yes
save

admin: promotion shopping cart rules
click add new rule and set
Rule name: Freeshipping
Status: Activate
Customer Groups: select all (with shift)
Click Conditions tab
Click the green plus symbol
select ‘product attribute combination’
click on the FIRST green plus symbol
select ‘Free shipping’
click on the free dots, and type: 1
click actions tab
find Free shipping: choose the second if you want to have the free shipping only for those products or the third one if you want to have it for the entire order…
save

admin system/configuration/shipping methods/ disable free shipping

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mike
Member
 
Total Posts:  43
Joined:  2007-09-11
Los Angeles, CA
 

I love the idea of szotyi’s solution.
Unfortunately, it did not work for me—but, perhaps, that is because I am using Multiple Tablerates (that calculate shipping based upon the total cost of items in the cart). Is there a way to make it work with multiple tablerates?

ALSO: I found that, to get szotyi’s solution to work, when creating the attribute, you must set “Use for Price Rule Conditions” to “Yes”

To help clarify szotyi’s solution for anyone else that wishes to try it, here is the full (and corrected) sequence:

Within your Magento administration area:

1. Navigate to: Catalog > Attributes > Manage Attributes

2. Click “Add New Attribute” and use the following settingst:
- Attribute Code: freeshipping
- Catalog Input Type for Store Owner: set to “Yes/No”
- Under “Frontend Properties” set ‘Use for Price Rule Conditions’ to “Yes”
- Click the “Manage Label / Options” tab
- For admin enter the name: Free Shipping
- Click “Save Attribute”

3. Now navigate to: Catalog > Attributes > Manage Attribute Sets
- Select the attribute set you desire (’default’ or which ever attribute set you’d like to add ‘freeshipping’ to)
- From the third column ("Unassigned Attributes") drag the ‘freeshipping’ attribute and drop it into the folder of your choice ("General" for example) within the second column ("Groups")
- Click “Save Attribute Set”

4. Now navigate to: Catalog > Manage Products
- Select some products by clicking the checkboxes at the left
- Go to Actions (near to Add product at the top right corner), select “Update Attributes,” then click “Submit”
- Find ‘free shipping’, check the “Change” checkbox to enable changing of that attribute, then set the dropdown to “Yes”
- Click “Save”

5. Now navigate to: Promotions > Shopping Cart Price Rules
- Click “Add New Rule” and use the following settings:
- Rule name: Freeshipping
- Status: Active
- Customer Groups: select all (with shift)
- Click “Conditions” tab
- Click the green plus symbol
- Select ‘Product Attribute Combination’
- Click on the FIRST green plus symbol
- Select ‘Free shipping’
- Click on the three dots, and type: 1 (one equates to “Yes” in this instance, meaning that the condition is searching for products where “Freeshipping” is set to “YES")
- Click the “Actions” tab
- Find “Free shipping,” choose “For Matching Items Only” if you want to have the free shipping only for products set to allow free shipping or select “For shipment with matching items” if you want to remove shipping for the entire order.
- Click “Save Rule”

6. Finally, navigate to: System > Configuration > Shipping Methods
- Make sure that the “Enabled” option for the “Free Shipping” shipping method is set to “No”

Hope this works for someone! Please post here to report of success/failure to help out others.
Again, it didn’t work for me, but that could be because I’m using Multiple Tablerates.

I’d still love to find a solution that allows me to override the shipping for individual items when using multiple tablerates. Karen/birches extensions (listed above) look great; but are just too pricey (when converting to US dollars, I guess) to make them work for me. :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
szotyi
Sr. Member
 
Total Posts:  153
Joined:  2008-11-29
 

So if you want to enable FREE Shipping, and hide any other shipping method if there is minimum one item in the shopping cart that has free shipping then do:

Within your Magento administration area:

1. Navigate to: Catalog > Attributes > Manage Attributes

2. Click “Add New Attribute” and use the following settings:
- Attribute Code: freeshipping
- Catalog Input Type for Store Owner: set to “Yes/No”
- Click the “Manage Label / Options” tab
- For admin enter the name: Free Shipping
- Click “Save Attribute”

3. Now navigate to: Catalog > Attributes > Manage Attribute Sets
- Select the attribute set you desire (’default’ or which ever attribute set you’d like to add ‘freeshipping’ to)
- From the third column ("Unassigned Attributes") drag the ‘freeshipping’ attribute and drop it into the folder of your choice ("General" for example) within the second column ("Groups")
- Click “Save Attribute Set”

4. Now navigate to: Catalog > Manage Products
- Select some products by clicking the checkboxes at the left
- Go to Actions (near to Add product at the top right corner), select “Update Attributes,” then click “Submit”
- Find ‘free shipping’, check the “Change” checkbox to enable changing of that attribute, then set the dropdown to “Yes”
- Click “Save”

5. Now navigate to: System > Configuration > Cache Management
- Find Rebuild Catalog Index, Click Rebuild
- Find Search Index, Click Rebuild

6. Now navigate to: System > Configuration > Shipping Methods
- Select ‘Free Shipping’
- Make sure that the “Enabled” option is set to “YES!!”
- Make sure that ‘Minimum order amount’ is set to 0
- Make sure that Sort order is set to 0

7. Select ‘Table Rates’ *
- Make sure that the “Enabled” option is set to “YES!!”
- Make sure that Sort order is set to 1 (or any other number which is greater than 0)
* repeat the step 7 for all methods you want to enable…

8. Finally, app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml
change it to:

<?php if (!($_shippingRateGroups $this->getShippingRates())): ?>
    
<strong><?php echo $this->__('Sorry, no quotes are available for this order at this time.'?></strong>
<?php else: 
$items Mage::getSingleton('checkout/session');
$items $items->getQuote()->getAllItems();
$product    Mage::getModel('catalog/product');
$disableFreeShipping true;
foreach (
$items as $item
  $product
->load($product->getIdBySku($item->getSku()));
  if (
$product->getData('freeshipping')== 1$disableFreeShipping false;

  
/* For test purpose!! comment out if you finished testing
   returns the cart items
   product name and after 0 or 1. => 0: no free shippping for the item, 1: free shipping for the item
  */
  
echo $product->getName(). ' '.$product->getData('freeshipping') .'<br />';
  
/* END of for test purpose */
}
if ($disableFreeShipping) unset($_shippingRateGroups['freeshipping']);
?>
<dl class="shipment-methods">
    
<?php foreach ($_shippingRateGroups as $code => $_rates): ?>
        
<dt><?php echo $this->getCarrierName($code)?></dt>
        <
dd>
            <
ul>
            
<?php foreach ($_rates as $_rate): ?>
                
<li>
                   
<?php if ($_rate->getErrorMessage()): ?>
                    
<ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
                   
<?php else: ?>
                        
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> />
                        <
label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
                        
<strong>
                        
<?php $_excl $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
                        <?php $_incl 
$this->getShippingPrice($_rate->getPrice(), true); ?>

                        <?php 
echo $_excl?>
                        <?php 
if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                            
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl?>)
                        
<?php endif; ?>
                        
</strong>
                        </
label>
                   
<?php endif ?>
                
</li>
            
<?php endforeach; ?>
            
</ul>
        </
dd>
        
<?php if ($code == 'freeshipping') break; ?>
    <?php 
endforeach; ?>
</dl>
<?php endif; ?>
Note 1 i had a problem, first that $product->getData(’freeshipping’) always returned 1, even the product had no freeshipping enabled! Probably it is cache problem, so I had to select all of my products under catalog/manage products, and set free shipping to NO, like in step 4, and after you can do the step 4 again to enable for certain products.
Note 2 if you enabled the Estimate Shipping Cost, in the Cart page, the free shipping will show up also! you can google and find how to hide it!
thank you Mike!
 
Magento Community Magento Community
Magento Community
Magento Community
 
szotyi
Sr. Member
 
Total Posts:  153
Joined:  2008-11-29
 

i went a little deeper in this subject…

if you do not want to offer free shipping for all items, only to the ones you have set up, and you are using table rates shipping method:

if you have weight vs. destination price rates, then the first method should work. (only the admin setup, with shopping cart price rule).

but if you have table rates with price vs. destination rates then it is not working as Mike said.

follow this instructions:
http://www.magentocommerce.com/boards/viewthread/69076/#t205761
then
app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php
something like that:
find:

foreach ($items as $item{
replace with:
$oldPrice $address->getBaseSubtotal();
        
$freeValue 0;
        
$product    Mage::getModel('catalog/product');
        
        foreach (
$items as $item{
            $product
->load($product->getIdBySku($item->getSku()));
             if (
$product->getData('freeshipping')== 1$freeValue += $item->getRowTotalWithDiscount();
find:
$address->setFreeMethodWeight($freeMethodWeight);
after insert:
$address->setBaseSubtotal($address->getBaseSubtotal() - $freeValue);
find:
$address->setGrandTotal($address->getGrandTotal() + $address->getShippingAmount());
before insert:
$address->setBaseSubtotal($oldPrice);
 
Magento Community Magento Community
Magento Community
Magento Community
 
Mike
Member
 
Total Posts:  43
Joined:  2007-09-11
Los Angeles, CA
 

szotyi: THANK YOU.

This solution is completely awesome & successful!

Following your instructions for the “price vs. destination rates” set-up, I was able to get the “free shipping” to work on a single item without affecting the shipping on other products that might be in the cart at the same time.

I should only note that, to get this to work, I had to:
- add the “Free Shipping” attribute to ALL of my attribute sets & set a definite “yes” or “no” selection for each product (which can be performed by checking all the necessary products and using the “Actions: Update Attributes” tool in the upper-right of the “Manage Products” section).
- add a rate to the multiple tablerate CSV file for a value “up to” $0.01 (making it possible for the cart to process an order with a value of less than 1 cent at $0.00 for shipping); otherwise it was defaulting to the lowest value (which still included a shipping charge).

I add these notes for anyone else following szotyi’s incredibly helpful instructions.

szotyi: Thanks again. People like you make Magento work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
R22B
Sr. Member
 
Total Posts:  76
Joined:  2008-06-12
 

I wrote a similar tutorial a while ago. Figured I’d throw it in for good reference for people:
http://r22b.com/writings/magento-free-shipping-without-coupons/

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

Finding that if the product has custom options, that this rule is completely ignored...?

## EDIT

Ok, so this is because the item ids are got by SKU.

If an SKU has been defined in the custom options, then the SKU is no longer in the catalog. Hence why it no longer works.

So i need a better way of getting the item id’s without using the SKU’s.

Possible do we think?

 
Magento Community Magento Community
Magento Community
Magento Community
 
greendezine
Jr. Member
 
Total Posts:  9
Joined:  2010-03-10
 

Great info. But sad to say it doesn’t work with UPS live rates. Looks like I’ll have to purchase, yet another, extension for that :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
chris_s
Jr. Member
 
Total Posts:  4
Joined:  2010-03-30
 

Jen found a good extension-free solution for free shipping on one or a few products.
http://www.regularjen.com/archives/2010/06/11/free-shipping-on-a-single-item-in-magento/
It worked great for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PoweredProduction
Jr. Member
 
Total Posts:  4
Joined:  2009-09-18
 

Following all of the notes here - it can be done out of the box, you just have to make sure that the Attribute that you create is available for a promo rule, or it won’t be visible in the list of promo rules…

I just added this to one of our prominent products and made a sale! 
Thanks for everyone’s help - this is why I love Mage!

b

 
Magento Community Magento Community
Magento Community
Magento Community
 
Greg Demetrick
Member
 
Avatar
Total Posts:  64
Joined:  2009-03-31
Burlington, VT
 
szotyi - 15 January 2010 12:10 AM

find:

foreach ($items as $item{
replace with:
$oldPrice $address->getBaseSubtotal();
        
$freeValue 0;
        
$product    Mage::getModel('catalog/product');
        
        foreach (
$items as $item{
            $product
->load($product->getIdBySku($item->getSku()));
             if (
$product->getData('freeshipping')== 1$freeValue += $item->getRowTotalWithDiscount();

This is so incredibly close to what I need but just need a small push. Lets say I didn’t want to check for a “free shipping” attribute in the product but I wanted to check against the Shopping Cart Price Rule instead. What would I check for in the if statement?

We have several reasons for not wanting to do this against an attribute. First, we have a fairly large number of attributes right now and adding “free shipping” is one that could get easily lost. Second, it seems like I should be able to check the product against the Price Rule on a per item basis to see if it should get free shipping if “for matching items only” is selected in the rule. Finally, if I want to set an entire Category to Free Shipping I can create a Price Rule to do this by selecting the category which is easier than selecting all the products and doing a mass update of the attribute.

I have tried the following check but it does not seem to be getting caught. My feeling is it shoudl be some version of the first item in this check:

foreach ($items as $item{
            $product
->load($product->getIdBySku($item->getSku()));
             if (
$item->getFreeShipping()===true || is_numeric($child->getFreeShipping()) 
             || 
$child->getFreeShipping()===true || $freeAddress$freeValue += $item->getRowTotalWithDiscount();

Any help on this would be greatly appreciated!
-------------
SOLVED: The issue wasn’t with the checking for the promo. It was that $item->getRowTotalAfterDiscount() always returns 0.00. SO the if statement was working and 0 got deducted. When I changed this to $item->getRowTotal() it worked as it should.

NOTE: I am on EE 1.9.1.1 which may have different ways of processing Promotion rules than CE does. You may still be required to check this against an Attribute in CE but I think that should not be the case. I know that I did not have to do the modification for getGrandTotal because it does not exist in my version of the code. Your mileage may vary.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PyroZuki
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2011-09-22
Montana
 

I have issues with the lines I’ve colored red.

For number 4, after followin the steps in red, the check box does not stay checked after savin.

“4. Now navigate to: Catalog > Manage Products
- Select some products by clicking the checkboxes at the left
- Go to Actions (near to Add product at the top right corner), select “Update Attributes,” then click “Submit”
- Find ‘free shipping’, check the “Change” checkbox to enable changing of that attribute, then set the dropdown to “Yes”
- Click “Save"”

For number 5, I don’t get the option for “Free Shipping”, but I would think that’s because the check box from the product does not stay checked.

“5. Now navigate to: Promotions > Shopping Cart Price Rules
- Click “Add New Rule” and use the following settings:
- Rule name: Freeshipping
- Status: Active
- Customer Groups: select all (with shift)
- Click “Conditions” tab
- Click the green plus symbol
- Select ‘Product Attribute Combination’
- Click on the FIRST green plus symbol
- Select ‘Free shipping’
- Click on the three dots, and type: 1 (one equates to “Yes” in this instance, meaning that the condition is searching for products where “Freeshipping” is set to “YES")
- Click the “Actions” tab
- Find “Free shipping,” choose “For Matching Items Only” if you want to have the free shipping only for products set to allow free shipping or select “For shipment with matching items” if you want to remove shipping for the entire order.
- Click “Save Rule"”

Any help would be greatly appreciated!

Thanks again,
Pyro

 
Magento Community Magento Community
Magento Community
Magento Community
 
thejbster
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2009-08-02
 

Hi everyone,

I managed to get this to work using a slight variation on what was posted above by Mike and Szotyi (thank you smile). It works for me alongside the following methods which I have set up in System->Configuration->Shipping Methods :

Flat Rate - enabled for local orders
Table Rate - International rates by destination
Free shipping - on local orders over £50

The original method posted by Mike always made the shipping free if any product in the basket had the Free Shipping attribute set to yes, even though the For Matching Items Only choice was made in the shopping cart price rule.

Anyway the process is as follows (I’ve highlighted the changed bits in bold):

Within your Magento administration area:

1. Navigate to: Catalog > Attributes > Manage Attributes

2. Click “Add New Attribute” and use the following settings:
- Attribute Code: freeshipping
- Catalog Input Type for Store Owner: set to “Yes/No”
- Under “Frontend Properties” set ‘Use for Price Rule Conditions’ to “Yes”
- Click the “Manage Label / Options” tab
- For admin enter the name: Free Shipping
- Click “Save Attribute”

3. Now navigate to: Catalog > Attributes > Manage Attribute Sets
- Select the attribute set you desire (’default’ or which ever attribute set you’d like to add ‘freeshipping’ to)
- From the third column ("Unassigned Attributes") drag the ‘freeshipping’ attribute and drop it into the folder of your choice ("General" for example) within the second column ("Groups")
- Click “Save Attribute Set”

4. Now navigate to: Catalog > Manage Products
- Select some products by clicking the checkboxes at the left
- Go to Actions (near to Add product at the top right corner), select “Update Attributes,” then click “Submit”
- Find ‘free shipping’, check the “Change” checkbox to enable changing of that attribute, then set the dropdown to “Yes”
- Click “Save”

5. Now navigate to: Promotions > Shopping Cart Price Rules
- Click “Add New Rule” and use the following settings:
- Rule name: Freeshipping
- Status: Active
- Customer Groups: select all (with shift)
- Click the “Actions” tab
- Find “Free shipping,” choose “For Matching Items Only” if you want to have the free shipping only for products set to allow free shipping or select “For shipment with matching items” if you want to remove shipping for the entire order.
- Click the green plus symbol
- Select ‘Product Attribute Combination’
- Click on the FIRST green plus symbol
- Select ‘Free shipping’
- Click on the three dots, and type: 1 (one equates to “Yes” in this instance, meaning that the condition is searching for products where “Freeshipping” is set to “YES")

- Click “Save Rule”

Hope this helps someone!

thejbster

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2