Commit 0a93b48a0914b5eba809f5cd627f3a4ee9bee5dd
1 parent
c0dc5cad
-
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
common/modules/product/models/Product.php
... | ... | @@ -144,7 +144,7 @@ class Product extends \yii\db\ActiveRecord |
144 | 144 | */ |
145 | 145 | public function getVariant() |
146 | 146 | { |
147 | - return $this->hasOne(ProductVariant::className(), ['product_id' => 'product_id'])->orderBy('product_variant.product_variant_id', SORT_ASC); | |
147 | + return $this->hasOne(ProductVariant::className(), ['product_id' => 'product_id']); | |
148 | 148 | } |
149 | 149 | |
150 | 150 | public function getVariantPrice() { |
... | ... | @@ -155,7 +155,7 @@ class Product extends \yii\db\ActiveRecord |
155 | 155 | */ |
156 | 156 | public function getVariants() |
157 | 157 | { |
158 | - return $this->hasMany(ProductVariant::className(), ['product_id' => 'product_id'])->orderBy('product_variant.product_variant_id', SORT_ASC); | |
158 | + return $this->hasMany(ProductVariant::className(), ['product_id' => 'product_id']); | |
159 | 159 | } |
160 | 160 | |
161 | 161 | public function setVariants($variants) { | ... | ... |