3

kan anyone tell me if/how its possible to predefine some default values when creating a product.

Like: default taxclass, product is "visible" and "in stock".

I hope someone can help me.

Ik have magento 1.6.2 CE

Ronny
  • 531
  • 14
  • 36

2 Answers2

1

Probably via config files.

Try, in app/etc/local.xml (or in any config.xml in local/your_package/one_of_your_module/etc/config.xml:

<default>
    <cataloginventory>
        <item_options>
            <is_in_stock>1</is_in_stock>
        </item_options>
    </cataloginventory>
</default>

Not sure about tax_class_id and visibility, but you may try & go with config.xml as well in order to set or change default values.

zebulon
  • 158
  • 2
  • 7
  • This doesn't work for me. I tried it in local.xml and config .xml (in app/etc/) Any other suggestions? – Ronny Apr 07 '12 at 13:27
  • I just tried in app/etc/local.xml and it works as expected. Also, I did not mention it but the whole should be within the tag of course. Also, try & refresh your cache. Let us know. – zebulon Apr 07 '12 at 22:27
  • This works .... thanks But now i would like to have tax by default on "Hoogtarief" and status "on" – Ronny Apr 08 '12 at 13:35
0

Have a look Ian Baxter's Blog post: Setting Default Product Values in Magento