Jump to content

Understanding advanced stock management


Recommended Posts

Hello Prestashop Team!

 

At present I'am exploring advanced stock management because we need this functionality for our project. It would be great you to confirm that my research is in the right way or correct if it is not.

 

1. When the product is created the new record is added to the stock_available table. Default quantity mode is "I want to specify available quantities manually". Each product combination also adds record to the stock_available with specified quantity for each combination. As a result stock_available contains one general record and additional records for each combination.

 

1.1 Advanced stock management is turned on at the same time with manual management. I add the same product through stock - stock management to the stock. New records for each combination in the stock table appear. Why I'm able to add the product to the stock when it is still in "manual mode"?

 

1.2 When I turn "Available quantities for current product and its combinations are based on stock in the warehouses" and "I want to use the advanced stock management system for this product" the manually defined quantities in the stock_available is changed with the values from stock table.

 

1.3 If I turn on "Available quantities for current product and its combinations are based on stock in the warehouses" and "I want to use the advanced stock management system for this product" right away after the product creation and add each its combination through stock-stock management records for each combination are stored in the stock table but stock_available contains only one record with general quantity.

 

1.4 I observed that there is possibility to use the combination of settings "I want to use the advanced stock management system for this product" and "I want to specify available quantities manually". How does it affect the stock management?

 

Thanks.

  • Like 2
Link to comment
Share on other sites

Hi,

 

First of all, thank you for your interest in this new feature.

 

One major thing that you have to understand about stock management in PS 1.5 is that we completely dissociated the physical stock (let's call it "(physical) stock") from the actual quantity of products you want to sell (let's call it "available quantities").

 

The stock_available table represents the quantity of product (with or without combinations) you want to sell on your store(s).

The stock table represents the physical stock.

 

- Without advanced stock management :

 

If you don't want to use the advanced stock management, you have to set the quantity manually - which corresponds to what you had in PS 1.4.

 

Setting the quantity manually allows you to define exactly, for a given shop or group of shops, how much products you want to sell.

 

- With advanced stock management :

 

If you want to use the advanced stock management for one product, you can either :

- set the quantity manually

- let the quantity be based on the physical stock in warehouses

 

Setting the quantity manually allows you to define exactly, for a given shop or group of shops, how much products you want to sell.

 

For a given product, if you combined "I want to use the advanced stock management system for this product" and "I want to specify available quantities manually", it means that you can sell :

- the same amount of products you have in physical stock

- more than you have...

- less than you have..

 

The physical stock will be decremented - which is not the case if you don't specify "I want to use the advanced stock management system for this product".

It allows you, for instance, to sell more than you have, because you know your supplier will deliver soon enough..

 

 

 

I hope my answer will help you understand what we did here.

 

I wrote a french documentation about this feature, it will be translated soon.

If you have questions, don't hesitate to reply here, I'll keep an eye on this thread.

 

Kind regards,

  • Like 8
Link to comment
Share on other sites

Thanks for the detailed explanation.

The ability to separate physical stock and available quantities is very important for us.

At this moment I have all needed information for our work.

It would be great if you could post there the link to English manual (when it is translated).

Link to comment
Share on other sites

  • 1 month later...

Hi All,

 

I have a question about multishop/stock

ex. of my setup

- 1 group of shops

- 4 shops (shopA,shopB,shopC & shopD)

- 3 warehouses (stock1, stock2 & stock3)

- all products on advanced stock management.

shop A & B --> stock 1 (should be shared stock for the 2 shops)

shop C --> stock 2

shop D --> stock 3

 

Now when I add stock by to warehouse 1 let say 500 products A, I get in the stock_available table for shop A & B 500 products each...

When I order on shopA 2 productsA the available stock of shopA decreases to 498 but the stock on shopB stays on 500.

Is this a bug or is this an error with my config?

I think the stock for shopA & B should be in this case 498...

 

Br,

E-raser

Link to comment
Share on other sites

  • 2 weeks later...

Hi E-raser,

 

There was a problem in that particular configuration.

The fix is now available in the SVN. Hopefully I won't have to touch it anymore.

 

Thanks for noticing that !

Feel free to contact me anytime.

 

Best regards,

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hi,

please help me to understand the out_of_stock field in stock_available table

as I've seen from code, there are three value for this parameter: 0,1,2

At first sight I've interpreted them as

 

0 - deny sales when out of stock

1 - allow sales when out stock (set personally from Quantity tab for selected product)

2 - get general value of "deny/allow out of stock order" parameter prom preferences

 

What did I miss in my understanding? (I need this parameter for my module)

 

UPDATE:

 

Continuing my investigations I've started with product_quantity_in_stock in order_detail

As I understood this parameter it was intended for tracking how many items have been removed from the stock.

 

