Jump to content
thirty bees forum
  • 0

How to set 0 quantity if not present in CSV


Beeta

Question

15 answers to this question

Recommended Posts

  • 0

Not directly, but it will be supported soon.

Meanwhile, I can offer this workaround:

0) Preparation step - create custom field named Imported Quantity for products (or combination)

Then:

1) run Mass Update that will reset Imported Quantity field to zero for every product 2) run Import that will import data into this new custom field Imported Quantity, instead of build-in quantity field 3) run Mass Update that will copy data from Imported Quantity to standard quantity field

If you run these 3 steps in sequence you'll get wanted results. Unfortunately, datakick module does not support task sequencing at the moment. But you schedule these task to run at specific times. For example, you can schedule first mass update to run at 10:00, import at 10:05, and copy data task at 10:10 (or maybe later, depending on how long does it take to import data)

Link to comment
Share on other sites

  • 0

This is how i handle it, We have a shop with a POS system what is the main inventory. For update the Thirtybees inventory set quantities of the whole DB to zero. In the Db run Query "Before testing make backup of the DB!!!"

UPDATE tb_stock_available SET quantity=0; UPDATE tb_stock SET physical_quantity=0; UPDATE tb_stock SET usable_quantity=0

After that i upload the CSV with the new stock. Don't forget to rebuilt the index. PREFERENCES/SEARCH

Link to comment
Share on other sites

  • 0

@datakick said in How to set 0 quantity if not present in CSV:

Not directly, but it will be supported soon.

Meanwhile, I can offer this workaround:

0) Preparation step - create custom field named Imported Quantity for products (or combination)

Then:

1) run Mass Update that will reset Imported Quantity field to zero for every product 2) run Import that will import data into this new custom field Imported Quantity, instead of build-in quantity field 3) run Mass Update that will copy data from Imported Quantity to standard quantity field

If you run these 3 steps in sequence you'll get wanted results. Unfortunately, datakick module does not support task sequencing at the moment. But you schedule these task to run at specific times. For example, you can schedule first mass update to run at 10:00, import at 10:05, and copy data task at 10:10 (or maybe later, depending on how long does it take to import data)

In this way, I have to update every product every time.

I found a relative simple shell solution to compare two ordinated CSV and then have as output a CSV only NO MORE AVAILABLE products (and a simple shell script that convert CSV to XML)... but if actually, datakick module can't do it directly I think that Imported Quantity solution can be good.

About datakick docs I can see editable quantity here, or is only a limit about put to 0?

@kleijn36 said in How to set 0 quantity if not present in CSV:

This is how i handle it, We have a shop with a POS system what is the main inventory. For update the Thirtybees inventory set quantities of the whole DB to zero. In the Db run Query "Before testing make backup of the DB!!!"

UPDATE tb_stock_available SET quantity=0; UPDATE tb_stock SET physical_quantity=0; UPDATE tb_stock SET usable_quantity=0

After that i upload the CSV with the new stock. Don't forget to rebuilt the index. PREFERENCES/SEARCH

I know that can be a solution but I would like to avoid to write directly in the DB. Thank you anyway... I will use it as a last resort.

Link to comment
Share on other sites

  • 0

@datakick as the products I will import will be half-dropshipping* products but sometimes I will have some products locally too, do you suggest to use warehouses or simply different suppliers to maintain the quantities precisely? datakick module can update suppliers product quantities too?

  • products are not in our warehouse but we order from the supplier asap we receive the customer order and then we drive to the warehouse and self-ship it.
Link to comment
Share on other sites

  • 0

@datakick said in How to set 0 quantity if not present in CSV:

@FooLab what do you mean by update suppliers product quantities? I'm not aware that such information is stored inside tb. We have only product / combination quantities, and then stock information for warehouses.

Yes it's true, I think that I need warehouses as it's not possible to set quantities by suppliers.

In the datakick module how can I updates warehouses stocks? I can't find info about it in the docs and the only field I found in the demo installed in my sandbox is "quantity".

Link to comment
Share on other sites

  • 0

@foolab I'm afraid that's not possible at the moment. Importing / adjusting stock in the warehose isn't that trivial. It can't be done directly, otherwise your stock movement wouldn't match warehouse stock (and quantity on hand).

I can investigate to see how big effort it would be to add support for stock import.

Link to comment
Share on other sites

  • 0

@foolab not possible at the moment. You can only replace column value with the value from dataset. You can transform the input value before you store it, ie:

input * 1.5 or if(input='20%', 0.2, 0.18) Unfortunately it's not possible to take current value into consideration. But it would be killer functionality, I've added it to the backlog

Link to comment
Share on other sites

  • 0

@datakick well with that and the warehouses support datakick module can be a very powerful killer app!

In the meantime if I import in a custom field (“imported quantity”) and then with a a mass edit (with cron) I increase/lower the quantity do you think it can work?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...