@@ -20,7 +20,7 @@ |
||
20 | 20 | use |
21 | 21 | CRUD, |
22 | 22 | Singleton; |
23 | - protected $data_model = [ |
|
23 | + protected $data_model = [ |
|
24 | 24 | 'id' => 'int', |
25 | 25 | 'title' => 'ml:text', |
26 | 26 | 'path' => 'ml:text', |
@@ -67,7 +67,7 @@ |
||
67 | 67 | |
68 | 68 | const PAYMENT_METHOD_CASH = 'shop:cash'; |
69 | 69 | |
70 | - protected $data_model = [ |
|
70 | + protected $data_model = [ |
|
71 | 71 | 'id' => 'int', |
72 | 72 | 'user' => 'int', |
73 | 73 | 'date' => 'int', |
@@ -20,7 +20,7 @@ |
||
20 | 20 | use |
21 | 21 | CRUD, |
22 | 22 | Singleton; |
23 | - protected $data_model = [ |
|
23 | + protected $data_model = [ |
|
24 | 24 | 'id' => 'int', |
25 | 25 | 'title' => 'ml:text', |
26 | 26 | 'path' => 'ml:text', |
@@ -23,7 +23,7 @@ |
||
23 | 23 | ':', |
24 | 24 | array_slice(Route::instance()->path, -1)[0] |
25 | 25 | ); |
26 | -$item = $Items->get_for_user(array_pop($item)); |
|
26 | +$item = $Items->get_for_user(array_pop($item)); |
|
27 | 27 | $Page->title($item['title']); |
28 | 28 | $Page->Description = description($item['description']); |
29 | 29 | $Page->canonical_url( |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $page = @$_GET['page'] ?: 1; |
26 | 26 | $count = @$_GET['count'] ?: Config::instance()->module('Shop')->items_per_page; |
27 | 27 | if ($Session->user()) { |
28 | - $orders = $Orders->get( |
|
28 | + $orders = $Orders->get( |
|
29 | 29 | $Orders->search( |
30 | 30 | [ |
31 | 31 | 'user' => $Session->get_user() |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $parent != $category['id'] // infinite loop protection |
25 | 25 | ) { |
26 | 26 | $parent = $Categories->get($category['parent']); |
27 | - if ($parent['parent'] == $category['id']) { // infinite loop protection |
|
27 | + if ($parent['parent'] == $category['id']) { |
|
28 | +// infinite loop protection |
|
28 | 29 | break; |
29 | 30 | } |
30 | 31 | $category['title'] = "$parent[title] :: $category[title]"; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | @$_GET['asc'] |
56 | 56 | ) |
57 | 57 | ); |
58 | -$orders_total = $Orders->search( |
|
58 | +$orders_total = $Orders->search( |
|
59 | 59 | [ |
60 | 60 | 'total_count' => 1 |
61 | 61 | ] + (array)$_GET, |
@@ -109,8 +109,7 @@ |
||
109 | 109 | ) |
110 | 110 | ], |
111 | 111 | [ |
112 | - 'class' => $item['listed'] ? 'cs-block-success cs-text-success' : |
|
113 | - ($item['in_stock'] || $item['soon'] ? 'cs-block-warning cs-text-warning' : 'cs-block-error cs-text-error') |
|
112 | + 'class' => $item['listed'] ? 'cs-block-success cs-text-success' : ($item['in_stock'] || $item['soon'] ? 'cs-block-warning cs-text-warning' : 'cs-block-error cs-text-error') |
|
114 | 113 | ] |
115 | 114 | ]; |
116 | 115 | }, |
@@ -113,7 +113,7 @@ |
||
113 | 113 | if (!$items) { |
114 | 114 | return; |
115 | 115 | } |
116 | -$items_total = $Items->search( |
|
116 | +$items_total = $Items->search( |
|
117 | 117 | [ |
118 | 118 | 'listed' => 1, |
119 | 119 | 'category' => $current_category, |