change cart to plain post from ajax

This commit is contained in:
2016-01-04 22:02:59 +01:00
parent 2d9b527909
commit 1e206011d0
27 changed files with 622 additions and 349 deletions

View File

@@ -60,16 +60,24 @@ class ProductSearch extends Product
// $query->where('0=1');
return $dataProvider;
}
if ( !empty($this->barcode)){
$this->barcode = strtolower($this->barcode);
}
if ( !empty($this->product_number)){
$this->product_number = strtolower($this->product_number);
}
$query->andFilterWhere([
'product.id_product_category' => $this->id_product_category,
'product.id_account' => $this->id_account,
'product.status' => $this->status,
'lower(product.product_number)' => $this->product_number,
'lower(product.barcode)' => $this->barcode,
]);
$query->andFilterWhere(['like', 'product_number', $this->product_number])
->andFilterWhere(['like', 'barcode', $this->barcode])
->andFilterWhere(['like', 'name', $this->name]);
$query->andFilterWhere(['like', 'name', $this->name]);
return $dataProvider;
}