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