For Consulting and Contact Information

For Consulting and Contact Information

If you'd like to contact me, or learn more about my Moodle, e-learning, and Blackboard consulting services, please make a quick trip to my new website at

Friday, May 7, 2010

Example of Using the Same Product Characteristic for a Category and an Attribute in Magento

This question came from someone in Iceland. It is a good example of how to use a category and an attribute, for the same product characteristic.

The administrator wants to enable customers to sort shoes by style, and then drill down into the size. He also wants his customers to be able to start with size, and then see the styles available. I have edited the original question and my answer for clarity, but the content is the same.



I have been reading your book - the first chapters. It has FAR better descriptions then the magento user manual...

Here is the setup I will be using:

I will have 2 stores (to begin with).

Store1 will sell clothes and Store2 will sell shoes.

What I am trying to figure out is what to do with attributes for shoes - I would add color to them and some other attributes.. But should i add Size to them as an attribute? Almost all our shoes come in the same sizes. So if a user clicks the size in Layered navigation the will show the customer all shoes we have anyway. What i need is for the customer to be able to click a size and then magento will show them all shoes that we have size and are also in stock. Say a user selects size 39 - the website should only show shoes that we still have in stock in that specific size... is that possible ?

I know i must add each shoe as a configurable product and then simple products for each size of that shoe (because i want to count stock on each and every size)

Regards, Hedinn


To enable customers to sort shoes by style, and then drill down into the size:

  1. Ceate a category for each style, such as high heels, pumps, sandals.
  2. Then, create an attribute for the size of the shoe. Make that attribute filterable in the navigation menu.
  3. For Position, enter 0 (zero). This will place Size at the top of the layered navigation menu, on the left side of the page.
Your customers will select a category to see the style of shoe they want. After they select the category, the layered navigation menu will display on the left side of the page. They will see Size at the top of that menu. Now, they can filter that shoe style by size, and see only their sizes.

To enable customers to see all shoes in their size:
  1. Create a category called Find Your Size.
  2. Put every pair of shoes that you have into that category.
Then when the customer clicks the Find Your Size category, she sees the layered navigation menu on the left. Remember, Size will be a filter at the top of that menu.

By the way, you're the first person who has written me from Iceland. Cool!


Magento Question About Applying Sales Tax Based on Amount of Purchase

I received a question about how to configure Magento to apply sales tax to only purchases that are above a speficied amount. The question and my answer are below.


Hello William Rice,

Ref Article:

First of all your article is really cool and help full. I gone through all the steps, but i'm unable to figure out how to set TAX based on Product cost?

I'm interested to learn how can we define TAX based on 'The amount' of the purchase. For example, some places tax clothing purchases only above a specific amount.

Criteria is like this:

  • TAX should be calculated if Product cost is higher than 150$.

  • if Product cost is less than or equal to 150$, TAX will be ZERO.

  • TAX Rate is 5.50%.

Could you please guide me how can i implement above criteria in Magento?

Thank You,




The most expedient way to apply a tax rate based upon a product's price, is
to create a product class for the products in that price range. In your
example, you would need to create a tax class for those items, such as
"Clothing items costing$150 and above." Then, you would apply that tax
class to all of the clothing items costing $150 and above.

This means you would need to search through your catalog, find every
clothing item that costs $150 or more, and apply the product class to that
item. To find all these items:

  1. Go to Catalog > Manage Products.

  2. The top row of the catalog listing, the one that is shaded in blue,
    is for your search criteria.

  3. For Price, enter From 150 To a very large number.

  4. You might also use the Attrib. Set Name field to find your
    clothing. It depends on how you have your catalog set up.

  5. Click Search and you will see the results.

  6. Using the check boxes to select all of the relevant clothing

  7. From the Actions drop-down menu select Update Attributes. Then
    click Submit.

  8. This brings you to an Attributes page. Whatever you change and save
    on this page, happens to all of your selected products.

  9. Select the tax class "Clothing items costing$150 and above."

  10. Save.

Note that when you change a clothing item's price, you'll need to also check
its tax class. This will just need to be part of the store admin's job. We
all would like to see functions like this automated, but until Magento lets
you include the price in a tax rule, this will require intervention by the
store administrator.

Hope this helps. Good luck in your e-commerce endeavors.

William Rice