[Skip to main content](#vessel-content)

#   Importing prices through CSV file deletes variants

##

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

8 years 3 months ago [\#295544](#295544) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  *[Importing prices through CSV file deletes variants](/forum/25-install-update/895298-importing-prices-through-csv-file-deletes-variants#295544 "-- url of the page with the problem -- : joomla3xxx.lan -- HikaShop version -- : 3.4.0&#92; -- Joomla version -- : 3.8.10 -- PHP version -- : 7.1  We have a load of products with variants loaded into hikashop. None of the variants have prices. We went to import a price using a CSV file to test for a single variant. The import went successfully. However the other product variants for which we didn't set a price have been deleted from the product table. For example we have main product ABZ-515, and variants ABZ-515K, ABZ-151N, ABZ-151S before the import. We imported the following file:  product&#95;code;price&#95;value;price&#95;access;product&#95;type ABZ-515K;25.00;,2,;variant  Now the variants ABZ-151N, ABZ-151S are not longer there. We've checked in the product table in the database and they have definitely been deleted. Are we missing something in the import configuration, or is that the expected behaviour. If the variant is not there, it will be deleted?")* was created by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")*

-- url of the page with the problem -- : joomla3xxx.lan
-- HikaShop version -- : 3.4.0\
-- Joomla version -- : 3.8.10
-- PHP version -- : 7.1

We have a load of products with variants loaded into hikashop. None of the variants have prices. We went to import a price using a CSV file to test for a single variant. The import went successfully. However the other product variants for which we didn't set a price have been deleted from the product table.
For example we have main product ABZ-515, and variants ABZ-515K, ABZ-151N, ABZ-151S before the import. We imported the following file:

product_code;price_value;price_access;product_type
ABZ-515K;25.00;,2,;variant

Now the variants ABZ-151N, ABZ-151S are not longer there. We've checked in the product table in the database and they have definitely been deleted. Are we missing something in the import configuration, or is that the expected behaviour. If the variant is not there, it will be deleted?

- [ ![Selection&#95;064.png](/forum/attachment/44264) ](/forum/attachment/44264 "Selection&#95;064.png") [ ](/forum/attachment/44264?download=1 "Selection&#95;064.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NTI5OC1pbXBvcnRpbmctcHJpY2VzLXRocm91Z2gtY3N2LWZpbGUtZGVsZXRlcy12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

8 years 3 months ago [\#295571](#295571) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Importing prices through CSV file deletes variants](/forum/25-install-update/895298-importing-prices-through-csv-file-deletes-variants#295571 "-- url of the page with the problem -- : joomla3xxx.lan -- HikaShop version -- : 3.4.0&#92; -- Joomla version -- : 3.8.10 -- PHP version -- : 7.1  We have a load of products with variants loaded into hikashop. None of the variants have prices. We went to import a price using a CSV file to test for a single variant. The import went successfully. However the other product variants for which we didn't set a price have been deleted from the product table. For example we have main product ABZ-515, and variants ABZ-515K, ABZ-151N, ABZ-151S before the import. We imported the following file:  product&#95;code;price&#95;value;price&#95;access;product&#95;type ABZ-515K;25.00;,2,;variant  Now the variants ABZ-151N, ABZ-151S are not longer there. We've checked in the product table in the database and they have definitely been deleted. Are we missing something in the import configuration, or is that the expected behaviour. If the variant is not there, it will be deleted?")*

Hi,

The import area in Products&gt;Imports is there to import whole products for big imports of data. So what you asked the import system to do is actually to update the variants of the main product of that variant so that only the variants listed in the CSV would be kept. And thus, it removed the ones not in the CSV.
If you want to update prices and not really do an import of products, it's better to use a mass action with a CSV import filter. This will handle products and variants as independent entities and will allow you to update their information without touching on the structure of the products. So with the CSV import of the mass actions, you won't be able to delete variants (for example, if you don't sell them anymore), but then, it won't remove them if you don't specify them in the CSV.

The following user(s) said Thank You: [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NTI5OC1pbXBvcnRpbmctcHJpY2VzLXRocm91Z2gtY3N2LWZpbGUtZGVsZXRlcy12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

8 years 3 months ago [\#295576](#295576) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Importing prices through CSV file deletes variants](/forum/25-install-update/895298-importing-prices-through-csv-file-deletes-variants#295576 "-- url of the page with the problem -- : joomla3xxx.lan -- HikaShop version -- : 3.4.0&#92; -- Joomla version -- : 3.8.10 -- PHP version -- : 7.1  We have a load of products with variants loaded into hikashop. None of the variants have prices. We went to import a price using a CSV file to test for a single variant. The import went successfully. However the other product variants for which we didn't set a price have been deleted from the product table. For example we have main product ABZ-515, and variants ABZ-515K, ABZ-151N, ABZ-151S before the import. We imported the following file:  product&#95;code;price&#95;value;price&#95;access;product&#95;type ABZ-515K;25.00;,2,;variant  Now the variants ABZ-151N, ABZ-151S are not longer there. We've checked in the product table in the database and they have definitely been deleted. Are we missing something in the import configuration, or is that the expected behaviour. If the variant is not there, it will be deleted?")*

All is clear. We will try with the mass actions. If we have any problems we'll come back here.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NTI5OC1pbXBvcnRpbmctcHJpY2VzLXRocm91Z2gtY3N2LWZpbGUtZGVsZXRlcy12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

8 years 3 months ago [\#295616](#295616) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Importing prices through CSV file deletes variants](/forum/25-install-update/895298-importing-prices-through-csv-file-deletes-variants#295616 "-- url of the page with the problem -- : joomla3xxx.lan -- HikaShop version -- : 3.4.0&#92; -- Joomla version -- : 3.8.10 -- PHP version -- : 7.1  We have a load of products with variants loaded into hikashop. None of the variants have prices. We went to import a price using a CSV file to test for a single variant. The import went successfully. However the other product variants for which we didn't set a price have been deleted from the product table. For example we have main product ABZ-515, and variants ABZ-515K, ABZ-151N, ABZ-151S before the import. We imported the following file:  product&#95;code;price&#95;value;price&#95;access;product&#95;type ABZ-515K;25.00;,2,;variant  Now the variants ABZ-151N, ABZ-151S are not longer there. We've checked in the product table in the database and they have definitely been deleted. Are we missing something in the import configuration, or is that the expected behaviour. If the variant is not there, it will be deleted?")*

The import went fine. That data imported is correct. The only issue we saw was this warning:

Notice: Undefined property: stdClass::$price_currency_id in public_html/plugins/hikashop/massaction_product/massaction_product.php on line 531

Is this a problem with our CSV file?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NTI5OC1pbXBvcnRpbmctcHJpY2VzLXRocm91Z2gtY3N2LWZpbGUtZGVsZXRlcy12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

8 years 3 months ago [\#295623](#295623) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Importing prices through CSV file deletes variants](/forum/25-install-update/895298-importing-prices-through-csv-file-deletes-variants#295623 "-- url of the page with the problem -- : joomla3xxx.lan -- HikaShop version -- : 3.4.0&#92; -- Joomla version -- : 3.8.10 -- PHP version -- : 7.1  We have a load of products with variants loaded into hikashop. None of the variants have prices. We went to import a price using a CSV file to test for a single variant. The import went successfully. However the other product variants for which we didn't set a price have been deleted from the product table. For example we have main product ABZ-515, and variants ABZ-515K, ABZ-151N, ABZ-151S before the import. We imported the following file:  product&#95;code;price&#95;value;price&#95;access;product&#95;type ABZ-515K;25.00;,2,;variant  Now the variants ABZ-151N, ABZ-151S are not longer there. We've checked in the product table in the database and they have definitely been deleted. Are we missing something in the import configuration, or is that the expected behaviour. If the variant is not there, it will be deleted?")*

Hi,

No, it's just a small warning you can ignore.
We'll fix that on our end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NTI5OC1pbXBvcnRpbmctcHJpY2VzLXRocm91Z2gtY3N2LWZpbGUtZGVsZXRlcy12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.079 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
