Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Poll
Was this helpful
Yes 7
No 0
Total Votes: 7
You must be a logged-in member to vote
add multiple config products to cart with attributes with example
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

Hello all,

Few days ago our client has asked us to add different quantity for different attributes. Trust me I have searched a lot for this and came up with no solution there were solutions but not meeting my requirement. So I have created my own plugin.

If you are searching for the same then you’ll are welcome.

My code will work for two attributes I have used color and size but this will work for any configurable products having two attributes.

You will need to install my extension attached and also don’t forget to replace list.pthml file with the attached one.

I am also attaching working example image files.

Hope this helps some one! you are welcome to ask for any queries. I will try to help smile

Image Attachments
added_cart.PNGmulti_config.PNG
File Attachments
app.zip  (File Size: 3KB - Downloads: 204)
list.phtml  (File Size: 21KB - Downloads: 176)
 
Magento Community Magento Community
Magento Community
Magento Community
 
iloveugly
Jr. Member
 
Total Posts:  6
Joined:  2012-10-29
 

Installed correctly and the list.phtml is working - however I keep getting 404 Page Not Found when the add to cart button is pressed.

Any ideas?

The module is installed correctly and showing as enabled in the config menu.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

Hey there,

Sorry for being late in reply.
Can you tell me what kind of matrix is that you are using. Unfortunately this module will work for 2*2 matrix only mean two attribute only.
If you are still receiving error do send me the exception log. I will defiantly help with the same.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

Hey,

Have downloaded the file and verified. Its working same for me.
I am not sure what type of error you are receiving.
Kindly replace the controller, list.php and config file again attached with this post. If you are still receiving error, done hesitate to ask for help.

For anyone who is facing problem, do let me know

File Attachments
list.phtml  (File Size: 21KB - Downloads: 62)
AddController.php  (File Size: 3KB - Downloads: 121)
config.xml  (File Size: 1KB - Downloads: 75)
 
Magento Community Magento Community
Magento Community
Magento Community
 
iloveugly
Jr. Member
 
Total Posts:  6
Joined:  2012-10-29
 

Ah, I see what you mean.

I will try again with your latest files and let you know.

I have two attributes, color and size.

Are you willing to help out with this extension for $$? If so, please PM me about it.

Here is a video of my problem, attached

File Attachments
Google ChromeScreenSnapz001.mov  (File Size: 6054KB - Downloads: 80)
 
Magento Community Magento Community
Magento Community
Magento Community
 
iloveugly
Jr. Member
 
Total Posts:  6
Joined:  2012-10-29
 

Hey,

Have done some testing.

It works on 1.6.0.2 but it doesn’t work on 1.7.0.2.

Even tried a completely fresh install of 1.7.0.2 and it still causes a 404 error upon adding to cart.
I have tested with products that have two attributes - size and color.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

I have also tried for 1.7
Can u please PM me your ftp details, so that I can help further

 
Magento Community Magento Community
Magento Community
Magento Community
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

Hey iloveugly,

Had a look into your attached video.
The problem with module not working is,
The product needs to have two attributes set for them . see the attached image with it has size + color option enabled.
I am sorry for this . But guess this wont work with your case.
I ll look into the code if I can make it for you,
I ll attach here as soon as possible

Regards,
Kajal

 
Magento Community Magento Community
Magento Community
Magento Community
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

Hello all,

For those who don’t have 2*2 matrix :

Replace the controller and list.phtml as attached with the post.

Iloveugly do let me know if this helps.

File Attachments
AddController.php  (File Size: 3KB - Downloads: 140)
list.phtml  (File Size: 22KB - Downloads: 87)
 
Magento Community Magento Community
Magento Community
Magento Community
 
shweta02
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2012-12-07
India
 

This is awesome post. But i want the multiorder in the view page. I am new in magento however I tried to copy the code of list.phtml in view.phtml but it gives me the error “Fatal error : Call to a member function setVisibility () on a non-object in E: \ server \ xampp \ htdocs \ shweta \ demo \ app \ code \ core \ Mage \ Catalog \ Model \ Product \ Visibility.php on line 68”. Please suggest me some solution.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
shweta02
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2012-12-07
India
 

Heyy.. for further trying the issue in view.phtml file is solved. But now it added only the quantity one. when we fill quantity greater than one even then it add the quantity only one in add to card. Please Reply ASAP.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Katelynn33
Jr. Member
 
Total Posts:  2
Joined:  2013-10-06
 

I think this problem should be handled by an option on the field setting such as “Hide if only one value is available”.

It should appear bellow “Enable this field to function as an attribute field on Add to Cart forms.”

Unfortunately I can’t code.

atlantis-hotel-dubai.com | http://plagiarism-checker.info/

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