@@ -10,9 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | class DetailTypeSeeder extends Seeder |
| 12 | 12 | { |
| 13 | - public function run(){ |
|
| 14 | - foreach (DetailTypes::all() as $detail) { |
|
| 15 | - DB::table('detail_type')->insert(['name' => $detail]); |
|
| 16 | - } |
|
| 17 | - } |
|
| 13 | + public function run(){ |
|
| 14 | + foreach (DetailTypes::all() as $detail) { |
|
| 15 | + DB::table('detail_type')->insert(['name' => $detail]); |
|
| 16 | + } |
|
| 17 | + } |
|
| 18 | 18 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | class SettingsSeeder extends Seeder |
| 13 | 13 | { |
| 14 | - public function run(){ |
|
| 14 | + public function run(){ |
|
| 15 | 15 | $settings = new AdminSetting(); |
| 16 | 16 | $settings->shop_name = 'MongiCommerce'; |
| 17 | 17 | $settings->iban = 'DE79100110012626219557'; |
@@ -26,5 +26,5 @@ discard block |
||
| 26 | 26 | $settings->claim_email = '[email protected]'; |
| 27 | 27 | $settings->piva = '12345678901'; |
| 28 | 28 | $settings->save(); |
| 29 | - } |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | if($type === 'textarea'){ |
| 55 | 55 | $html = ''; |
| 56 | 56 | $html .= '<textarea data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield"></textarea>'; |
| 57 | - }else{ |
|
| 57 | + } else{ |
|
| 58 | 58 | $html .= '<input type="'.$type.'" data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield">'; |
| 59 | 59 | } |
| 60 | 60 | return $html; |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | if(count($informations) == $key +1){ |
| 33 | 33 | $condition = ''; |
| 34 | - }else{ |
|
| 34 | + } else{ |
|
| 35 | 35 | $condition = 'or'; |
| 36 | 36 | } |
| 37 | 37 | $g .= ('(a.product_detail_id ='.$product_detail_id.' and a.product_detail_value_id ='.$product_detail_value_id.') '.$condition.''); |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | $product_item_id = $result->product_item_id; |
| 47 | 47 | |
| 48 | 48 | return response()->json(route('shop.single.product',[$product_id,$product_item_id])); |
| 49 | - }else{ |
|
| 49 | + } else{ |
|
| 50 | 50 | return response()->json(false); |
| 51 | 51 | } |
| 52 | - }else{ |
|
| 52 | + } else{ |
|
| 53 | 53 | return response()->json(false); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | public static function getProducts($id = null){ |
| 53 | 53 | if($id === null){ |
| 54 | 54 | $products = Product::all(); |
| 55 | - }else{ |
|
| 55 | + } else{ |
|
| 56 | 56 | $products = Category::find($id)->products; |
| 57 | 57 | } |
| 58 | 58 | return $products; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $html .= "<label>{$label}</label>"; |
| 77 | 77 | $html .= "<input class='form-control' type='{$type}' value='{$value}'>"; |
| 78 | 78 | return $html; |
| 79 | - }else{ |
|
| 79 | + } else{ |
|
| 80 | 80 | $html = ''; |
| 81 | 81 | $html .= "<label>{$label}</label>"; |
| 82 | 82 | $html .= "<textarea class='form-control'>{$value}</textarea>"; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if(isset($filter[$detail->id])){ |
| 118 | 118 | if($filter[$detail->id] == $detail_value_id){ |
| 119 | 119 | $selected = 'selected'; |
| 120 | - }else{ |
|
| 120 | + } else{ |
|
| 121 | 121 | $selected = ''; |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -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 | } |