|
@@ 102-107 (lines=6) @@
|
| 99 |
|
|
| 100 |
|
// price | old_price | both of them |
| 101 |
|
if ($this->params['type'] == self::BEP_TYPE_NORMAL) { |
| 102 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_PRICE |
| 103 |
|
|| $this->params['sel_field'] == self::BEP_FIELD_ALL |
| 104 |
|
) { |
| 105 |
|
$args['field_to'] = self::BEP_FIELD_PRICE; |
| 106 |
|
$args['field_from'] = self::BEP_FIELD_PRICE; |
| 107 |
|
} |
| 108 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_OLDPRICE) { |
| 109 |
|
$args['field_to'] = self::BEP_FIELD_OLDPRICE; |
| 110 |
|
$args['field_from'] = self::BEP_FIELD_OLDPRICE; |
|
@@ 108-111 (lines=4) @@
|
| 105 |
|
$args['field_to'] = self::BEP_FIELD_PRICE; |
| 106 |
|
$args['field_from'] = self::BEP_FIELD_PRICE; |
| 107 |
|
} |
| 108 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_OLDPRICE) { |
| 109 |
|
$args['field_to'] = self::BEP_FIELD_OLDPRICE; |
| 110 |
|
$args['field_from'] = self::BEP_FIELD_OLDPRICE; |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_ALL) { |
| 114 |
|
$updateRule[$args['field_to']] = new \yii\db\Expression( |
|
@@ 127-130 (lines=4) @@
|
| 124 |
|
$args['field_from'] = self::BEP_FIELD_OLDPRICE; |
| 125 |
|
} |
| 126 |
|
} elseif ($this->params['type'] == self::BEP_TYPE_RELATIVE) { |
| 127 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_PRICE) { |
| 128 |
|
$args['field_to'] = self::BEP_FIELD_OLDPRICE; |
| 129 |
|
$args['field_from'] = self::BEP_FIELD_PRICE; |
| 130 |
|
} |
| 131 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_OLDPRICE) { |
| 132 |
|
$args['field_to'] = self::BEP_FIELD_PRICE; |
| 133 |
|
$args['field_from'] = self::BEP_FIELD_OLDPRICE; |
|
@@ 131-134 (lines=4) @@
|
| 128 |
|
$args['field_to'] = self::BEP_FIELD_OLDPRICE; |
| 129 |
|
$args['field_from'] = self::BEP_FIELD_PRICE; |
| 130 |
|
} |
| 131 |
|
if ($this->params['sel_field'] == self::BEP_FIELD_OLDPRICE) { |
| 132 |
|
$args['field_to'] = self::BEP_FIELD_PRICE; |
| 133 |
|
$args['field_from'] = self::BEP_FIELD_OLDPRICE; |
| 134 |
|
} |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
$updateRule[$args['field_to']] = new \yii\db\Expression( |