New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong quantities showing in BO for products with combinations #12814
Comments
Hi @oskarna, Thanks for your report. About this solution:
I think, it is the best solution to ovoid your problem.
Yes, you are right, we are aware of this issue, it is added to our debug roadmap. |
@oskarna try to not decrease quantities manualy but make an order from the front (like regular customer). One of my friend use Prestashop as PoS system. When something is sold in local store then his employee use his customer account to make an order. |
@PrestaShark Check table "pr_stock_available". Sort products by ID and You will see combination with quantity larger than zero. You can edit it and problem will be solved. |
It is different situation, @khouloudbelguith |
I have the same behavior described by @oskarna. In fact when we delete the combination with Before the suppression of the combination @marionf, what do you think? |
This is "still" outstanding right ? Be great to get this "minor" bug that has large ramifications for so many ...fixed ! I see a lot of chatter but very little movement :( |
Experiencing the same issue on 1.7.7.4. |
In my case the issue is related to the cancellation of 2 product combinations with still 2 and 3 stocks, which led to a total of 5 available even if the "published" combinations were 0 (non available). I fixed the numbers on database and it was sorted for my specific case, but I guess that some sort of check on the stock quantity should be taken in consideration when a combination erase has been triggered. |
Hello, I present the same problem. Removing a combination does not remove the stock, nor does it remove the id_product_attribute. https://drive.google.com/file/d/11RBnPRE92TnHw7Akqxyc-lk5jX6nKFZ0/view?usp=sharing Php 7.4 |
We are the same problem at version 1.7.8.7 Not fixed yet? Any update? |
any update? bump topic, i've the same problem |
For this issue, why not to hide unavailable combination ? 🤔 |
@MatShir also, probably to be validated on the new product list in 8.1 |
Still present on the new product page. We have a workaround (we can hide the attribute out of stocks) for the FO until someone make a contribution on this issue |
This issue is still present in PS 8.1.1. My analysis suggests that the rows in ps_stock_available are not being removed for combinations when the parent product is not removed also. I can find affected lines with this sql: I'd like to know if just removing the offending lines in ps_stock_available will be enough or are there other rows which need to be tidied up as well? It looks as if ps_stock_available records where id_product_attribute = 0 need to be updated too. |
Has anyone found a solution to this problem yet? |
I noticed out that Prestashop is calculating wrong quantities in a certain case for products with quantities. After several tests I have found out how is it happening.
This issue is quite problematic for shops, that decided to control their quantities by prestashop's BO, instead of inventory managemenet software etc. I know this type of software COULD help, but this is Prestashop bug that should be fixed anyway.
How to achieve it?
Simple description
Detailed description
1.) We have product XYZ with size combinations:
S, M, L, XL.
in database inside table pr_stock_available they have id_product_attribute:
120, 121, 122, 123
2.) Customer is making order for 5 pieces of M size.
3.) Now we are deleting size M from product XYZ only. We are deleting it because we need to make it not appear, because for e.g. this size for product XYZ it is temporary not avaible for some reason.
4.) We are adding size M back to our product XYZ (we decided to put it in offer again).
If we take a look in database now - id_product_attribute for new "size M" have different ID than before. So we have again sizes:
S, M, L, XL,
but in database their IDs are:
120, 4117, 122, 123.
5.) Our customer from pt. 2 is returning product (5 pieces). We are changing order status for cancelled - quantity is returned back to combination with ID 121.
Now we can make another look in database.
Combination with ID 121 is recreated back and now for our product XYZ we have 5 combinations:
120, 121, 122, 123, 4117
Our old "size M" combination have id 121 with quantity that is equal 5.
Now in BO we can edit combinations of our product like this:
size S = quantity 0
size M = quantity 0
size L = quantity 0
size XL = quantity 0
In moment that we hit "save" button, prestashop is calculating overall quantity (that is show in BO products list):
0+0+0+0+5= 5 pieces
but in backoffice we can clearly see in combinations tab that they are set for 0.
We can set product for "simple product" and set quantity to "0". Unfortunately after we generate combinations - after we hit "save" button - quantity is calculated wrong way again.
Half-solutions?
Half-solutions that we have tried are listed below. But in cases A and B it is hard to precisely determine when we have to fix our product. It may be a while before we find it out.
A.) You can manually change quantity of invisible combination in database.
This soultion is not acceptable for shop that have dozens of orders per day.
B.) We could create custom "cancelled" status for orders, that is not returning quantites back. Sadly it is not good solution for shop with huge amount of orders.
C.) We could (in front) hide combinations that have quantity 0 and never delete them in BO. It will not work for shops that are using option for products on request:
Availability preferences -> Behavior when out of stock -> Allow orders
info
PrestaShop version: tested at 1.7.5, 1.7.4.4, 1.7.4.2, 1.7.3.1
PHP version: 7.0.32, 7.2.11
The text was updated successfully, but these errors were encountered: