Changeset View
Changeset View
Standalone View
Standalone View
modules/in-commerce/units/products/products_event_handler.php
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | |||||
$field_values = $this->getSubmittedFields($event); | $field_values = $this->getSubmittedFields($event); | ||||
$object->SetFieldsFromHash($field_values); | $object->SetFieldsFromHash($field_values); | ||||
$event->setEventParam('form_data', $field_values); | $event->setEventParam('form_data', $field_values); | ||||
if ($object->GetDBField('InventoryStatus') == 2) { | if ($object->GetDBField('InventoryStatus') == 2) { | ||||
// inventory by options (use first selected combination in grid) | // inventory by options (use first selected combination in grid) | ||||
$combinations = $this->Application->GetVar('poc_grid'); | $combinations = $this->Application->GetVar('poc_grid'); | ||||
list ($combination_id, ) = each($combinations); | $combination_id = key($combinations); | ||||
} | } | ||||
else { | else { | ||||
// inventory by product | // inventory by product | ||||
$combination_id = 0; | $combination_id = 0; | ||||
} | } | ||||
// save id of selected option combination & preselect it in grid | // save id of selected option combination & preselect it in grid | ||||
$this->Application->SetVar('combination_id', $combination_id); | $this->Application->SetVar('combination_id', $combination_id); | ||||
▲ Show 20 Lines • Show All 1472 Lines • Show Last 20 Lines |