1. konstantinos29
  2. RO CSVI
  3. Tuesday, 29 December 2020
  4.  Subscribe via email
Hello,

We have the following situation:

We want to mass update our product prices, based on the value of a custom field assigned to each product.
Say each product has a custom field: vendor_product_code.
This contains the product code for the product, from the vendor who provides the product to us. It is not visible to the customers.

We get an updated pricelist CSV with two columns: vendor_product_code and price (the latest updated price)

Can we update our product prices, based on vendor_product_code (instead of product_sku)?

Thanks

P.S. The import file may create products that do not exist in our store, will those simply be ignored? (as would be the desired scenario)

[Latest CSVi and everything]
Accepted Answer
Accepted Answer Pending Moderation
Hello,
Can we update our product prices, based on vendor_product_code (instead of product_sku)?

The import based on field is a field from #__virtuemart_products table which by default is set to product_sku. This field is used to get the viruemart_product_id so RO CSVI can insert or update a row in database. Since you are saying vendor_product_code is a custom field, it does not belong to #__virtuemart_products table. VirtueMart stores custom fields in #__virtuemart_custom table and product - custom field relations in #__virtuemart_product_customfields table. RO CSVI will not know on how to get virtuemart_product_id if vendor_product_code is set as import based on field. If you know virtuemart_product_id, you can use that instead of vendor_product_code to update the prices. The other way is to export the products with vendor_product_code and virtuemart_product_id, update the prices and import it back.

P.S. The import file may create products that do not exist in our store, will those simply be ignored? (as would be the desired scenario)

In import template settings on File tab set Skip new items field to Yes, save the template. This setting will ignore products found in import file but are not available in database.
Kind regards,

Tharuna

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


There are replies in this post but you are not allowed to view the replies from this post.