Support is online

No VM product inserts, only updates #8086

Open maik85 opened this topic Friday, 04 March 2016 · 3 replies
Author

Hi Roland,

CSVI don't create new products. The log said CSVI uses an update query, but must use an insert for new products. Skip new items is set to NO.

Regards,
Maik

Support

Hello Maik,

You are using the primary key of the product table, virtuemart_product_id, this forces the system to always do an update. That is why we always suggest to use the product_sku as unique product identifier and not use database IDs.

Once you start controlling the database controlled IDs, it can become unpredictable.

Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hello Roland,

Yes it can, but we must use the ID. Where is this written in the code?

Support

Hello Maik,

There are 3 options, modify the Joomla core code where it happens:

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/table/table.php#L800

or change the override that calls the Joomla code. This is located in the file administrator/components/com_csvi/tables/default.php on line 154.

$result = parent::store($updateNulls);

or leave the database IDs alone and use the gtin or mpn field with your own IDs to manage the products. That is not viable?

Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Log in to reply to this topic.