Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727028
D182.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 5:17 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 5:17 AM (3 d, 2 h ago)
Engine
blob
Format
Raw Data
Handle
537095
Attached To
D182: MINC-137 Shopping cart update via AJAX support
D182.diff
View Options
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
Log In to Comment