protected function setPriceRules(array $order)
    {
        foreach (array_keys($order['data']['components']) as $component_id) {
            if (is_numeric($component_id)) {
                $rule = $this->price_rule->get($component_id);
                if (isset($rule['code']) && $rule['code'] !== '') {
                    $this->price_rule->setUsed($rule['price_rule_id']);
                }
            }
        }
    }
protected function setPriceRules(array $order)
    {
        foreach (array_keys($order['data']['components']) as $component_id) {
            if (is_numeric($component_id)) {
                $rule = $this->price_rule->get($component_id);
                if (isset($rule['code']) && $rule['code'] !== '') {
                    $this->price_rule->setUsed($rule['price_rule_id']);
                }
            }
        }
    }
protected function setPriceRules ( array $ order ) { foreach ( array_keys ( $ order [ 'data' ] [ 'components' ] ) as $ component_id ) { if ( is_numeric ( $ component_id ) ) { $ rule = $ this -> price_rule -> get ( $ component_id ) ; if ( isset ( $ rule [ 'code' ] ) && $ rule [ 'code' ] !== '' ) { $ this -> price_rule -> setUsed ( $ rule [ 'price_rule_id' ] ) ; } } } }
Sets price rules after the order was created
@param array $order
Sets price rules after the order was created