@@ -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> |
@@ -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> |
@@ -14,8 +14,10 @@ |
||
14 | 14 | <div> |
15 | 15 | <input type="submit" value="<?php e(t('Switch')); ?>" /> <a href="<?php if (isset($_SERVER['HTTP_REFERER'])) : |
16 | 16 | e($_SERVER['HTTP_REFERER']); |
17 | -else : |
|
17 | +else { |
|
18 | + : |
|
18 | 19 | echo 'index.php'; |
20 | +} |
|
19 | 21 | endif; ?>"><?php e(t('Cancel')); ?></a> |
20 | 22 | </div> |
21 | 23 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <tbody> |
21 | 21 | <tr> |
22 | 22 | <td> |
23 | - <input tabindex="1" accesskey="1" name="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
23 | + <input tabindex="1" accesskey="1" name="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
24 | 24 | </td> |
25 | 25 | <td> |
26 | 26 | <input tabindex="2" name="voucher_number" id="voucher_number" type="text" size="5" value = "<?php e($values['voucher_number']); ?>" /> |
@@ -8,9 +8,12 @@ |
||
8 | 8 | |
9 | 9 | <p><?php echo $context->getMessage(); ?></p> |
10 | 10 | |
11 | -<?php else : ?> |
|
11 | +<?php else { |
|
12 | + : ?> |
|
12 | 13 | |
13 | - <?php echo $contact->error->view(); ?> |
|
14 | + <?php echo $contact->error->view(); |
|
15 | +} |
|
16 | +?> |
|
14 | 17 | |
15 | 18 | <p class="message">Du er ved at sende en e-mail til <?php e(count($contacts)); ?> kontakter. Vi sender naturligvis kun til de kontakter, der har en e-mail-adresse.</p> |
16 | 19 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | # If there is subcategories to the category |
39 | 39 | if (is_array($category['categories']) && count($category['categories']) > 0) { |
40 | 40 | # We make the items for the next level the sub categories of this category |
41 | - $level_categories[$level+1] = $category['categories']; |
|
41 | + $level_categories[$level + 1] = $category['categories']; |
|
42 | 42 | |
43 | 43 | # We move to next level |
44 | 44 | $level++; |
@@ -55,9 +55,12 @@ |
||
55 | 55 | <?php if (isset($product_id)) : ?> |
56 | 56 | <input type="hidden" name="product_id" value="<?php e($product_id); ?>" /> |
57 | 57 | <input type="submit" name="append_product" value="<?php e(t('Select')); ?>" /> |
58 | -<?php else : ?> |
|
58 | +<?php else { |
|
59 | + : ?> |
|
59 | 60 | <select name="action"> |
60 | - <option value=""><?php e(t('Choose...')); ?></option> |
|
61 | + <option value=""><?php e(t('Choose...')); |
|
62 | +} |
|
63 | +?></option> |
|
61 | 64 | <option value="delete"><?php e(t('Delete selected')); ?></option> |
62 | 65 | </select> |
63 | 66 |
@@ -182,12 +182,12 @@ |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | $data = array('contact_id' => $debtor->getContact()->getId(), |
185 | - 'subject' => $subject, |
|
186 | - 'body' => $body, |
|
187 | - 'from_email' => $this->kernel->intranet->address->get('email'), |
|
188 | - 'from_name' => $this->kernel->intranet->address->get('name'), |
|
189 | - 'type_id' => 13, // onlinepayment |
|
190 | - 'belong_to' => $payment_id); |
|
185 | + 'subject' => $subject, |
|
186 | + 'body' => $body, |
|
187 | + 'from_email' => $this->kernel->intranet->address->get('email'), |
|
188 | + 'from_name' => $this->kernel->intranet->address->get('name'), |
|
189 | + 'type_id' => 13, // onlinepayment |
|
190 | + 'belong_to' => $payment_id); |
|
191 | 191 | |
192 | 192 | if (!$email->save($data)) { |
193 | 193 | throw new Exception('Could not save email to onlinepayment'); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | if (!$payment_id = $onlinepayment->save($values)) { |
135 | 135 | // this is probably a little to hard reaction. |
136 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt ' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
136 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt '.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | if ($onlinepayment->get('status') == 'authorized') { |
@@ -166,19 +166,19 @@ discard block |
||
166 | 166 | // @todo: Change with gateway. |
167 | 167 | $settings = $doctrine->getTable('Intraface_modules_onlinepayment_Language')->findOneByIntranetId($kernel->intranet->getId()); |
168 | 168 | |
169 | - $subject = $settings->getConfirmationEmailSubject($shop->getLanguage()) . ' (#' . $payment_id . ')'; |
|
170 | - $body = $settings->getConfirmationEmailBody($shop->getLanguage()) . "\n\n" . $this->kernel->intranet->address->get('name'); |
|
169 | + $subject = $settings->getConfirmationEmailSubject($shop->getLanguage()).' (#'.$payment_id.')'; |
|
170 | + $body = $settings->getConfirmationEmailBody($shop->getLanguage())."\n\n".$this->kernel->intranet->address->get('name'); |
|
171 | 171 | } catch (Exception $e) { |
172 | 172 | } |
173 | 173 | |
174 | 174 | if (empty($subject)) { |
175 | - $subject = 'Payment confirmation / betalingsbekræftelse (#' . $payment_id . ')'; |
|
175 | + $subject = 'Payment confirmation / betalingsbekræftelse (#'.$payment_id.')'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | if (empty($body)) { |
179 | - $body = 'We have received your payment for order #' .$debtor->getId(). '.' . "\n\n"; |
|
180 | - $body .= 'Vi har modtaget din betaling for ordre #' .$debtor->getId(). '.'; |
|
181 | - $body .= "\n\nYours sincerely / Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
179 | + $body = 'We have received your payment for order #'.$debtor->getId().'.'."\n\n"; |
|
180 | + $body .= 'Vi har modtaget din betaling for ordre #'.$debtor->getId().'.'; |
|
181 | + $body .= "\n\nYours sincerely / Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | $data = array('contact_id' => $debtor->getContact()->getId(), |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | if (!$email->queue()) { |
197 | 197 | $this->error->merge($email->error->getMessage()); |
198 | - throw new Exception('Could not send email to ' . $debtor->getContact()->getId()); |
|
198 | + throw new Exception('Could not send email to '.$debtor->getContact()->getId()); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return true; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | if (!$payment_id = $onlinepayment->create()) { |
217 | 217 | // this is probably a little to hard reaction |
218 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
218 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | return $this->prepareResponseData($payment_id); |
@@ -182,12 +182,12 @@ |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | $data = array('contact_id' => $debtor->getContact()->getId(), |
185 | - 'subject' => $subject, |
|
186 | - 'body' => $body, |
|
187 | - 'from_email' => $this->kernel->intranet->address->get('email'), |
|
188 | - 'from_name' => $this->kernel->intranet->address->get('name'), |
|
189 | - 'type_id' => 13, // onlinepayment |
|
190 | - 'belong_to' => $payment_id); |
|
185 | + 'subject' => $subject, |
|
186 | + 'body' => $body, |
|
187 | + 'from_email' => $this->kernel->intranet->address->get('email'), |
|
188 | + 'from_name' => $this->kernel->intranet->address->get('name'), |
|
189 | + 'type_id' => 13, // onlinepayment |
|
190 | + 'belong_to' => $payment_id); |
|
191 | 191 | |
192 | 192 | if (!$email->save($data)) { |
193 | 193 | throw new Exception('Could not save email to onlinepayment'); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | if (!$payment_id = $onlinepayment->save($values)) { |
97 | 97 | // this is probably a little to hard reaction. |
98 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt ' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
98 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt '.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->sendEmailOnOnlinePayment($debtor, $payment_id); |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | $this->kernel->useShared('email'); |
109 | 109 | $email = new Email($this->kernel); |
110 | 110 | |
111 | - $subject = 'Payment confirmation / betalingsbekræftelse (#' . $payment_id . ')'; |
|
112 | - $body = 'We have received your payment for order #' .$debtor->getId(). '.' . "\n\n"; |
|
113 | - $body .= 'Vi har modtaget din betaling for ordre #' .$debtor->getId(). '.'; |
|
114 | - $body .= "\n\nYours sincerely / Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
111 | + $subject = 'Payment confirmation / betalingsbekræftelse (#'.$payment_id.')'; |
|
112 | + $body = 'We have received your payment for order #'.$debtor->getId().'.'."\n\n"; |
|
113 | + $body .= 'Vi har modtaget din betaling for ordre #'.$debtor->getId().'.'; |
|
114 | + $body .= "\n\nYours sincerely / Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
115 | 115 | |
116 | 116 | $data = array('contact_id' => $debtor->getContact()->getId(), |
117 | 117 | 'subject' => $subject, |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | if (!$email->queue()) { |
131 | 131 | $this->error->merge($email->error->getMessage()); |
132 | - throw new Exception('Could not send email to ' . $debtor->getContact()->getId()); |
|
132 | + throw new Exception('Could not send email to '.$debtor->getContact()->getId()); |
|
133 | 133 | ; |
134 | 134 | return false; |
135 | 135 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | if (!$payment_id = $onlinepayment->create()) { |
155 | 155 | // this is probably a little to hard reaction |
156 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
156 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | return $this->prepareResponseData($payment_id); |
@@ -214,7 +214,7 @@ |
||
214 | 214 | |
215 | 215 | $this->assertTrue($basket->removeEvaluationProducts()); |
216 | 216 | |
217 | - $this->assertEquals(count($basket->getItems()), 0); |
|
217 | + $this->assertEquals(count($basket->getItems()), 0); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | function testSaveCustomerEan() |