@@ -12,9 +12,12 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php if (count($groups) == 0) : ?> |
14 | 14 | <p><?php e(t('No attribute groups has been selected.')); ?> <a href="<?php e(url('select_attribute_group')); ?>"><?php e(t('Choose attribute groups')); ?></a>.</p> |
15 | -<?php else : ?> |
|
15 | +<?php else { |
|
16 | + : ?> |
|
16 | 17 | |
17 | -<form action="<?php e(url(null, array($context->subview()))); ?>" method="post"> |
|
18 | +<form action="<?php e(url(null, array($context->subview()))); |
|
19 | +} |
|
20 | +?>" method="post"> |
|
18 | 21 | <input type="hidden" name="id" value="<?php e($product->getId()); ?>" /> |
19 | 22 | <table summary="<?php e(t('Variations')); ?>" id="variations_table" class="stripe"> |
20 | 23 | <caption><?php e(t('Variations')); ?></caption> |
@@ -70,8 +73,10 @@ discard block |
||
70 | 73 | </td> |
71 | 74 | <td><?php if ($variation !== null) : |
72 | 75 | e($variation->getNumber()); |
73 | -else : |
|
76 | +else { |
|
77 | + : |
|
74 | 78 | e('-'); |
79 | +} |
|
75 | 80 | endif; ?> |
76 | 81 | </td> |
77 | 82 | <td> |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <div id="colOne"> |
2 | 2 | |
3 | 3 | <div class="box"> |
4 | - <h2><?php e(t('Product')); ?> #<?php e($product->get('number')); ?> <?php e($product->get('name')); ?></h2> |
|
5 | - <h2><?php e(t('Variation')); ?> #<?php e($variation->getNumber()); ?> <?php e($variation->getName()); ?></h2> |
|
4 | + <h2><?php e(t('Product')); ?> #<?php e($product->get('number')); ?> <?php e($product->get('name')); ?></h2> |
|
5 | + <h2><?php e(t('Variation')); ?> #<?php e($variation->getNumber()); ?> <?php e($variation->getName()); ?></h2> |
|
6 | 6 | <ul class="options"> |
7 | 7 | <li><a href="<?php e(url('../../')); ?>"><?php e(t('close')); ?></a></li> |
8 | 8 | </ul> |
@@ -11,9 +11,12 @@ |
||
11 | 11 | |
12 | 12 | <?php if ($groups->count() == 0) : ?> |
13 | 13 | <p><?php e(t('No attribute groups has been created.')); ?> <a href="attribute_group_edit.php"><?php e(t('Create attribute group')); ?></a>.</p> |
14 | -<?php else : ?> |
|
14 | +<?php else { |
|
15 | + : ?> |
|
15 | 16 | |
16 | -<form action="<?php e(url()); ?>" method="post"> |
|
17 | +<form action="<?php e(url()); |
|
18 | +} |
|
19 | +?>" method="post"> |
|
17 | 20 | <input type="hidden" name="id" value="<?php e($product->getId()); ?>" /> |
18 | 21 | <table summary="<?php e(t('Attribute groups')); ?>" id="attribute_group_table" class="stripe"> |
19 | 22 | <caption><?php e(t('Attribute groups')); ?></caption> |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <div id="colOne"> |
2 | 2 | |
3 | 3 | <div class="box"> |
4 | - <h2>#<?php e($product->get('number')); ?> <?php e($product->get('name')); ?></h2> |
|
4 | + <h2>#<?php e($product->get('number')); ?> <?php e($product->get('name')); ?></h2> |
|
5 | 5 | <ul class="options"> |
6 | 6 | <?php if ($product->get('locked') != 1) { ?> |
7 | 7 | <li><a href="<?php e(url(null, array('edit'))); ?>"><?php e(t('Edit')); ?></a></li> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <td> |
40 | 40 | <?php |
41 | 41 | // getting settings |
42 | - $unit_choises = Product::getUnits(); |
|
42 | + $unit_choises = Product::getUnits(); |
|
43 | 43 | e(t($unit_choises[$product->get('unit_id')]['combined'])); |
44 | 44 | ?> |
45 | 45 | </td> |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } else { |
94 | 94 | $account = Account::factory($year, $product->get('state_account_id')); |
95 | 95 | if ($account->get('name')) { |
96 | - e($account->get('number') . ' ' . $account->get('name')); |
|
96 | + e($account->get('number').' '.$account->get('name')); |
|
97 | 97 | } else { |
98 | 98 | echo t('Not set'); |
99 | 99 | } |
@@ -165,10 +165,10 @@ discard block |
||
165 | 165 | <td><?php e($variation->getNumber()); ?></td> |
166 | 166 | <td><?php e($variation->getName()); ?></td> |
167 | 167 | <td><?php e($variation->getDetail()->getPrice($product)->getAsLocal('da_dk', 2)); ?> </td> |
168 | - <td><?php e($product->get('weight')+$variation->getDetail()->getWeightDifference()); ?></td> |
|
168 | + <td><?php e($product->get('weight') + $variation->getDetail()->getWeightDifference()); ?></td> |
|
169 | 169 | <?php if ($kernel->user->hasModuleAccess("stock") and $product->get('stock')) : ?> |
170 | 170 | <td><?php e($variation->getStock($product)->get('actual_stock')); ?></td> |
171 | - <td><a href="<?php e(url('variation/' . $variation->getId())); ?>"><?php e(t('Details')); ?></a></td> |
|
171 | + <td><a href="<?php e(url('variation/'.$variation->getId())); ?>"><?php e(t('Details')); ?></a></td> |
|
172 | 172 | <?php endif; ?> |
173 | 173 | |
174 | 174 | </tr> |
@@ -197,9 +197,9 @@ discard block |
||
197 | 197 | $related = $product->getRelatedProducts(); |
198 | 198 | if (!empty($related) and count($related) > 0) { |
199 | 199 | foreach ($related as $p) { |
200 | - echo '<li>'. $p['name']; |
|
200 | + echo '<li>'.$p['name']; |
|
201 | 201 | if ($p['locked'] == 0) { |
202 | - echo ' <a class="delete" href="'.url('related', array('delete', 'del_related' => $p['related_id'])) .'">'.t('remove').'</a>'; |
|
202 | + echo ' <a class="delete" href="'.url('related', array('delete', 'del_related' => $p['related_id'])).'">'.t('remove').'</a>'; |
|
203 | 203 | } |
204 | 204 | echo '</li>'; |
205 | 205 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | <?php $category_type = new Intraface_Category_Type('shop', $shop->getId()); ?> |
255 | 255 | <h3><?php e($shop->getName()); ?></h3> |
256 | 256 | <ul class="options"> |
257 | - <li><a href="<?php e(url('shop/'. $shop->getId() . '/categories/', array('product_id' => $product->getId()))); ?>"><?php e(t('Add product to categories')); ?></a></li> |
|
257 | + <li><a href="<?php e(url('shop/'.$shop->getId().'/categories/', array('product_id' => $product->getId()))); ?>"><?php e(t('Add product to categories')); ?></a></li> |
|
258 | 258 | </ul> |
259 | 259 | <?php |
260 | 260 | $category = new Intraface_Category($kernel, $db, $category_type); |
@@ -128,10 +128,12 @@ discard block |
||
128 | 128 | <ul class="options"> |
129 | 129 | <li><a href="<?php e(url('variations/select_attribute_groups')); ?>"><?php e(t('Select attributes for product')); ?></a></li> |
130 | 130 | </ul> |
131 | - <?php else : ?> |
|
131 | + <?php else { |
|
132 | + : ?> |
|
132 | 133 | <?php |
133 | 134 | try { |
134 | 135 | $variations = $product->getVariations(); |
136 | +} |
|
135 | 137 | $variation_is_present = true; |
136 | 138 | } catch (Intraface_Gateway_Exception $e) { |
137 | 139 | $variation_is_present = false; |
@@ -142,9 +144,12 @@ discard block |
||
142 | 144 | <ul class="options"> |
143 | 145 | <li><a href="<?php e(url('variations', array('edit'))); ?>"><?php e(t('Create variations for the product')); ?></a></li> |
144 | 146 | </ul> |
145 | - <?php else : ?> |
|
147 | + <?php else { |
|
148 | + : ?> |
|
146 | 149 | |
147 | - <table summary="<?php e(t('Variations')); ?>" id="variations_table" class="stripe"> |
|
150 | + <table summary="<?php e(t('Variations')); |
|
151 | +} |
|
152 | +?>" id="variations_table" class="stripe"> |
|
148 | 153 | <caption><?php e(t('Variations')); ?></caption> |
149 | 154 | <thead> |
150 | 155 | <tr> |
@@ -13,9 +13,12 @@ discard block |
||
13 | 13 | |
14 | 14 | <?php if (!$context->getProduct()->isFilledIn()) : ?> |
15 | 15 | <p><?php e(t('No products has been created.')); ?> <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('create product')); ?></a>.</p> |
16 | -<?php else : ?> |
|
16 | +<?php else { |
|
17 | + : ?> |
|
17 | 18 | |
18 | -<form action="<?php e(url()); ?>" method="get" class="search-filter"> |
|
19 | +<form action="<?php e(url()); |
|
20 | +} |
|
21 | +?>" method="get" class="search-filter"> |
|
19 | 22 | <fieldset> |
20 | 23 | <legend><?php e(t('Search')); ?></legend> |
21 | 24 | <!-- |
@@ -65,9 +68,12 @@ discard block |
||
65 | 68 | |
66 | 69 | <?php if (count($context->getProducts()) == 0) : ?> |
67 | 70 | <p><?php e(t('no products in search')); ?>.</p> |
68 | - <?php else : ?> |
|
71 | + <?php else { |
|
72 | + : ?> |
|
69 | 73 | |
70 | - <table summary="<?php e(t('products')); ?>" id="product_table" class="stripe"> |
|
74 | + <table summary="<?php e(t('products')); |
|
75 | +} |
|
76 | +?>" id="product_table" class="stripe"> |
|
71 | 77 | <caption><?php e(t('products')); ?> (<?php e(t('prices excl. vat')); ?>)</caption> |
72 | 78 | <thead> |
73 | 79 | <tr> |
@@ -15,8 +15,11 @@ |
||
15 | 15 | |
16 | 16 | <?php if ($groups->count() == 0) : ?> |
17 | 17 | <p><?php e(t('No attribute groups has been created.')); ?> <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create attribute group')); ?></a>.</p> |
18 | -<?php else : ?> |
|
18 | +<?php else { |
|
19 | + : ?> |
|
19 | 20 | |
20 | - <?php echo $content; ?> |
|
21 | + <?php echo $content; |
|
22 | +} |
|
23 | +?> |
|
21 | 24 | |
22 | 25 | <?php endif; ?> |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | </tr> |
7 | 7 | <tr> |
8 | 8 | <td><?php e(t('Number')); ?></td> |
9 | - <td><?php e($product->get('number')); ?></td> |
|
9 | + <td><?php e($product->get('number')); ?></td> |
|
10 | 10 | </tr> |
11 | 11 | <tr> |
12 | 12 | <td><?php e(t('Name')); ?></td> |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | <td><?php e($variation->getNumber()); ?></td> |
88 | 88 | <td><?php e($variation->getName()); ?></td> |
89 | 89 | <td><?php e($variation->getDetail()->getPrice($product)->getAsLocal('da_dk', 2)); ?> </td> |
90 | - <td><?php e($product->get('weight')+$variation->getDetail()->getWeightDifference()); ?></td> |
|
90 | + <td><?php e($product->get('weight') + $variation->getDetail()->getWeightDifference()); ?></td> |
|
91 | 91 | <?php if ($kernel->user->hasModuleAccess("stock") and $product->get('stock')) : ?> |
92 | 92 | <td><?php e($variation->getStock($product)->get('actual_stock')); ?></td> |
93 | 93 | <?php endif; ?> |
@@ -6,8 +6,11 @@ discard block |
||
6 | 6 | |
7 | 7 | <?php if (count($variations) == 0) : ?> |
8 | 8 | <p><?php e(t('No variations created for the product')); ?>.</p> |
9 | -<?php else : ?> |
|
10 | - <form action="<?php e(url(null)); ?>" method="post"> |
|
9 | +<?php else { |
|
10 | + : ?> |
|
11 | + <form action="<?php e(url(null)); |
|
12 | +} |
|
13 | +?>" method="post"> |
|
11 | 14 | <input type="hidden" name="product_id" value="<?php e($product->getId()); ?>" /> |
12 | 15 | <input type="hidden" name="set_quantity" value="<?php e($context->quantity); ?>" /> |
13 | 16 | <table summary="<?php e(t('Variations')); ?>" id="variations_table" class="stripe"> |
@@ -16,8 +19,10 @@ discard block |
||
16 | 19 | <tr> |
17 | 20 | <th><?php if ($context->multiple && $context->quantity) : |
18 | 21 | e(t('Quantity')); |
19 | -else : |
|
22 | +else { |
|
23 | + : |
|
20 | 24 | echo e(t('Choose')); |
25 | +} |
|
21 | 26 | endif; ?></th> |
22 | 27 | <th>#</th> |
23 | 28 | <th><?php e(t('Variation')); ?></th> |
@@ -65,7 +65,7 @@ |
||
65 | 65 | <tr> |
66 | 66 | <td> |
67 | 67 | <?php if ($p['has_variation']) : ?> |
68 | - <a href="<?php e(url($p['id'] . '/selectvariation', array('set_quantity' => $context->quantity, 'multiple' => $context->multiple))); ?>" /><?php echo '<img class="variation" src="/images/icons/silk/table_multiple.png" title="'.t("See the product's variations").'"/> '; ?></a> |
|
68 | + <a href="<?php e(url($p['id'].'/selectvariation', array('set_quantity' => $context->quantity, 'multiple' => $context->multiple))); ?>" /><?php echo '<img class="variation" src="/images/icons/silk/table_multiple.png" title="'.t("See the product's variations").'"/> '; ?></a> |
|
69 | 69 | <?php elseif ($context->multiple && $context->quantity) : ?> |
70 | 70 | <input id="<?php e($p['id']); ?>" type="text" name="selected[<?php e($p['id']); ?>]" value="<?php if (isset($selected_products[$p['id']])) : |
71 | 71 | e($selected_products[$p['id']]); |
@@ -7,10 +7,13 @@ discard block |
||
7 | 7 | |
8 | 8 | <?php if ($context->getProduct()->isFilledIn() == 0) : ?> |
9 | 9 | <p><?php e(t('No products to select.')); ?> <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create product')); ?></a>.</p> |
10 | -<?php else : ?> |
|
10 | +<?php else { |
|
11 | + : ?> |
|
11 | 12 | |
12 | 13 | <ul class="options"> |
13 | - <li><a href="<?php e(url('../')); ?>"><?php e(t('Close')); ?></a></li> |
|
14 | + <li><a href="<?php e(url('../')); |
|
15 | +} |
|
16 | +?>"><?php e(t('Close')); ?></a></li> |
|
14 | 17 | <li><a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create')); ?></a></li> |
15 | 18 | </ul> |
16 | 19 | |
@@ -47,8 +50,10 @@ discard block |
||
47 | 50 | <tr> |
48 | 51 | <th><?php if ($context->multiple && $context->quantity) : |
49 | 52 | e(t('Quantity')); |
50 | -else : |
|
53 | +else { |
|
54 | + : |
|
51 | 55 | echo e(t('Choose')); |
56 | +} |
|
52 | 57 | endif; ?></th> |
53 | 58 | <th><?php e(t('Product number')); ?></th> |
54 | 59 | <th><?php e(t('Name')); ?></th> |
@@ -69,8 +74,10 @@ discard block |
||
69 | 74 | <?php elseif ($context->multiple && $context->quantity) : ?> |
70 | 75 | <input id="<?php e($p['id']); ?>" type="text" name="selected[<?php e($p['id']); ?>]" value="<?php if (isset($selected_products[$p['id']])) : |
71 | 76 | e($selected_products[$p['id']]); |
72 | -else : |
|
77 | +else { |
|
78 | + : |
|
73 | 79 | e('0'); |
80 | +} |
|
74 | 81 | endif; ?>" size="2" /> |
75 | 82 | <?php elseif ($context->multiple && !$context->quantity) : ?> |
76 | 83 | <input id="<?php e($p['id']); ?>" type="checkbox" name="selected[<?php e($p['id']); ?>]" value="1" <?php if (array_key_exists($p['id'], $selected_products)) { |
@@ -95,8 +102,10 @@ discard block |
||
95 | 102 | e('...'); |
96 | 103 | elseif (isset($p['stock_status']['for_sale'])) : |
97 | 104 | e($p['stock_status']['for_sale']); |
98 | -else : |
|
105 | +else { |
|
106 | + : |
|
99 | 107 | echo 0; |
108 | +} |
|
100 | 109 | endif; ?></td> |
101 | 110 | <?php endif; ?> |
102 | 111 | <td><?php if ($p['vat'] == 1) { |