@@ -7,16 +7,16 @@ |
||
7 | 7 | |
8 | 8 | class ShopSingleProductController extends Controller |
9 | 9 | { |
10 | - public function page($id,$product_item_id = null){ |
|
11 | - $product = Product::find($id); |
|
12 | - if($product_item_id == null){ |
|
13 | - return redirect()->route('shop.single.product',[$product->id,$product->items->first()->id]); |
|
14 | - } |
|
10 | + public function page($id,$product_item_id = null){ |
|
11 | + $product = Product::find($id); |
|
12 | + if($product_item_id == null){ |
|
13 | + return redirect()->route('shop.single.product',[$product->id,$product->items->first()->id]); |
|
14 | + } |
|
15 | 15 | |
16 | - $details_fields = Template::getDetailsFields($product,$product_item_id); |
|
17 | - $configuration_fields = Template::getConfigurationFields($product_item_id); |
|
18 | - $btn_cart = Template::buttonCart($product_item_id); |
|
19 | - $price = Product::getPrice($product_item_id); |
|
20 | - return view('mongicommerce.pages.single-product',compact('product','details_fields','configuration_fields','btn_cart','price')); |
|
21 | - } |
|
16 | + $details_fields = Template::getDetailsFields($product,$product_item_id); |
|
17 | + $configuration_fields = Template::getConfigurationFields($product_item_id); |
|
18 | + $btn_cart = Template::buttonCart($product_item_id); |
|
19 | + $price = Product::getPrice($product_item_id); |
|
20 | + return view('mongicommerce.pages.single-product',compact('product','details_fields','configuration_fields','btn_cart','price')); |
|
21 | + } |
|
22 | 22 | } |