Import prices

  • Posts: 1116
  • Thank you received: 12
  • Hikashop Business
1 day 14 hours ago #369238

Hello !
I have a csv importing quanity field that works perfectly with a mass action I created , trigered with a cron task every 30 minutes.
The csv looks like this

product_code;product_quantity
00-00-0000;112.000
00-00-0013;19.000

Now the client asks to update the column price.
Will this work ?
product_code;price_value,price_access
00-00-0000;66.150,16
...
...

I m asking because I don t want to add new prices. Only replace the existing prices. Like the csv with the quantity does.


Thank you.

Please Log in or Create an account to join the conversation.

  • Posts: 84639
  • Thank you received: 13765
  • MODERATOR
1 day 31 minutes ago #369241

Hi,

This can work, but not like you wrote it. You need to use the same separator for the columns.
So if you use ";" between product_code and price_value, you also need to use ";" between price_value and price_access
Also, the "price_access" column consists of a list of Joomla user group ids separated by a comma and with a comma prepended and appended to that list.
So, if you want a price to be restricted to the user groups with the ids 10 and 16, you would have to write the following in that column: ,10,16,

So, in your example, it should be:

product_code;price_value;price_access
00-00-0000;66.150;,16,
...
...

Also, if you want to import several prices, you need to separate them by a "|" in each price column.
For example, if you want to import a product with a price value of 100 for the users of the user group 10 and a price value of 66.15 for the users of the user group 16, you would need something like this:
product_code;price_value;price_access
00-00-0000;100|66.15;,10,|,16,
...
...

I would recommend you use the "export" button of the products listing after selecting a product with several prices. You'll see a concrete example of what you need to do if you look at these columns as the export tool respects the format supported by the import tool.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum