Update only stock of existing products csv file

  • Posts: 344
  • Thank you received: 3
8 years 11 months ago #223528

-- url of the page with the problem -- : www.kvikkimedia.no
-- HikaShop version -- : 2.6
-- Joomla version -- : .3.4.5

Case
I have a CSV file from my supplier containing 4000 sku(products) with name, productcode, price, product description, weight etc. I have removed around 1000 sku (products) from this file, so now I am only left with 3000 sku's.

I want to import my updated file containing 3000 skus to my hikashop store using the hikashop import system.

This should work just fine.

My supplier also have another CSV file, with only the stock quantity information. Which I am suppose to use later for easy updating of product stock.

This file also has 4000 sku's (only with product code and quantity), and I only want to update the stock of my existing products.

So if I go to "Import products from CSV" and set "Update products information if the product_code already exists" to YES.

Will hikashop only update the stock quantity of my existing products, and not create new products with the remaining 1000 sku's ?

Because I don't want to manually remove the 1000 remaining sku's each time I uppload the stock CSV file.

I hope all this makes sense.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #223559

Hi,

If you just want to update the stock ; using a "mass action" would be better.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 344
  • Thank you received: 3
8 years 11 months ago #223601

Can I uppload a CSV file in mass action ?

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

  • Posts: 344
  • Thank you received: 3
8 years 11 months ago #223669

river wrote: Can I uppload a CSV file in mass action ?


Just bump this question. Anyway I manage to import products from my csv file which works fine.

I.e:
So now I need to update the product_quantity of the products I have Imported. Below you can see a screenshot from my stock_file_csv(in the image I have just opened the file in openoffice to for display).



As you can see the file only contain the fields "product_code" and "product_quantity"
I only want to update the product quantity on existing products(exisiting product_code).

Note: It's important that not any new product get's created.

Here is a screenshot of my settings from "mass action" so far....



Any advice on of to proceed. I am not sure which "actions" I should use.

Attachments:
Last edit: 8 years 11 months ago by river.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #223698

Hi,

You don't have to set any actions, but only check the checkbox "Save the products on Mass Action csv import".
That way it will update the quantity, before anything please do a backup of the database.

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

  • Posts: 344
  • Thank you received: 3
8 years 11 months ago #223811

OK tnx for reply. I just found out that I can use the "Hikashop Products Cron Update Plugin". It's works perfect for my needs.

One last question:

In hikashop=>products>=>import>Import products from CSV"

There is an option: "update products information if the product_code already exists". If I set this to No.
Then the're want be any changes/updates to the existing products when I import a CSV containing the same product codes but with different product text, price, weight etc when import a CSV file ?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #223837

Hi,

Yes, it is normal. when this option is enabled so it is doing exactly what you are looking for.
But when disabled, it allow to not edit the existing products with unwanted values.

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

  • Posts: 344
  • Thank you received: 3
8 years 11 months ago #223852

OK this is good news.

Now I only have one last problem.

When I import products from my CSV file, and when I click "import", the csv files get upploaded and after that my screen turns blank and I get a 500 error.

But when I go back to administrator, all the products have been imported all fields etc, everything is fine. But how can avoid the screen from turning blank ?

Here's a screen from my csv file.



And I have also updated (see settings below) settings for my shared hosting server.

max_execution_time - 300
memory_limit - 512MB
post_max_size - 16MB
upload_max_filesize - 64MB

But I still get the problem, any advice ?

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #223860

Hi,

Please set the error reporting level to "Maximum" in the Joomla settings, this will give us more informations about this 500 error.

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

  • Posts: 156
  • Thank you received: 0
6 years 9 months ago #286666

The CSV cron-job (Hikashop Business) works whether the supplier allows the access to CSV catalogue file with user and password?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286671

Hi,

The CSV of the CSV you specify in the plugin can contain a user/password if your supplier uses a htaccess authentication for the access to the CSV file. In that case, it's possible to do that yes.
If however it's another kind of user/password access, like a normal HTML login form (like the backend of Joomla for example) then that won't work.

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

  • Posts: 192
  • Thank you received: 15
  • Hikashop Business
6 years 9 months ago #287132

Hi,
can you guys do a full tutorial on this functionality with images? It will be really helpful to people running large shops where stock numbers change in the POS and need to be transfered across without changing other fields.

Thanks,
Ian and Stu

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #287134

Hi,

Note that we already have a documentation to auto import CSV files:
www.hikashop.com/support/documentation/7...hop-import.html#cron

This thread is about doing an auto import of only the stock of the products already in the shop (and not of the whole CSV) and in that case using a mass action is more appropriate but more complex to setup.

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

  • Posts: 192
  • Thank you received: 15
  • Hikashop Business
6 years 9 months ago #287257

So,
just to be clear. Additional new products should be bulk imported from csv via the standard 'Products > Import' screen?

Regards,
Stu and Ian

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #287285

Hi,

That's right.

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

  • Posts: 156
  • Thank you received: 0
6 years 9 months ago #287544

In my CSV file, I have the following column:

record_type,product_id,brand,name,code,product_quantity,street_price,suggested_price,price_novat,plain_description,weight,picture 1,picture 2,picture 3,Firme,heel,lenght,mainmaterial,Categories,Production,Subcategories,allout,season,color,partner,Warehouse2,Watches,bicolors,Genere,Print,productname,model_id,barcode,model_size,model_quantity

How it is possible match each column with Hikashop fields?
Additionally: some CSV column doesn't have any correspondence because there are no fields in hikashop

I need to have for each item, the field above described and some dropdown menu, for colour, size, street price, etc...

**SECOND QUESTION:**
I have the main side menu e.g.:
SHOES
BAG
WATCHES

