1

I am using magento 1.4.1.1 and I use the regular API to generate products through an external ERP program. I have some reasons to check 3 values in the products backend manually, that this ERP program can't do for me through the magento API. That means i have to go into each product to check those 3 check-boxes and only after that the products is ready to buy.

How can i pre-check those values so i don't have to to this anymore? It's in the stockholding area of the product page.

Gowri
  • 16,587
  • 26
  • 100
  • 160
Michael Müller
  • 371
  • 6
  • 23
  • Are you trying to check 3 check-boxes when a product is created? – MagePal Extensions Nov 09 '12 at 19:26
  • Yes. The programm i use is generating those products and everything is fine after that, just the 3 boxes are unchecked. – Michael Müller Nov 09 '12 at 19:43
  • If the applications run on the same machine, you could include `Mage.php` and use the Magento methods directly. Or could alter the API to your needs (but create an extension to do so – don't mess up the core code). – feeela Nov 09 '12 at 19:50
  • No its a c++ app that sits localy on a win7 machine. we cant change the app. – Michael Müller Nov 09 '12 at 19:51
  • You could also setup an additional, access restricted PHP script on the shop-server, which is called via some URL after creating a product via the SOAP API. This script simply sets the three flags for a given product ID or SKU. – feeela Nov 09 '12 at 20:02

2 Answers2

1

What you could try is create a custom module with a observer that watch for newly added product

For list of product observer see Magento Add New product event observer

For how to create a custom module Change Magento default status for duplicated products (change catalog_model_product_duplicate to value from link #1)

For how to set stock see Set default product values when adding new product in Magento 1.7

(most of my example was base of magento v1.7 so you may have to look to see if it is the same in v1.4.1)

Community
  • 1
  • 1
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62
0

At least in Magento 1.6 and up it's possible to set default values for product attributes on a separate page in the backend.

Catalog -> Attributes -> Manage Attributes (/admin/catalog_product_attribute/)

If you can't edit a specific attribute, you need to mark that attribute as "user-defined" in the database. Set the column eav_attribute.is_user_defined to '1' for the desire attribute to enable editing in the backend.

feeela
  • 29,399
  • 7
  • 59
  • 71
  • I saw this but the funny thing is i dont see those attributes in there. – Michael Müller Nov 09 '12 at 20:01
  • Which attributes? Do you see them in the mentioned db table? – feeela Nov 09 '12 at 20:05
  • is that the table EAV attributes? – Michael Müller Nov 09 '12 at 20:06
  • i can only try to translate these values: in the magento/backend/ cataloge/products/ in there its the stockholding (thats translated by me) tab in there are 3 values allow stock configuration, mon order value, max order value – Michael Müller Nov 09 '12 at 20:09
  • Cant find it in EAV Attributes – Michael Müller Nov 09 '12 at 20:21
  • Are you talking about inventory management (Lagerverwaltung)? There is a global option in the Magento system configuration to have the same values for any products. Commonly I just use those global settings. – feeela Nov 09 '12 at 20:26
  • We have to use these values individually we have some sort of hack that allowes us to have products without price which are also not able to put into card. – Michael Müller Nov 09 '12 at 20:30
  • The inventory is not managed via product attributes but has its own tables. You need to edit the product's stock item data. An example to do so in Magento could be found in this answer: http://stackoverflow.com/a/7608195/341201 (Try to find a SOAP way of doing so…) – feeela Nov 09 '12 at 20:37