Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Tue, Aug 5, 2:45 AM

in-commerce

Index: branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
===================================================================
--- branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (revision 16839)
+++ branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (revision 16840)
@@ -37,10 +37,11 @@
*/
function OnEntireOrder($event)
{
- $object = $event->getObject();
+ $object = $event->getObject(array('skip_autoload' => true));
$sql = 'DELETE FROM '.$object->TableName.' WHERE AffiliatePlanId='.$this->Application->GetVar('ap_id');
$this->Conn->Query($sql);
+ $object->Clear();
$object->SetDBField('AffiliatePlanId', $this->Application->GetVar('ap_id'));
$object->SetDBField('ItemResourceId', -1);
$object->SetDBField('ItemType', 0);
@@ -91,4 +92,4 @@
$calculated_fields['']['ItemName'] = 'COALESCE(p.l' . $language_id . '_Name, p.l' . $primary_language_id . '_Name)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/units/coupon_items/coupon_items_event_handler.php
===================================================================
--- branches/5.2.x/units/coupon_items/coupon_items_event_handler.php (revision 16839)
+++ branches/5.2.x/units/coupon_items/coupon_items_event_handler.php (revision 16840)
@@ -54,10 +54,11 @@
*/
function OnEntireOrder($event)
{
- $object = $event->getObject();
+ $object = $event->getObject(array('skip_autoload' => true));
$sql = 'DELETE FROM '.$object->TableName.' WHERE CouponId='.$this->Application->GetVar('coup_id');
$this->Conn->Query($sql);
+ $object->Clear();
$object->SetDBField('CouponId', $this->Application->GetVar('coup_id'));
$object->SetDBField('ItemResourceId', -1);
$object->SetDBField('ItemType', 0);
@@ -108,4 +109,4 @@
$calculated_fields['']['ItemName'] = 'COALESCE(p.l' . $language_id . '_Name, p.l' . $primary_language_id . '_Name)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
-}
\ No newline at end of file
+}
Index: branches/5.2.x/units/discount_items/discount_items_event_handler.php
===================================================================
--- branches/5.2.x/units/discount_items/discount_items_event_handler.php (revision 16839)
+++ branches/5.2.x/units/discount_items/discount_items_event_handler.php (revision 16840)
@@ -104,10 +104,11 @@
*/
function OnEntireOrder($event)
{
- $object = $event->getObject();
+ $object = $event->getObject(array('skip_autoload' => true));
$sql = 'DELETE FROM '.$object->TableName.' WHERE DiscountId='.$this->Application->GetVar('d_id');
$this->Conn->Query($sql);
+ $object->Clear();
$object->SetDBField('DiscountId', $this->Application->GetVar('d_id'));
$object->SetDBField('ItemResourceId', -1);
$object->SetDBField('ItemType', 0);
@@ -158,4 +159,4 @@
$calculated_fields['']['ItemName'] = 'COALESCE(p.l' . $language_id . '_Name, p.l' . $primary_language_id . '_Name)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
-}
\ No newline at end of file
+}

Event Timeline