Index: branches/5.3.x/units/product_option_combinations/product_option_combinations_event_handler.php =================================================================== diff -u -N -r15492 -r15695 --- branches/5.3.x/units/product_option_combinations/product_option_combinations_event_handler.php (.../product_option_combinations_event_handler.php) (revision 15492) +++ branches/5.3.x/units/product_option_combinations/product_option_combinations_event_handler.php (.../product_option_combinations_event_handler.php) (revision 15695) @@ -1,6 +1,6 @@ setSelectSQL($sql); // 2. loads if allowed - $auto_load = $this->Application->getUnitOption($event->Prefix, 'AutoLoad'); + $auto_load = $event->getUnitConfig()->getAutoLoad(); $skip_autoload = $event->getEventParam('skip_autoload'); if ( $auto_load && !$skip_autoload ) { @@ -370,14 +370,14 @@ // check if product inventory management is via options and then proceed $id = $event->getEventParam('id'); - $products_table = $this->Application->getUnitOption('p', 'TableName'); - $table_name = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); + $products_table = $this->Application->getUnitConfig('p')->getTableName(); + $config = $event->getUnitConfig();; + $sql = 'SELECT p.InventoryStatus FROM ' . $products_table . ' p - LEFT JOIN ' . $table_name . ' poc ON poc.ProductId = p.ProductId - WHERE poc.' . $id_field . ' = ' . $id; + LEFT JOIN ' . $config->getTableName() . ' poc ON poc.ProductId = p.ProductId + WHERE poc.' . $config->getIDField() . ' = ' . $id; $inventory_status = $this->Conn->GetOne($sql); if ( $inventory_status == ProductInventory::BY_OPTIONS ) {