Jump to content

[Solved] PS 1.4.6.1 Bug - Multiple combinations of same product in cart (maximum quantity reached)


tim967

Recommended Posts

When attempting to create a clothing product with 3 combinations available to the user(sizes small, medium and large) if i want to add 2 different sizes of the same product to the cart(2 combinations) it displays the error:

 

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

 

Also attached image of the error. As you can see i already have a medium version of the product in the cart but this occurs when i also try to add a small.

 

If there is another way i can do it please let me know or if anyone knows of a fix it would be greatly appreciated!

post-304800-0-87600600-1322329473_thumb.png

Link to comment
Share on other sites

This was a bug in 1.4.6.1, you can upgrade to 1.4.6.2 which had that issue fixed, or you can run the following 2 queries in phpMyAdmin (replace ps_ with your DB prefix if it is different).

 

ALTER TABLE `ps_cart_product` DROP PRIMARY KEY;

And

ALTER TABLE `ps_cart_product` ADD INDEX ( `id_cart` , `id_product` ) ;

  • Like 1
Link to comment
Share on other sites

This was a bug in 1.4.6.1, you can upgrade to 1.4.6.2 which had that issue fixed, or you can run the following 2 queries in phpMyAdmin (replace ps_ with your DB prefix if it is different).

 

ALTER TABLE `ps_cart_product` DROP PRIMARY KEY;

And

ALTER TABLE `ps_cart_product` ADD INDEX ( `id_cart` , `id_product` ) ;

Thank you so much! I've been looking all over the web today and couldn't find it anywhere. Had to do it manually with the queries as i had upgraded to 1.4.6.2 but it hadn't worked. thanks again!

Link to comment
Share on other sites

  • 1 month later...

Prestashop is not able to handle more than 1,000-3,000 combinations, it creates out of memory errors.

 

You can check out this module, which has a way around the problem http://www.prestashop.com/forums/index.php?/topic/47363-module-attribute-wizard-pro-create-an-unlimited-number-of-attributes-and-display-as-radio-button-checkbox-dropdown-textbox-teaxtarea-files/

Link to comment
Share on other sites

  • 3 weeks later...

Prestashop is not able to handle more than 1,000-3,000 combinations, it creates out of memory errors.

 

You can check out this module, which has a way around the problem http://www.prestasho...eaxtarea-files/

 

But it should display more than 11 attributes on a single product right? I have created 19 different fragance attributes but it only displays 11 on the drop dwon menu. Site @ virtualitycr.com/tienda

Link to comment
Share on other sites

  • 1 month later...

I have this problem aswell, can't seem to get it solved.

I did what Tomerg3 suggested, but the sql command;

ALTER TABLE `ps_cart_product` DROP PRIMARY KEY;

doesnt' work. Getting "#1091 - Can't DROP 'PRIMARY'; check that column/key exists"

 

I've updated my prestashop installation to 1.4.7 but that doesn't work either.

 

On my particular shop i've disabled the Stock funtctions, since i won't need it. All my products are handmade.

Still getting the " You already have the maximum quantity available for this product." error.

 

I have no clue what to do next....

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
  • 5 months later...

Same problem with PS1.5.3.1:

 

You already have the maximum quantity available for this product.

 

Any idea?

 

P.D.: Stock management is disabled

 

Note: solved, there was an error with the combination id... but the error message is confusing

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

Same problem as above on 1.5.0.17

Certain products can't be added to cart from the front-end even though Stock management is disabled and product is set as available etc. Trying to add the same product to a cart from the backend gives this error: "You already have the maximum quantity available for this product."

Seems like the same problem as marcis above. What was the error with the combination id that you solved here?

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I also have the problem with the error message: You already have the maximum quantity available for this product. I use the version 1.5.4.1.

 

I used prestashop store manager to upload new products and when I add one of the new products to my cart, I get the error message.

 

Anybody an Idea?

 

Thank you

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

  • 1 month later...

Hi,

 

the same problem !

 

Error message, when ordering porducts which have some combinations:

 

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

 

I use the version 1.5

 

Little solution is to regenerate combinations for product. Than it is working. But it is not easy to regenerate combinations for more than 1000 products.

 

Any solution ? Or some bulk action for regenerating combinations?

 

Thank you !

Link to comment
Share on other sites

Hi,

 

the same problem !

 

Error message, when ordering porducts which have some combinations:

 

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

 

I use the version 1.5

 

Little solution is to regenerate combinations for product. Than it is working. But it is not easy to regenerate combinations for more than 1000 products.

 

Any solution ? Or some bulk action for regenerating combinations?

 

Thank you !

 

You do need to regenerate the combinations once you updated the combinations. It will update the quantities along with it. If you are having trouble with that then take a look at this blog post about the php.ini file. It will help with generating Combinations, especially with the input time and max execution time. . http://www.prestasho...commerce-store/

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Hello.

Why is this marked as Solved if there is no solution...

 

I am using 1.5.6.2 version and get the same error. Is there a good solution to solve this issue?

I guess regenerating the combinations could work, but is there any faster way to do that? I have too many products to update.

Thanks

Link to comment
Share on other sites

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

This is a strange error, I very confused about where is the real error.... I only have this error in one of my items

http://www.thepinkrobin.com/shop/es/despedida/5-vintage-bride.html

When i try to add to cart this item is showing me the error, and the fact is the almost everything is configure on Pre Order and is out of stock, but neither any other item shows me this error except this item above.

 