$productQuantity = (int)(Product::getQuantity($this->product_id, $this->product_attribute_id));
 $this->product_quantity_in_stock = ($productQuantity - (int)($product['cart_quantity']) < 0) ?
  $productQuantity : (int)($product['cart_quantity']);

 

 

There can be three cases of this value calculation:

  • Stock is equal or greater than ordered quantity - product_quantity_in_stock will have a positive value equal to ordered quantity.
  • Stock is zero - product_quantity_in_stock gets zero as well
  • Stock is negative - product_quantity_in_stock will be equal to current negative value of stock.

1st, 2nd cases are consistent: we remove from stock ordered quantity.

Third case has strange behavior.

For example current stock is -5 items. Customer ordered 3 items.

Then we have (-6 - 3) < 0 ? -6 : 3 , as the result in brackets will be -9 value -6 will be recorded into product_quantity_in_stock, but for compatibility with logic of 1st and 2nd cases we need to record 0 or -3.

Edited by absolutic (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello Prestashop Team!

If I import my products from CSV, I can not specify the "I want to use the advanced stock management" and ID warehouse. I have more that 5000 products. Check everything manualy is not possible.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Hi there.

I played with the 1.5 but I want to ask if there is a function/switch like set all products in shop A to advanced stock management and copy the product quantities of the shop to warehouse A?

Or do I have to programm something on my own because the task of mirgrating 1 or more thousand products like this is tedious.

Best regards, trip

Link to comment
Share on other sites

Hi there.

I played with the 1.5 but I want to ask if there is a function/switch like set all products in shop A to advanced stock management and copy the product quantities of the shop to warehouse A?

Or do I have to programm something on my own because the task of mirgrating 1 or more thousand products like this is tedious.

Best regards, trip

 

 

Yes, equally interested in that question/answer.

Link to comment
Share on other sites

If I have both Enable stock management and Enable advanced stock management turned on, if I go and edit a product that has '20' for quantity, when I hit Save, it 0's out. Is it because I don't have warehouses set up yet?

Yes, first You should create at least one warehouse, then assign warehouse for such products (where ASM is on and quantity controlled by warehouse stock)

Link to comment
Share on other sites

Hello Prestashop Team,

 

At present I'am exploring advanced stock management because we need this functionality for our new project.

 

Assuming we have

1 store

3 warehouse

1 product (with advanced stock management and stored at all 3 warehouse)

 

When order create, can we choose which warehouse to dispatch the product?

 

I tested when the order create seem like randomly select the warehouse to deduct the stock, correct me if i'm wrong.

 

Our purpose is able to select specific warehouse to dispatch stock for order created thus the right stock is deduct.

 

Thank you.

Edited by kendy2562 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

When order create, can we choose which warehouse to dispatch the product?

I tested when the order create seem like randomly select the warehouse to deduct the stock, correct me if i'm wrong.

Our purpose is able to select specific warehouse to dispatch stock for order created thus the right stock is deduct.

Last time when I examine this feature (warehouses) the stock usage has order as it showd in warehouses list. No any reordering possible. I post an improvement issue (to add warehouse weight per product with reordering) to the PS bugtracker, but now the team still mostly do a bugfixing rather than improvements and new features.

Link to comment
Share on other sites

  • 3 weeks later...

Hello Guys,

 

I've enabled the advanced stock management and created 2 warehouses.

I have about 3000 products in the database, so it was quite a problem to change every of them to use advanced stock management and disconnect them from physical stock amounts. But I've solved this using and mysql request in the database and now seems okay.

 

The trouble is that ASM needs an entry for every stock product in the table 'ps_warehouse_product_location'. If there is not, the product does not connect with the stock quantity and the customer's product page still shows "out of stock" instead of "in stock". I've realized that the only way how to add the product into this table is to open warehouse tab on the specific product's card in the backoffice and check the right warehouse. But that is quite a neverending job with several hundreds stock items to do one by one.

 

Why that ps_warehouse_product_location line does not create automatically when increasing the stock of the product? When doing that, you always mark the warehouse, so it could be done automatically!

 

Thank you

Peter

Link to comment
Share on other sites

  • 1 month later...

Hello the.rampage.rado,

 

My co-worker and I have been looking through the PrestaShop forums as part of our efforts help Prestashop users and to better understand the product ourselves. Your question was, "How I can export a table with all stock quantities in selected warehouse?"

 

It was not answered, but got a little curious ourselves. Typically, this kind of thing would require a SQL query to extract the data you're interested in obtaining. And were you referring to physical stock quantities or the quantities available for sale, or both?

 

Did you ever get answer to your question? We were curious to know.

 

 

Thanks for your time and response!

 

Arnelzhub

 

Can you provide general information about what your store /warehouse structure? Were you using multiple warehouses or a single warehouse? (or were you even using a warehouse), and

Link to comment
Share on other sites

I'm new to prestashop and I'm struggling to get my head around this.

 

I generated a CSV file to create my product list - that worked, but there are no available fields with regard to ASM, warehouses, etc., so the products were therefore being generated without the ASP option enabled, and of course, no warehouse attached.

 

I'd have thought that the "Use ASM" option in Preferences>Products would do something to existing products, but it seems not to.

 

I've tried creating a supply order to populate the warehouse, but unless I go into the products and enable the options manually, nothing seems to happen - and not even then most of the time; I've only actually managed to get one product to show any stock at all!

 

I expected that, if I create a supply order for a particular warehouse, that the products listed would get set up automatically, as obviously I'd be wanting to use them in that context. I can't seriously be expected to edit each product, clicking through multiple tabs to change switches? can I?

 

If that's not going to work, is there no way to change the options across all products at once - just give me a quick list of products where I can tick a box on each line that needs it then click Apply - even an sql query I have to run manually would be better than having to click through several pages on hundreds of products.. I simply don't have the time to do that, nor the patience !

Link to comment
Share on other sites

  • 3 weeks later...

To BillyHardcore, are you using 1.5.3.1 ?

It seems there is a stock problem with this version, that did not exist in 1.5.2.

Since this version, in my shop, when the order is placed, the available quantity is decreased.

But when it is shipped, then the quantity goes back to initial quantity before order.

I when the piece is correctly booked, but not correctly decreased from psysical quantity.

I saw there is a change in ps_order_details, I now have id_warehouse = 0 instead of id_warehouse = 0, but I did no change in my configuration and checked everything. As a result, the stock is not decresed from the only werehouse of my shop.

Do you have or somebody has same problem with 1.5.3.1 ?

 

Thanks

Emeric

Link to comment
Share on other sites

When I update the order to shipped the warehouse quantity is lowered. If I set it as on backorder it increases again.

 

Seems OK to me.

 

EDIT: now I clicked on partial refund on the backordered order (which's quanitites were alredy returned) and made partial refund - it increases the available quantities in the warehouse again, so if employee makes such mistake you'll end up with unreal warehouse stocks...

Edited by the.rampage.rado (see edit history)
  • Like 1
Link to comment
Share on other sites

Emeric, I am indeed using 1.5.3.1

And when I set the Order Status to "Processing/Pending" it removes one of the Real products quantity.

It does not remove the physical or usable. If the system would remove the physical and usable quantity when setting order status to "Shipped" I would have no problem. But instead the system adds the Real quantity back to the warehouse.

Link to comment
Share on other sites

I found what was not OK.

In the warehouse configuration, I had no carrier selected.

Now I selected the carriers, it is OK and I have id_warehouse=1 in ps_order_details.

 

In fact, I think the bug was on 1.5.2, if I selected carriers in 1.5.2, it created conflict with real carriers, so I had nothing selected on previous versions and it was working fine.

 

Now with carriers selected in stock>warehouses, verything is ok.

Does it solve your problem also BilltHardCore ?

 

Regards

Emeric

 

Emeric

  • Like 3
Link to comment
Share on other sites

Hi all,

 

I am in a situation where same product is listed as single Product and Pack of 6 ( wine shop ). I use Year as Attribute for both, so 2008 or 2009 as year is a different product with different price.

 

Question: How can I keep stock for Pack, on a per combination type ? To what I tried, it does not work [ maybe there is something that I do not know ]

 

Case: Wine Mouton Cadet, sold as Product and as Pack of 6, from years 2008 and 2009. Years 2008, 2009 configured as Attributes.

Default combination is 2009 for both Product and Pack.

 

Situation: In Advance Stock Management the stock exists on both 2008 and 2009 Products ( Packs have stock managed from their coresponding Products )

 

For Products all is OK, when selling for 2008, in Advance Stock Management decreases stock for 2008, when selling 2009, it decreases for 2009.

 

Problem appears when selling the Packs. When selling either 2008 or 2009 Packs, in Advance Stock Management decreases stock from 2008 ( Main Combination).

 

I actually want to have a direct correlation from Product Combination to [ same but ] Pack Combination. Packs are made of 1 combination only.

 

I also tried to make Packs from that combination only, but is not allowed to enter combinations into the Packs.

 

Here I am blocked.

 

Please help if code is needed .

 

Many thanks,

 

Radu

Edited by radus (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

I am having an issue with creating a new stock movement labels - when I try to create a new one, the system tells me stock_mvt_reason (Duplicate entry '0' for key 'PRIMARY')

 

So I go to my DB and create the label manually, as a workaround.. Does anyone have the same issue? My PS is version 1.5.3.1 and was upgraded from 1.3.6

Link to comment
Share on other sites

  • 3 weeks later...

I wanted to use the "Advanced stock management" but what I find uncomfortable is that after I finish with an order the physical stock doesn't decrease automatically. My question is: If I have 100 different products in an order, do I have to manually decrease the stock for each of the product? In this case the "Advanced stock management" is not so helpful. Another thing that I wanted was to have a warehouse with products with 0 stock for the products available on order. When somebody would order a product the physical stock would go negative so I could increase it with "Supply order". It seems I got something wrong. Could you give me a better scenario?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I use an SQL in my database. Go to phpmyadmin and select your database, and then SQL.

 

UPDATE `ps_product` SET `advanced_stock_management`=1;
UPDATE `ps_product_shop` SET `advanced_stock_management`=1;
UPDATE `ps_stock_available` SET `depends_on_stock`=1,`out_of_stock`=2;

[i]Change the numbers 482 en 507 to the under- and upperrange of your products.[/i]
INSERT INTO `ps_warehouse_product_location` (`id_product`, `id_product_attribute`, `id_warehouse`) SELECT `id_product`, 0, 1 FROM `ps_product` WHERE `id_product` >= 482 AND `id_product` <= 507;

 

The first 2 lines enable the advanced stock management. The third allows the stock to depend on the warehouse.

The last line, Insert into, makes sure that the products are located in your warehouse.

 

So I always upload my csv without quantities. Then I do this SQL in my database. Then I manually enter the stock with its unit price per product.

  • Like 3
Link to comment
Share on other sites

I use an SQL in my database. Go to phpmyadmin and select your database, and then SQL.

 

UPDATE `ps_product` SET `advanced_stock_management`=1;
UPDATE `ps_product_shop` SET `advanced_stock_management`=1;
UPDATE `ps_stock_available` SET `depends_on_stock`=1,`out_of_stock`=2;

[i]Change the numbers 482 en 507 to the under- and upperrange of your products.[/i]
INSERT INTO `ps_warehouse_product_location` (`id_product`, `id_product_attribute`, `id_warehouse`) SELECT `id_product`, 0, 1 FROM `ps_product` WHERE `id_product` >= 482 AND `id_product` <= 507;

 

The first 2 lines enable the advanced stock management. The third allows the stock to depend on the warehouse.

The last line, Insert into, makes sure that the products are located in your warehouse.

 

So I always upload my csv without quantities. Then I do this SQL in my database. Then I manually enter the stock with its unit price per product.

 

Wow..exactly what I was looking for! Thank you.

 

Quick question:

How do you assign: "UPDATE `ps_stock_available` SET `depends_on_stock`=1,`out_of_stock`=2;"

to a certain category?

Link to comment
Share on other sites

I don't know what you mean bu assigning to a category. It just covers all the products in your shop.

 

sorry for the incomplete question.

I mean..to enable advance stock management to certain products tat falls under one category only

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hi

 

I'm really new to presta shop and was wondering if someone can help me. I am using Linnworks to manage my stock levels and they are supposed to be compatible with Presta Shop. However the stock levels are not syncing with my Presta shop website. I have been in contact with Linnworks and they are telling me that all is in order at their end and I should as the following question to Presta Shop:

 

which columns does Linnworks need to update in order to change product levels and set the item in/out of stock? The ps_product table in the integration has 3 fields: 'active', 'on sale', and 'out of stock'. We need to know what columns we have to change on the website/PrestaShop.

 

Please can someone help me!

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

We have had this site (v1.5.2) live for a couple of weeks now and I have just discovered that, when issuing refunds/cancelling orders (when the goods are not being sent - rather than when they are being returned) the products are not being incremented back into stock - even though they are checked in the table (along with refund shipping where the total order has been cancelled). This is a major issue, as they are then not available for another customer to order and our stock quantities are wrong.

 

It's going to be a major pain if we have to manually update the stock every time we issue a refund/cancel an order and/or a customer returns a product.

  • Like 1
Link to comment
Share on other sites

Hello everyone.

 

I just wanted to know if there is a bug on the advanced stock management or if this is a normal behavior (I'm using PS1.5.3.1, but I noticed that PS1.5.4.0 works in the same way).

 

The current behavior is this:

When the advanced stock management is enabled and the configuration for any product is like this:

I want to use the advanced stock management system for this product -> checked

Available quantities for current product and its combinations are based on stock in the warehouses -> selected

When out of stock: -> Allow orders

 

If there are 5 units of an element, and the client creates an order with more than the units available (i.e. 8), when the order's status of this order is changed to "shipped", the stock is not decreased (this happen whenever the resultant stock would be negative). The stock keeps being 5, so it doesn't even become zero.

 

So, is this a bug, or is this the expected behavior? Why the stock isn't discounted?

 

I look forward for your reply. Thanks!

 

Axel

Link to comment
Share on other sites

I've just started using Advanced Stock management, and it works well in theory although I have yet to test it with the above scenarios.

One thing I have found is that if I duplicate products and then edit them, the stock mangement screen will not update the product name even though they are updated in the actual product screen, are they being saved somewhere else that I have to edit? It's also showing up items which are nowhere to be found on my site, in this case I'm using the default theme and so it's shwoing iPods and MacBooks which were used in the default theme but have since been overwritten or removed on my own site.

 

Cheers

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

I'm starting an online wine shop using advanced stock management.

 

My understanding is that once an order is changed to "order validated" or "pending receipt" - the quantities on the supply order become available for sale (i.e. added to read quantity).

 

Once a supply order is changed to "order received in part, I often received a portion of the items I've ordered from a supplier. However, sometimes I find out that an item on a supply order will never arrive because it is sold out at the supplier - for example, I reorder 3 bottles Chateau Margaux 2000 to add to the 6 I have in stock, the supplier says it's confirmed, but it doesn't show up with the other items, and later I find out that the item will never be available again.

 

At this point, (I think) the item Chateau Margaux 2000 has already been added to my real quantity, so it says there are 9 bottles available, but there are really only 3, and I will never get the other 6 I've ordered.

 

My question is - what can I do with a supply order in the "order received in part" state if I find out later that some of the items will never arrive - If I cancel the order, the qtys on the other items will be false, but if I don't cancel it the missing items will be false.

 

My previous system had an option to recieve the partial order and delete the remaining items - does anything like this exist?

 

Thank you in advance.

Edited by pariswine (see edit history)
Link to comment
Share on other sites

  • 1 month later...

"I want to use the advanced stock management system for this product." should not have to be checked on every single product when "enable advanced stock management" is selected globally. I understand why the option to UNCHECK it should still exist, but "checked" should absolutely be the default. I consider this a bug.

Link to comment
Share on other sites

  • 1 month later...

The current behavior is this:

When the advanced stock management is enabled and the configuration for any product is like this:

I want to use the advanced stock management system for this product -> checked

Available quantities for current product and its combinations are based on stock in the warehouses -> selected

When out of stock: -> Allow orders

 

If there are 5 units of an element, and the client creates an order with more than the units available (i.e. 8), when the order's status of this order is changed to "shipped", the stock is not decreased (this happen whenever the resultant stock would be negative). The stock keeps being 5, so it doesn't even become zero.

 

I finally found a solution that solved many of my problems: I developed and added functionality that prevents this situation. Whenever some BO user changing the order's status to "shipped", it checks if there is enough stock on ALL products in the current order. If so, it continues as normal. But if not, it prevents the order's status change, and additionally shows an error message saying which product(s) is(are) out of stock, specifying how many units miss.

 

It's great, because it force you to do the things as you must: you CAN'T ship items that you hasn't in stock.

 

Regards,

 

Axel

Edited by axelmdp (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

Could you be so generous to make your solution public in detail.

Besides, I am sad that there is so less input from the offical side here. There seems to many problems of understanding how this works and which the interrelating dependencies are.
I am, for gods sake, not understanding how to make partial refunds. It does not work with or without ASM when orders are tagged as sent :(

Edited by B.Köring (see edit history)
Link to comment
Share on other sites

I use an SQL in my database. Go to phpmyadmin and select your database, and then SQL.

 

UPDATE `ps_product` SET `advanced_stock_management`=1;
UPDATE `ps_product_shop` SET `advanced_stock_management`=1;
UPDATE `ps_stock_available` SET `depends_on_stock`=1,`out_of_stock`=2;

[i]Change the numbers 482 en 507 to the under- and upperrange of your products.[/i]
INSERT INTO `ps_warehouse_product_location` (`id_product`, `id_product_attribute`, `id_warehouse`) SELECT `id_product`, 0, 1 FROM `ps_product` WHERE `id_product` >= 482 AND `id_product` <= 507;
The first 2 lines enable the advanced stock management. The third allows the stock to depend on the warehouse.

The last line, Insert into, makes sure that the products are located in your warehouse.

 

So I always upload my csv without quantities. Then I do this SQL in my database. Then I manually enter the stock with its unit price per product

 

Dear Christiaan_01 

Thank you for this sql command. I tried it on my PS 1.5.5.0 but I get an error on the last line. 

 

Error

SQL query: b_help.png

INSERT INTO `GLMM_warehouse_product_location` ( `id_product` , `id_product_attribute` , `id_warehouse` ) 

SELECT `id_product` , 0, 1

FROM `GLMM_product` 

WHERE `id_product` >=1

AND `id_product` <=300;

 

MySQL said: b_help.png

#1062 - Duplicate entry '1-0-1' for key 2 

 

is this because of changes in PS 1.5.5.0 version? Can anyone help me?

Thank you a brunch :)

Link to comment
Share on other sites

Hi,

 

I may have found a bug in ASM.

 

A product with combination is remained in ps_stock table even if the combination is deleted from product.

 

To reproduce:

 

1. Create Product A with couple of combinations. Say 3 combinations (Red, Yellow, Green).

2. Make sure ASM is enabled and assigned to the warehouse

3. Go to Stock Management and add stock for Product A - Red. Say 10 quantities

 

** Below is the normal and expected behaviour: **

- Under Stock Management, Product A - Red = 10 quantities

- Under Stock Movement, you see a record called Product A - Red with 10 quantity increased

- Under Instant Stock Status, you see a record called Product A - Red 10 for Physical, Usable and Real Quantities

 

 

Now, do edit Product A and delete Red combination. You then get the following behaviour:

- Under Stock Management, you no longer see Product A - Red. GOOD

- Under Stock Movement, the record became Product A with increase of 10 quantities. Record is there for historical purpose but Red label is missing. This behaviour is still acceptable

- Under Instant Stock Status, you see a record called Product A 10 for Physical, Usable and Real Quantities.

 

Now this is a very bad behaviour because you can no longer remove this particular (deleted) Red combination from Stock Management.

Repeating the process will only cause multiple Product A record in Instant Stock Status page.

 

What make things worse is that these deleted stock counts into the total of Warehouse physical product quantities and stock valuation.

 

Problem happens on 1.5.4.1. Upgraded to 1.5.5.0 via 1-Click Upgrade and problem still persists.

 

Can someone please confirm if I'm doing it correctly or perhaps I am missed some steps. Else I will report this issue to the bug tracker.

 

Thanks

 

 

EDIT: 20130917

Issue reported to Forge at http://forge.prestashop.com/browse/PSCFV-10424

Edited by sevennet (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi,

 

I may have found a bug in ASM.

 

A product with combination is remained in ps_stock table even if the combination is deleted from product.

 

To reproduce:

 

1. Create Product A with couple of combinations. Say 3 combinations (Red, Yellow, Green).

2. Make sure ASM is enabled and assigned to the warehouse

3. Go to Stock Management and add stock for Product A - Red. Say 10 quantities

 

** Below is the normal and expected behaviour: **

- Under Stock Management, Product A - Red = 10 quantities

- Under Stock Movement, you see a record called Product A - Red with 10 quantity increased

- Under Instant Stock Status, you see a record called Product A - Red 10 for Physical, Usable and Real Quantities

 

 

 

Now, do edit Product A and delete Red combination. You then get the following behaviour:

- Under Stock Management, you no longer see Product A - Red. GOOD

- Under Stock Movement, the record became Product A with increase of 10 quantities. Record is there for historical purpose but Red label is missing. This behaviour is still acceptable

- Under Instant Stock Status, you see a record called Product A 10 for Physical, Usable and Real Quantities.

 

Now this is a very bad behaviour because you can no longer remove this particular (deleted) Red combination from Stock Management.

Repeating the process will only cause multiple Product A record in Instant Stock Status page.

 

What make things worse is that these deleted stock counts into the total of Warehouse physical product quantities and stock valuation.

 

Problem happens on 1.5.4.1. Upgraded to 1.5.5.0 via 1-Click Upgrade and problem still persists.

 

Can someone please confirm if I'm doing it correctly or perhaps I am missed some steps. Else I will report this issue to the bug tracker.

 

Thanks

 

Great find and well described.  My advice (hope) is that creating a forge bug report would be a very good idea.  If you could also post the link to the bug report here that would be sublime.

Link to comment
Share on other sites

Great find and well described.  My advice (hope) is that creating a forge bug report would be a very good idea.  If you could also post the link to the bug report here that would be sublime.

no problem. will report the bug tracker.

 

are you having the same behaviour too?

Link to comment
Share on other sites

  • 2 months later...

Any reason why the Advanced Stock Management does not apply to product packs? It seems like a trivial computation based on the "base" products inlcluded in the pack.

 

Agree, hope it is on the todo list...

In our case most of our products are supplied in box quantities. The supplier specify a box quantity, so both the price and the product reference is related to a box with (even) number of the product itself. We receive the box and would like to check how many boxes has arrived. Then when receipt is done, we store the product in pieces, so after receiving, the base product quantity should be added to stock quantity (by multiplying number of boxes with the content qty of course).

 

I think that this is quite common to supply orders processing...

 

Thanks

Link to comment
Share on other sites

  • 1 month later...

Is this possible to use both advanced stock management AND manual quantity management in my shop??

 

Because I do and I get double shipping cost when I add in my cart one product that uses ASM and one that doesn't. I was forced to unactivate ASM for the moment but this is such a pity because it's a great feature.

 

I found this topic with people with the same problem and the bug is supposed to be fixed : http://forge.prestashop.com/browse/PSCFV-5173

 

I use Prestashop 1.5.5 with multishop and multilanguage.

 

Thank you for help!

 

Hugo

Edited by Hugo8705 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I also have troubles with ASM.

I have a multishop configuration (PS 1.5.6.1); I activated the ASM in "preferences", created a single warehouse... all the products are associated to this warehouse and have the ASM activaded (in ASM, I associated the warehouse to all the shops). By the way, if I update the quantities in ASM, I see them updated only for the products in shop 1. In shop 2 all the quantities are 0.

I created products for shop 1 only, for all the shops, for shop 2 only but the result is always the same.

What am I missing?

Link to comment
Share on other sites

  • 4 weeks later...

I have tried to investigate also the way how it's calculated stock / quantity available.

 

I have started to look on : product.tpl then on class Product.php then StockManager class.

It looks that for every time when it's called "getProductRealQuantities" are made sum of all valid orders and supply from tables :

order_detail (and corelated orders order_history order_state

supply_order (+corelated supply_order_detail supply_order_state

 

and physical quantities are in table stock.

 

But I have no records in table stock!!!

 

I have to digg more ... if someone has a faster answer it would be helpfull

Edited by dandumit (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I am having an issue with creating a new stock movement labels - when I try to create a new one, the system tells me stock_mvt_reason (Duplicate entry '0' for key 'PRIMARY')

 

So I go to my DB and create the label manually, as a workaround.. Does anyone have the same issue? My PS is version 1.5.3.1 and was upgraded from 1.3.6

Have the same problem, my solution don`t know is it correct but on 1.5.6.2 works perfect/

 

Login to phpmyadmin and find ps_stock_mvt_reason tabele. Delete row where id_stock_mvt_reason is 0, next go to structure and set AUTO_INCREMENT to id_stock_mvt_reason field. you should also delete all rows from ps_stock_mvt_reason_lang where id_stock_mvt_reason = 0

Link to comment
Share on other sites

  • 2 months later...

Hi,

We recently purchased this module but cannot get it to work properly.

For some reason we cannot find the products (it doesn't not show up in the drop down) when entering Stock Orders screen.

And for some reason after entering several products (with stock) the pricing and quantity is inconsistent to what we have.

Link to comment
Share on other sites

Totally new to this guys - so I hope that you follow my thought here and can give me som advice.... (and my English sucks)

 

We have built a shop solution for our client, that are connected to their economy-system. Added to this is an external solution that register all shipments with a specific selection of products (with serial numbers ). All orders are exported to the economy-system where they have also have the stock control. This is basics for you guys, but order is placed --> to the eco-system ---> the order is effecting the stock --> back to prestashop a.s.o - just to give you a feeling for how it´s basics works!

 

So here is my problem: The client has attached a new company, that will handel a  specific "productgroup" and only that. They will have the physical stock and take care of sending it out to the clients. So an order can contain product that are shipped from the main company and a part that are shipped by the external company. When I use the Advanced Stock Management (as I understand it) I can solve the thing with having this external company handling the stock itself BUT how in the name of #"!€IJF will I be able to separate the orders that comes in to the system e.g part A of the order goes to the main company and part B to the external company?

 

Order are splitter into 2 "new orders" but I can't find a way to see/define which order goes where? This rely drives me crazy, since I can´t read up on it, or have I misunderstand something? (no, Im not a programmer as you have understand already :wacko:  ) - but Im looking at the flow of products trough the company and how they should work.

 

Please - IF anybody have some clues for me, either if it´s just that Im thinking the wrong way, OR if there is any module/solution that lets me take care of this problem...it would be rely appreciated!!!! There must be a natural way of sorting this order, else the system wouldn't work with different stocks presented on the same page...right?

 

Kindly

 

Stefan

Link to comment
Share on other sites

  • 5 months later...
  • 7 months later...

I finally found a solution that solved many of my problems: I developed and added functionality that prevents this situation. Whenever some BO user changing the order's status to "shipped", it checks if there is enough stock on ALL products in the current order. If so, it continues as normal. But if not, it prevents the order's status change, and additionally shows an error message saying which product(s) is(are) out of stock, specifying how many units miss.

 

It's great, because it force you to do the things as you must: you CAN'T ship items that you hasn't in stock.

 

Regards,

 

Axel

 

Hi Axel,

 

Can you share the code on how to disable changing of order status if product is out of stock?

 

Thanks

Link to comment
Share on other sites

Hello, im sory if i am repeating anyone, but can't find the answer to this:

 

How can i configure the warehouse used in the order of my clients? Shouldn't i be able to change it once the order is paid? Or can't i set it to use the warehouse geografically closer to the client?

 

Thanks.

Link to comment
Share on other sites

  • 1 month later...

Hi,

Have been trying to get answers for this via posts but found this conversation that is sort of related.

 

I am making a bridging app to work with the PS API to simply update the stock quantities in a V1.6 Multi-Store with Advanced Stock Management from quantities I get from a warehouse DB.

 

While I can increase the quantities in the "stock_available" table, these quantities do not show up in the backend product list. So, what else, OR, what actually has to be updated so that the new quantities take effect?

 

Also, I have tried updating the "quantities" in the Products table via the API but that is write protected so can't be done. I'm not actually sure that it is required anyway or does it?

 

If this updating stock quantities can not be done via the API then I will go directly to the DB but I still need to know what has to be updated.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...

sevennet, on 17 Sept 2013 - 3:26 PM, said:snapback.png

Hi,

 

I may have found a bug in ASM.

 

A product with combination is remained in ps_stock table even if the combination is deleted from product.

 

To reproduce:

 

1. Create Product A with couple of combinations. Say 3 combinations (Red, Yellow, Green).

2. Make sure ASM is enabled and assigned to the warehouse

3. Go to Stock Management and add stock for Product A - Red. Say 10 quantities

 

** Below is the normal and expected behaviour: **

- Under Stock Management, Product A - Red = 10 quantities

- Under Stock Movement, you see a record called Product A - Red with 10 quantity increased

- Under Instant Stock Status, you see a record called Product A - Red 10 for Physical, Usable and Real Quantities

 

 

 

Now, do edit Product A and delete Red combination. You then get the following behaviour:

- Under Stock Management, you no longer see Product A - Red. GOOD

- Under Stock Movement, the record became Product A with increase of 10 quantities. Record is there for historical purpose but Red label is missing. This behaviour is still acceptable

- Under Instant Stock Status, you see a record called Product A 10 for Physical, Usable and Real Quantities.

 

Now this is a very bad behaviour because you can no longer remove this particular (deleted) Red combination from Stock Management.

Repeating the process will only cause multiple Product A record in Instant Stock Status page.

 

What make things worse is that these deleted stock counts into the total of Warehouse physical product quantities and stock valuation.

 

Problem happens on 1.5.4.1. Upgraded to 1.5.5.0 via 1-Click Upgrade and problem still persists.

 

Can someone please confirm if I'm doing it correctly or perhaps I am missed some steps. Else I will report this issue to the bug tracker.

Thanks

 

Great find and well described.  My advice (hope) is that creating a forge bug report would be a very good idea.  If you could also post the link to the bug report here that would be sublime.

 

Still happening in prestashop 1.6.1.....incredible

Edited by Tamara F (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

Hello, for some reason I am unable to add quantities for my products in ASM. The warehouse is configured correctly (please check the screenshot), but when go to add a product, the warehouse doesn't show in the list, from which it should be selected - the list is empty... In all other places the warehouse is present, like in Stock Movements, Instant Stock Status, etc. - my warehouse is selected by default. Upgraded from 1.6.1.0 to 1.6.1.1 but the problem is still present. Please help.

post-792606-0-57322800-1442307652_thumb.jpg

post-792606-0-14103800-1442307655_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...

Hello, for some reason I am unable to add quantities for my products in ASM. The warehouse is configured correctly (please check the screenshot), but when go to add a product, the warehouse doesn't show in the list, from which it should be selected - the list is empty... In all other places the warehouse is present, like in Stock Movements, Instant Stock Status, etc. - my warehouse is selected by default. Upgraded from 1.6.1.0 to 1.6.1.1 but the problem is still present. Please help.

 

That is because in PRODUCT details in wharehouse section, you have to select the desired wharehouse. Even if you only have one, you have to select it in each product.

 

Hope that helps!

Link to comment
Share on other sites

That is because in PRODUCT details in wharehouse section, you have to select the desired wharehouse. Even if you only have one, you have to select it in each product.

 

Hope that helps!

Thank you very much, it does help. Seems like this selection was done by default in previous PS versions. Anyways, thank you a bunch :)

Link to comment
Share on other sites

Hello,

 

I have 2 SKUs 100& 15G(combination) under one product. One of the combination (15g) is meant to be samples and not available for sales.

 

How do I make sure that the sample product is not available for sales but it can be given out as sample when an order is placed.

 

By he way, I am using advanced stock management system and the quantity is based on the stock in your warehouse.

 

I would want the 100g to use the existing settings but I want to set the 15g so that it is not available for purchase.

 

Appreciate your advise.

 

Thanks.

Link to comment
Share on other sites

×
×
  • Create New...