Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1102270
D182.id433.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, Aug 18, 2:28 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Aug 19, 2:28 PM (4 h, 18 m)
Engine
blob
Format
Raw Data
Handle
714055
Attached To
D182: MINC-137 Shopping cart update via AJAX support
D182.id433.diff
View Options
Index: modules/in-commerce/units/orders/orders_event_handler.php
===================================================================
--- modules/in-commerce/units/orders/orders_event_handler.php
+++ modules/in-commerce/units/orders/orders_event_handler.php
@@ -66,7 +66,7 @@
return false;
}
- if ( $event->Name == 'OnUpdate' ) {
+ if ( substr($event->Name, 0, 8) == 'OnUpdate' ) {
// all checks were ok -> it's user's order -> allow to modify
return true;
}
@@ -128,6 +128,7 @@
'OnSelectAddress' => Array('self' => true),
'OnProceedToBilling' => Array('self' => true),
'OnProceedToPreview' => Array('self' => true),
+ 'OnProceedToPreviewAjax' => array('self' => true),
'OnCompleteOrder' => Array('self' => true),
'OnUpdateAjax' => Array('self' => true),
@@ -4043,13 +4044,31 @@
/**
* 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)
{
- $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
+ $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)
+ {
+ $ajax_form_helper =& $this->Application->recallObject('AjaxFormHelper');
+ /* @var $ajax_form_helper AjaxFormHelper */
+
+ $ajax_form_helper->transitEvent($event, 'OnProceedToPreview');
+ }
+
}
Event Timeline
Log In to Comment