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

Default Product Tax Class
 
thesluug
Jr. Member
 
Total Posts:  3
Joined:  2008-10-29
 

Hi

This issue appears only once on the forum, unresolved, and somewhat ambiuous, so I’m hoping that a little more detail will help clarify this issue.

THE REASON
We’ve setup a ‘Taxable Goods’ tax class for all products such that when the user goes to checkout, a rate of 7% should be added to all products in their basket if they are within the New Jersey region. The tax is applied to the product price, NOT the shipping.

THE PROBLEM
We have 1000 products in the system, all of which need this Tax Class applied. But when you view an individual product tax information in admin (Catalog->Manage Products->PRODUCT->Prices) the Tax Class default is not set ("Please Select...") and indicates a default is being taken from the [WEBSITE] configuration.

However, there is nowhere within the [WEBSITE] configuration that allows me to set the default product Tax Class. There are only options for setting defaults for the Shipping Tax.

The only way we have been able to make the Tax Class apply is to go through each product individually and manually set the drop down to the Tax Class that we require, but this seems ludicrous and will take hours to complete, not to mention all the products we have still to add to the system now and in the future.

PLEASE HELP
Where or how can we set the catalog such that ‘every product’ automatically assumes the ‘product’ Tax Class that we have defined?

We were hoping an upgrade from 1.2 to 1.3 would resolve the issue, but to no avail.

Many thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
thesluug
Jr. Member
 
Total Posts:  3
Joined:  2008-10-29
 

any gurus out there who can help with this one? wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Track 23
Member
 
Total Posts:  50
Joined:  2008-03-19
 

I’m looking for where to set a default tax class as well (1.3.0). Unfortunately I haven’t found it, however I do have a suggestion for you in the meantime (though it’s probably way too late as this post is several months old). Instead of going through and updating each product individually you can just click “Select All” on the Catalog > Manage Products page and then select “Update Attributes from the Actions drop-down menu and press the Submit button. Then you can bulk update individual attributes for all products.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pennybuster
Jr. Member
 
Total Posts:  4
Joined:  2009-11-24
 

The following changes to the db should work to set default value for tax_class_id and is_active variables, but sadly it doesn’t:

UPDATE ‘db_name’.’eav_attribute’ SET ‘default_value’ = ‘1’ WHERE ‘eav_attribute’.’attribute_id’ =85 LIMIT 1 ;
UPDATE ‘db_name’.’eav_attribute’ SET ‘default_value’ = ‘1’ WHERE ‘eav_attribute’.’attribute_id’ =34 LIMIT 1 ;

The default value for is_active would be “enabled”, and for tax_class_id, it’d be “none”.

This approach is based on the fact that the visibility variable’s default value is set to 4 and it works. The default value here is “Catalog, Search”.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bogislaw
Member
 
Total Posts:  63
Joined:  2009-07-29
 

Two ways to do this:

1. Select all products, select “Update Attributes” in the dropdown, click Submit, assign Tax Class, save.

2. Export SKU and Tax Class of all Products, insert your Tax Class, import.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Scott
Guru
 
Avatar
Total Posts:  333
Joined:  2007-08-31
Northwest Ohio
 

Thanks to pennybuster pointing the way, and now that I’ve figured this out I thought I’d share.

First off, it’s not is_active that you want to set the default_value to ‘1’ because that attribute applies to categories not products. If you want to make categories default to active though, that’d be how to do it I suppose. So to get products’ status to default to “Enabled” you’ll want to set the default_value of the status attribute to 1 (naturally). It’s the attribute that comes right before tax_class_id.

Also, I was having issues getting the Tax Class dropdown to select “None” as the default as well, using ‘1’ as the default value. So for fun I tried setting it to ‘2’ and I found that it selected the tax class with an ID of ‘2’. Turns out there’s no tax class with an ID of ‘1’ after all! So I figured, maybe the value “None” defaults to ‘0’. Thus, I set the tax_class_id attribute to ‘0’ and it worked! So to set the default value of Tax Class to “None” you’ll want to set it’s default_value column to 0 instead of 1.

Also, in my case, the status and tax_class_id attributes had an attribute_id of 80 and 81 respectively. Thus, since the IDs of the proper attributes may vary between Magento versions and installations, instead of setting the default_value fields by attribute_id, it’s better to do it by attribute code, so that you don’t inadvertently assign the value to the wrong attribute!

Here’s some code that’s almost certainly compatible to run on your install:

/* Alternately, you could just use PHPMyAdmin to edit the values directly, via a simple web form. */
UPDATE  `db_name`.`eav_attributeSET  `default_value` =  '1' WHERE  `eav_attribute`.`attribute_code` = 'status' LIMIT 1 ;
UPDATE  `db_name`.`eav_attributeSET  `default_value` =  '0' WHERE  `eav_attribute`.`attribute_code` = 'tax_class_id' LIMIT 1 ;

It may also be helpful to set up defaults for your inventory quantity and stock availability attributes (e.g. In Stock instead of the default Out of Stock), because you’re creating a product to sell in most cases, and you don’t want to create it to sit around and be invisible, right? I found this thread helpful for setting up those defaults, which are handled in a different DB table: http://www.magentocommerce.com/boards/viewthread/11001/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Whiteseven
Jr. Member
 
Total Posts:  19
Joined:  2009-07-22
 

I was trying to set the default tax, but not to none, but another option in the dropdown. When i did what Scott said, the option None appeared, but 1, or 2 did not work.

So i checked the source code of the dropdown and noticed the following:

<option value="">-- Please Select --</option>
<option value="0">None</option>
<option value="5">Hoog</option>
<option value="6">Laag</option>
<option value="7">Vrij</option>

In my case the option i need in “Hoog”. So when i set 5 instead of 0, it is work perfect. I hope this helps if you’re just like me looking for a solution.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top