Selaa lähdekoodia

Merge branch 'dev'

prodstable
Guillaume 4 vuotta sitten
vanhempi
commit
161fe07edf
1 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. +8
    -2
      producer/controllers/OrderController.php

+ 8
- 2
producer/controllers/OrderController.php Näytä tiedosto

@@ -605,7 +605,7 @@ class OrderController extends ProducerBaseController
]);

// Produits
if (Producer::getConfig('option_allow_user_gift')) {
/*if (Producer::getConfig('option_allow_user_gift')) {
$productsArray = Product::find()
->orWhere(['id_producer' => $this->getProducer()->id,])
//->orWhere(['id_producer' => 0,]) // produit "Don";
@@ -613,7 +613,13 @@ class OrderController extends ProducerBaseController
} else {
$productsArray = Product::find()
->where(['id_producer' => $this->getProducer()->id,]);
}
}*/

$productsArray = Product::find()
->where([
'id_producer' => $this->getProducer()->id,
'active' => 1,
]);

$productsArray = $productsArray->joinWith(['productDistribution' => function ($query) use ($distribution) {
$query->andOnCondition('product_distribution.id_distribution = ' . $distribution->id);

Loading…
Peruuta
Tallenna