$this->_404();
}
+ $this->data['title'] = $productType->name;
$this->data['title'] = $productType->name;
$this->data['product_type'] = $productType->getPageData();
$this->data['products'] = [];
- $products = Product::where('product_type', $id)->get();
+ $products = Product::where('product_type', $id)->where('online', 1)->get();
foreach ($products as $item) {
$this->data['products'][$item->id] = $item->getPageData();
}
if ($product->product_type != $productType->id) {
continue;
}
+ if (!$product->online) {
+ continue;
+ }
$detail = new Item();
$detail->setTitle($product->name);
$detail->setHref($product->slug);