In spite of everything I get Drupal Messages: Product added to the cart.
I suggest that instead of Ajax command[] use drupal_get_messages()

Comments

lukasss created an issue. See original summary.

subhojit777’s picture

Can you tell us what's wrong with the previous implementation.

lukasss’s picture

1. I add to cart any products. Its fine!
2. I go to any page and I see Drupal Messages: Product added to the cart

subhojit777’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Assigned: lukasss » subhojit777

  • subhojit777 committed bf9482e on 7.x-2.x
    Issue #2725419 by lukasss: Show Drupal Messages
    
subhojit777’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

lukasss’s picture

It really is already been fixed?
I don't see this hotfix in 7.x-2.11 and 7.x-2.x-dev

subhojit777’s picture

The fix is in the latest 7.x release. Can you show me screenshots/gif of what you are doing.

lukasss’s picture

I can only see part of the fix, but I don't see this part:

// Clear status messages if any.
-$commands[] = ajax_command_remove('div.messages');
+drupal_get_messages();

subhojit777’s picture

I made some modifications. Your patch pointed out the problem in this module, but it was not aligned with the purpose of this module. So, I made a couple of changes http://cgit.drupalcode.org/dc_ajax_add_cart/commit/?id=bf9482e

lukasss’s picture

Then everything is clear, thank you.
But still I do not understand why to show the usual message when you open a modal window?

subhojit777’s picture

Good point :) You can disable the popup. There's a setting. You can find it here admin/commerce/config/ajax-cart/pop-up-message - Display popup message

lukasss’s picture

Yes, I can disable the window! But it is very necessary!
It would be nice if you could disable normal message.
Thanks for the quick answers!

Neo13’s picture

You can disbale the normal message in rules at admin/config/workflow/rules/reaction/manage/commerce_cart_add_to_cart_message.