Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function updateAddToCartForm(&$form) |
||
16 | { |
||
17 | if ($this->owner->data()->getActiveDiscount()) { |
||
18 | $code = $this->owner->data()->Code; |
||
19 | $fields = $form->Fields(); |
||
20 | $fields->push( |
||
21 | HiddenField::create(AddToCartForm::getGeneratedValue( |
||
22 | $code, |
||
23 | 'discount_quantity_percentage', |
||
24 | $this->getDiscountFieldValue()) |
||
25 | )->setValue($this->getDiscountFieldValue() |
||
26 | )); |
||
42 |