Try the Demo

Magento Forum

   
Cant add more than 101 bundled items to a bundle Product
 
dinc5150
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2012-08-11
Sydney, NSW Australia
 

I have a bundled product with 7 Options in the bundle.

I can add up to 101 items (total) spread across the 7 options, however if I try to add more I get the following SQL Error:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`DB_NAME`.`catalog_product_relation`, CONSTRAINT `FK_MAG_CAT_PRD_RELATION_CHILD_ID_MAG_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`child_id`) REFERENCES `mag_catalog_product_entity` (`entity_id`))

If I remove one of the items I can add another item. It always throws the error when I hit exacly 101 items. I can only find one other person with the same problem, without a solution http://forum.azmagento.com/how-to/bundle-products-adding-simples-91195.html.

I’m left scratching my head over this one. Any help would be appreciated.

Using Magento Community Edition 1.7.0.2

Thanks

 Signature 

David Sheiles

Digital Momentum Web Design and Development

 
Magento Community Magento Community
Magento Community
Magento Community
 
dinc5150
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2012-08-11
Sydney, NSW Australia
 

FIXED:
So after about 8 hrs of debugging and research I came across a post about being people being restricted to 1001 products in a category. Could 1001 be related to my 101… YES.

Hopefully this helps others out in the future

Simply increasing a value in php.ini to a higher number worked

max_input_vars 1000

The related post that I found was here. It\’s possibly due to a PHP function \"parse_str\", however I have not traced through each file to confirm this is the root of the error.

Please add to this post if you have a code fix for this issue as raising the max_input_vars can open yourself to attacks based on hash collisions.

 Signature 

David Sheiles

Digital Momentum Web Design and Development

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top