When I import the CSV file of all product, how it is possible to fill each items, in the right category? the "bags" items, in BAG menu, the "shoes" item in SHOES menu, and so on....

P.S. Consider I am willing to purchase Hikashop Business...but I need to be sure to don't waste purchase.

Last edit: 6 years 9 months ago by SuX.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #287550

Hi,

1.
If you're using the manual import in the menu Products>Import, then just change the columns in the CSV before to the columns of HikaShop.
If you're using the CSV auto import plugin, then there is field where you can enter the conversions for the column names (look at the tooltips for an example of what to do).

2.
If you have fields that don't exist in HikaShop, you have two options:
- you don't do anything and the column will be skipped during the import (for data you don't really need on the new shop)
- you add a custom field of the table "product" via the menu Display>custom fields. Use the same column name and it will be imported automatically. Also, with the filter system to can generate filter dropdowns from these custom fields:
www.hikashop.com/support/documentation/1...-filter-listing.html

3.
In the CSV, you can have a "categories" column where you can enter the name of the category where the product should go. I suppose that your CSV already has a column with that data so you just have to change the column name.
This is explained in the CSV import documentation page:
www.hikashop.com/support/documentation/73-hikashop-import.html

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

  • Posts: 192
  • Thank you received: 15
  • Hikashop Business
6 years 9 months ago #287605

If you do an export without selecting and products Hika will export the full list of standard fields. We found that most of these can be mapped to your preferred field name (i.e. use the ones hika provides). If you have 'product_name','parent_category' and 'categories' set out for each product, you will be able to set one hight level menu grouping for your product items (i.e. with 'parent_category') and, optionally, a sub-menu grouping (i.e. using 'categories'). The basic fields that we found and use (with including custom ones) are;

"product_id";"product_parent_id";"product_name";"product_description";"product_quantity";"product_code";"product_published";"product_hit";"product_created";"product_sale_start";"product_sale_end";"product_delay_id";"product_tax_id";"product_type";"product_vendor_id";"product_manufacturer_id";"product_url";"product_weight";"product_keywords";"product_weight_unit";"product_modified";"product_meta_description";"product_dimension_unit";"product_width";"product_length";"product_height";"product_max_per_order";"product_access";"product_group_after_purchase";"product_min_per_order";"product_contact";"product_display_quantity_field";"product_last_seen_date";"product_sales";"product_waitlist";"product_layout";"product_average_score";"product_total_vote";"product_page_title";"product_alias";"product_price_percentage";"product_msrp";"product_canonical";"product_warehouse_id";"product_quantity_layout";"screensize";"os";"bluetooth";"ram";"public";"genre";"product_sort_price";"atoz";"imagetaken";"categories_ordering";"parent_category";"categories_image";"categories";"price_value";"price_currency_id";"price_min_quantity";"price_access";"price_users";"files";"images";"related";"options";"bundle";"bundle_quantity"

Best regards,
Ian and Stu

p.s. actually out custom fields 'imagetaken' and 'atoz' were automatically include here but won't be there for you unless you manually create them as per the moderators previous post

Last edit: 6 years 9 months ago by smithshop123.
The following user(s) said Thank You: nicolas

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

  • Posts: 267
  • Thank you received: 5
2 years 7 months ago #340483

Hello, I have a question about it.
I just want to remove through a csv all the non-existent products that will no longer be needed for the future.
My csv with the products that I want has only variants.
Simply importing through "Hikashop - Product Cron Update", a csv with the product_code and activating "Delete variants that are not in the CSV" is enough to delete only the variants or it will delete the main products as well.

a) Is it enough to indicate the product_code field so that it performs the task of eliminating all non-existent variants?
b) Is this the best system to perform this task?
c) It is possible that from a csv with several fields, it only takes into account only one of them, in this case product_code, and rejetc the others.
d) A different question, it is possible through the import of main products to assign a characteristic to them, so that when importing the variants it is already assigned to that product directly.
We only use one charcateristic and until now in new products we manually assign that characteristic.
Is there a way to automate it?

Thank you as always for your kindness and efficiency.

Last edit: 2 years 7 months ago by dvddvd.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 7 months ago #340502

Hi,

a. It will delete the main products too if you don't have them in the CSV file. So I'm afraid that's not a solution for you as is. And even if that were not the case, it wouldn't work properly I think because the main product row has to be present in the CSV file.

b. For what you want to do I dont' see any way to do it. One path would be to create a custom field of the table "product" with the column name "keep_product".Then, create 3 mass actions:
- one with an action "update the values" on the column "keep_product" and the value 0.
- one with a filter CSV import pointing to your CSV file where you'll have two columns: the "product_code" and the "keep_product" columns. In the product_code column, you'll have the product code for all the variants you want to keep, and in the "keep_product" column, you'll have the value 1.
- one with a filter on the "keep_product" column with the value 0, a second filter on the column "product_type" with the value "variant", and an action "delete the element".
That way, if you run these mass actions one after the other, you'll have what you want.
The problem is then automating that, if you need to do that task periodically. Because there is no mechanism to set an order on the mass actions, or to say to run another mass action after one. That would require a bit of coding.

c. the system will only take into account the column with a title matching with a column in HikaShop. So if you have a column "mycolumn" and you don't have such column in the hikashop_product (which you shouldn't have unless you created a custom field of the table "product" with the column name "mycolumn", the import process will ignore it.

d. In the CSV file, you can have a column for each characteristic. And in these columns you need to:
- enter the default value for the main product rows
- enter the value of the variant for variant rows
However, note that you're supposed to have both the main product and the variant rows in the same CSV file.

The following user(s) said Thank You: dvddvd

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

Time to create page: 0.107 seconds
Powered by Kunena Forum