| Project: | Ubercart AJAX Cart |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | tunic |
| Status: | active |
| Issue tags: | cart operations, Ubercart, uc ajax cart |
Issue Summary
UC Ajax cart feedback messages on cart operations can't be customized. This is due those messages come from different sources: from Ubecart, from UC AJax Cart module or from the JS UC Ajax Cart Layer.
The ajax cart operations flow is:
- An ajax petition is done to server
- uc_ajax_cart_callback routes the petition to the right function. Usually implies to call drupal_execute_form on an Ubercart standard form.
- Drupal messages are themed and this is the answer send back to client.
So, customizable messages must ignore those drupal setted messages, check by its own if operation has been ok and send back to client the appropiate message. AFAIK Ubercart don't offer this check in its API, so it must be done manually.
One way could be check cart contents before and after operation, but this is more expensive and module must know all operation logic to check results.
See #1047188: How to replace the text strings in $settings for more info.