Jump to content

Message "You already have the maximum quantity available for this product"


hitodev

Recommended Posts

Hello

 

I get this message when I add product to cart :

 

"You already have the maximum quantity available for this product"

 

- PrestaShop version 1.6.0.14

- Back office says there is 1 product in stock

- Prestashop is not in catalogue mode

- Prestashop is not in maintenance mode

 

 

{if $product->quantity > 0} test in stock! {/if}

in product.tpl returns "test in stock!" as expected.

 

Any idea?

Bug or configuration trap?

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

bump.

 

I see a lot of people with this problem and threads marked as solved when really it really isn’t.

I am using Prestashop 1.6.1.1 (as of now the latest version).

I have a new install.

If I try adding a product to the cart I get the error:

"You already have the maximum quantity available for this product"

I have seen numerous threads on this and tried all the “solutions” to no avail.

I have tried:

1) turned off maintenance mode.
2) turned off stock control
3) Turn on stock control and set the number of stock to 999999
4) Repair the database in phpmy admin
5) Executed correctly sql query: ALTER TABLE `ps_cart_product` DROP PRIMARY KEY;
6) Not in Catalogue mode.

I’m going nuts, I’m totally stuck.

Any thoughts?

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

Ok. Good news, I made a super noob mistake. I have been a web dev for over 7 years, (very new to Prestashop though), clearly I never used a CMS with so many tables.... I neve knew that PHPmyadmin had...  a page two!

 

Ok. On page two I found ps_stock_available and I can see both "id_shop" and  "id_shop_group" seams to be correct (1 and 0 respectively).

 

So I still cant work out how to get rid of: "You already have the maximum quantity available for this product"

 

So here is a question. If I have stock turned off, what would be the expected value for:

 

id_shop_group
quantity
depends_on_stock
out_of_stock

 

Or do you have any other suggestions?

Link to comment
Share on other sites

firstof all you should change category it's not development issue

 

second of all

the issue with incorect id_group_shop in ps_stock_available table is only one I know with that msg of maxcimum quantity

sorry I can't help u

 

btw you have correct values for id_shop and group

Link to comment
Share on other sites

firstof all you should change category it's not development issue

 

second of all

the issue with incorect id_group_shop in ps_stock_available table is only one I know with that msg of maxcimum quantity

sorry I can't help u

 

btw you have correct values for id_shop and group

 

Thanks anyway for your help... (..I can't change the category because I didn't post it originally).

Link to comment
Share on other sites

  • 1 month later...

Having same issue:

Multistore is disabled. Product quantity is 25 and in catalog showing right quantity and that is is active and available on my page is showing that it is in stock and whn I adding to the cart I get this message and no product in the cart. Cart is empty. Any ideas?

Edited by [email protected] (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 6 months later...
  • 1 year later...

Hello again,
I will share this in case anyone find it helpful.

Several customers of mine started to complain about the message they received when they tried to add a product in their cart :
"You already have the maximum quantity available for this product".
We use multistore with shared stock & we have stock management enabled but advanced stock management disabled.
For some reason there were several missing entries in the table ps_stock_available for enabled products with attributes. Any product that was missing was not allowed to be added in cart.  I run the following queries and i found which products with or without attributes miss their entry in ps_stock_available. We fixed each one by going to backoffice and replacing the stock number with any other number. 

 

select * from ps_product_attribute left join ps_stock_available 
on ps_stock_available.id_product_attribute = ps_product_attribute.id_product_attribute
where ps_product_attribute.id_product_attribute is null

select * from ps_product left join ps_stock_available 
on ps_stock_available.`id_product` = ps_product.`id_product`
where ps_stock_available.id_product is null 

 

  • Like 1
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...