Page MenuHomeIn-Portal Phabricator

D182.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 5:17 AM

D182.diff

Index: branches/5.2.x/units/orders/orders_event_handler.php
===================================================================
--- branches/5.2.x/units/orders/orders_event_handler.php
+++ branches/5.2.x/units/orders/orders_event_handler.php
@@ -65,11 +65,6 @@
// user can't edit orders being processed
return false;
}
-
- if ( $event->Name == 'OnUpdate' ) {
- // all checks were ok -> it's user's order -> allow to modify
- return true;
- }
}
}
}
@@ -128,7 +123,9 @@
'OnSelectAddress' => Array('self' => true),
'OnProceedToBilling' => Array('self' => true),
'OnProceedToPreview' => Array('self' => true),
+ 'OnProceedToPreviewAjax' => array('self' => true),
'OnCompleteOrder' => Array('self' => true),
+ 'OnUpdate' => array('self' => true),
'OnUpdateAjax' => Array('self' => true),
'OnRemoveCoupon' => Array('self' => true),
@@ -4079,13 +4076,29 @@
/**
* Performs order update and returns results in format, needed by FormManager
*
- * @param kEvent $event
+ * @param kEvent $event Event.
+ *
+ * @return void
*/
- function OnUpdateAjax($event)
+ protected function OnUpdateAjax(kEvent $event)
{
+ /** @var AjaxFormHelper $ajax_form_helper */
$ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
- /* @var $ajax_form_helper AjaxFormHelper */
-
$ajax_form_helper->transitEvent($event, 'OnUpdate');
}
+
+ /**
+ * Performs order update after billing step submission and returns results in format, needed by FormManager
+ *
+ * @param kEvent $event Event.
+ *
+ * @return void
+ */
+ protected function OnProceedToPreviewAjax(kEvent $event)
+ {
+ /** @var AjaxFormHelper $ajax_form_helper */
+ $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
+ $ajax_form_helper->transitEvent($event, 'OnProceedToPreview');
+ }
+
}

Event Timeline