VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: VictorTpo on August 27, 2013, 18:27:09 PM

Title: Where is the INSERT of a product
Post by: VictorTpo on August 27, 2013, 18:27:09 PM
Hello,

I want to add some code when a product is add in database (INSERT). But I can't find the file where this action is done.
Do you know the name of this file ?

Regards,

Victor
Title: Re: Where is the INSERT of a product
Post by: franzpeter on August 27, 2013, 19:09:12 PM
What kind of code do you mean? You can for example add code into the product description or you can create a custom field to enter code.
Title: Re: Where is the INSERT of a product
Post by: VictorTpo on August 28, 2013, 10:19:04 AM
When I add a product, I want to link it with a lot of custom field.

Actualy when if I choose a manufacturer ( ex : "manuf1" ), when I save the product I will add (with code) a lot of custom field (I had some data in virtuemart_product_customfields table).
I write my code in administrator/components/com_virtuemart/controllers/product.php, at the end of the function save($data = 0). But it is a controller, I think it is not the place to work on database. So I search a function call in models when I save a product.