Child pages
  • [in-commerce] Shopping cart update via AJAX support [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

On the Front-End the "ord:OnUpdate" event is used to change shopping cart data (e.g. apply coupon).

To support shopping cart update via AJAX (without page reload) the "ord:OnUpdateAjax" event needs to be added.

Solution

  1. add the "OnUpdateAjax" event to the "OrdersEventHandler" class
  2. change the "OrdersEventHandler::CheckPermission" method to make all "OnUpdate*" event to be checked for ownership (order, which update is requested is owned by logged-in user)
BeforeAfter
modules\in-commerce\units\orders\orders_event_handler.php
if ( $event->Name == 'OnUpdate' ) {
modules\in-commerce\units\orders\orders_event_handler.php
if ( substr($event->Name, 0, 8) == 'OnUpdate' )  {

Related Discussions

Related Tasks

MINC-137 - Getting issue details... STATUS

2 Comments

  1. Erik Snarski [Intechnic], when adding link to the task post the link right from browser tab so that it's converted to proper macro on Confluence side. This way it will result in back link creation to this discussion from JIRA as well. I've fixed it by hand this time.

  2. Sponsored by rRPI21105.