Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F804076
D182.id473.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
Wed, Feb 26, 9:05 AM
Size
2 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:05 AM (5 h, 7 m)
Engine
blob
Format
Raw Data
Handle
576790
Attached To
D182: MINC-137 Shopping cart update via AJAX support
D182.id473.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
@@ -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),
@@ -4043,13 +4040,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');
+ }
+
}
Index: modules/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php
===================================================================
--- modules/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php
+++ modules/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php
@@ -194,4 +194,4 @@
return $elem1['TotalCost'] < $elem2['TotalCost'] ? -1 : 1;
}
-}
\ No newline at end of file
+}
Event Timeline
Log In to Comment