I already try: fixing the data base, clearing cache, editing CartController.php, but i haven't found the error yet. If somebody solve it please post it... i will post it if I solve be it first.

Link to comment
Share on other sites

Hi AGomez_1,

 

Solution: when the shop is in CATALOG mode, everything can happen! Including this error, triggered by "we don't know what"...

 

Also in Maintenance mode, be aware that the shop/some modules may react on a non predictable way!

 

Regards

Link to comment
Share on other sites

  • 4 months later...
  • 6 months later...

Prestashop is not able to handle more than 1,000-3,000 combinations, it creates out of memory errors.

 

You can check out this module, which has a way around the problem http://www.prestashop.com/forums/index.php?/topic/47363-module-attribute-wizard-pro-create-an-unlimited-number-of-attributes-and-display-as-radio-button-checkbox-dropdown-textbox-teaxtarea-files/

So, If I have a catalogue with more than 3,000 I can't have any combination product, can I?

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...

I had a problem with the "You already have the maximum quantity available for this product." error when trying to order a product from Back Office. The solution was simple: I just had to make the product available for ordering again at Back Office > Products > Product > Information. Just tick the option for "Available for order".

  • Like 1
  • Haha 1
Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

I had a problem with the "You already have the maximum quantity available for this product." error when trying to order a product from Back Office. The solution was simple: I just had to make the product available for ordering again at Back Office > Products > Product > Information. Just tick the option for "Available for order".

 

This also worked for me, unsure how this has happened though or how many of my products are effected.

  • Haha 1
Link to comment
Share on other sites

  • 4 months later...

Hi Guys!

 

I think this is a good solution for this issue, It works for me.

 

1- use this query:

UPDATE `ps_product_attribute_shop` As A SET `id_product`= (SELECT id_product AS Main_ID
FROM `ps_product_attribute` As B WHERE B.`id_product_attribute` = A.`id_product_attribute`)
WHERE A.id_product=0

 

2- Clear all files in:

public_html/cache/cachefs

 

Regards,

Link to comment
Share on other sites

  • 4 weeks later...

Hi Guys!

 

I think this is a good solution for this issue, It works for me.

 

1- use this query:

UPDATE `ps_product_attribute_shop` As A SET `id_product`= (SELECT id_product AS Main_ID

FROM `ps_product_attribute` As B WHERE B.`id_product_attribute` = A.`id_product_attribute`)

WHERE A.id_product=0

 

2- Clear all files in:

public_html/cache/cachefs

 

Regards,

 

Where i should put that query ?

What file can you tell me please ?

Link to comment
Share on other sites

Where i should put that query ?

What file can you tell me please ?

Dear scolink,

 

This correction should use in your database.

If you are using a regular host with CPanel control, use these steps:

1- Log in to your host CPanel. (or other panels like Plesk or DirectAdmin or ...)

2-click on "phpmyadmin" icon. (or any similar icons in other panels)

3-when phpmyadmin web control appears, go to your database.

4-choose SQL tab

5-paste this query in the SQL text area and select RUN.

 

UPDATE `ps_product_attribute_shop` As A SET `id_product`= (SELECT id_product AS Main_ID

FROM `ps_product_attribute` As B WHERE B.`id_product_attribute` = A.`id_product_attribute`)

WHERE A.id_product=0

 

pay attention that this query just fix the combination product that already saved and for any new combination product, you should run this query again.

I will work on the permanent solution and will inform you as soon as I find it!

 

Regards.

Link to comment
Share on other sites

Dear scolink,

 

This correction should use in your database.

If you are using a regular host with CPanel control, use these steps:

1- Log in to your host CPanel. (or other panels like Plesk or DirectAdmin or ...)

2-click on "phpmyadmin" icon. (or any similar icons in other panels)

3-when phpmyadmin web control appears, go to your database.

4-choose SQL tab

5-paste this query in the SQL text area and select RUN.

 

UPDATE `ps_product_attribute_shop` As A SET `id_product`= (SELECT id_product AS Main_ID

FROM `ps_product_attribute` As B WHERE B.`id_product_attribute` = A.`id_product_attribute`)

WHERE A.id_product=0

 

pay attention that this query just fix the combination product that already saved and for any new combination product, you should run this query again.

I will work on the permanent solution and will inform you as soon as I find it!

 

Regards.

 

Hello,

I have PS 1.5.6.2 and It does not work.

The query runs but it does not edit anything.

'ps_product_attribute_shop' does not exist in my tables list.

 

Help please

 

thanks!

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

  • 9 months later...
  • 2 months later...
  • 3 months later...

This was a bug in 1.4.6.1, you can upgrade to 1.4.6.2 which had that issue fixed, or you can run the following 2 queries in phpMyAdmin (replace ps_ with your DB prefix if it is different).

 

ALTER TABLE `ps_cart_product` DROP PRIMARY KEY;
And

ALTER TABLE `ps_cart_product` ADD INDEX ( `id_cart` , `id_product` ) ;

 

It worked for me!! Thank you man. I am using 1.6.1.10

Link to comment
Share on other sites

  • 8 months later...
On 8/17/2015 at 1:38 PM, markop1 said:

I had a problem with the "You already have the maximum quantity available for this product." error when trying to order a product from Back Office. The solution was simple: I just had to make the product available for ordering again at Back Office > Products > Product > Information. Just tick the option for "Available for order".

Worked For me

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...