I am working on a project that uses Commerce Ajax Add to Cart and Commerce Line Item Types.

Everything works fine on its own. The issue comes up when there is a required field in the Line Item it stops the ajax cart from working and also not showing a message regarding the required field.

No error messages are logged that I see. Nothing reports in console. Running version 7.x-2.1. Any thoughts?

Comments

DLC-AJ created an issue. See original summary.

subhojit777’s picture

Thanks for reporting the issue. I guess I came across something similar to this few months ago, someone else was having the same problem. I thought the problem is fixed.

DLC-AJ’s picture

I saw that other issue. It may be related to just radio/checkboxes but I need to finish testing to confirm that. I will check back in later and let you know what I find.

DLC-AJ’s picture

Sorry it took so long to get back to you. I have noticed that the module is respecting the required fields but it is not allowing the alert message to show notifying the user about it.

Any thoughts. I am not seeing any error messages.

Thanks

DLC-AJ’s picture

Issue tags: +omega, +Ajax, +status_messages

Alright so I have figured this out. Your module works as designed. The issue comes in with the line

$commands[] = ajax_command_before('#main-content', theme('status_messages'));

When using my Omega 4 build there is not a matching ID #main-content therefore I needed to update this line to match the div structure for my build.

Thanks for the great module.

subhojit777’s picture

Status: Active » Closed (works as designed)

Cool, thanks.