@@ -221,15 +221,15 @@ |
||
| 221 | 221 | <?php endif ?> |
| 222 | 222 | <?php endforeach ?> |
| 223 | 223 | |
| 224 | - <?php foreach( $product->getAttributeItems( 'custom' ) as $attribute) : ?> |
|
| 224 | + <?php foreach( $product->getAttributeItems( 'custom' ) as $attribute ) : ?> |
|
| 225 | 225 | <?php if( $attribute->getCode() === 'upload' ) : ?> |
| 226 | 226 | <div class="attr-list attr-type-<?= $enc->attr( $attribute ) ?>"> |
| 227 | 227 | <span class="name"><?= $attribute->getName() ?></span> |
| 228 | 228 | <span class="value"> |
| 229 | 229 | <span class="image-uploads"> |
| 230 | - <?php foreach( $attribute->getValue() as $upload) : ?> |
|
| 230 | + <?php foreach( $attribute->getValue() as $upload ) : ?> |
|
| 231 | 231 | <span class="image-upload"> |
| 232 | - <img src="<?= $enc->attr( $this->content($upload) ) ?>" alt="upload-image" /> |
|
| 232 | + <img src="<?= $enc->attr( $this->content( $upload ) ) ?>" alt="upload-image" /> |
|
| 233 | 233 | </span> |
| 234 | 234 | <?php endforeach ?> |
| 235 | 235 | </span> |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $this->pdf->setFont( 'dejavusans', '', 10 ); |
| 25 | 25 | |
| 26 | 26 | $vmargin = [ |
| 27 | - 'h1' => [ // HTML tag |
|
| 27 | + 'h1' => [// HTML tag |
|
| 28 | 28 | 0 => ['h' => 1.5, 'n' => 0], // space before = h * n |
| 29 | 29 | 1 => ['h' => 1.5, 'n' => 3] // space after = h * n |
| 30 | 30 | ], |
@@ -97,14 +97,14 @@ discard block |
||
| 97 | 97 | $data = [ |
| 98 | 98 | 'BCD', // required |
| 99 | 99 | '002', // Version 2 (required, 1=UTF-8, 2=ISO 8859-1, 3=ISO 8859-2, 4=ISO 8859-4, 5=ISO 8859-5, 6=ISO 8859-7, 7=ISO 8859-10, 8=ISO 8859-15) |
| 100 | - 1, // UTF-8 (required) |
|
| 100 | + 1, // UTF-8 (required) |
|
| 101 | 101 | 'SCT', // SEPA Credit Transfer (required) |
| 102 | - '', // BIC (optional) |
|
| 103 | - '', // Name of recipient (required, name of your company) |
|
| 104 | - '', // IBAN (required) |
|
| 105 | - $this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required) |
|
| 106 | - '', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes) |
|
| 107 | - '', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code) |
|
| 102 | + '', // BIC (optional) |
|
| 103 | + '', // Name of recipient (required, name of your company) |
|
| 104 | + '', // IBAN (required) |
|
| 105 | + $this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required) |
|
| 106 | + '', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes) |
|
| 107 | + '', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code) |
|
| 108 | 108 | $this->translate( 'client', 'Order' ) . ' ' . $this->extOrderItem->getOrderNumber(), // Reference of order and other data (optional, max. 140 characters) |
| 109 | 109 | $this->extOrderBaseItem->getCustomerReference(), // Notice to the customer (optional, max. 70 characters) |
| 110 | 110 | ]; |
@@ -206,7 +206,7 @@ |
||
| 206 | 206 | > |
| 207 | 207 | <?php break; case 'date': ?> |
| 208 | 208 | <input id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $key ) ?>" class="form-control" type="date" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>"> |
| 209 | - <?php break;case 'upload': ?> |
|
| 209 | + <?php break; case 'upload': ?> |
|
| 210 | 210 | <div class="upload-wrapper"> |
| 211 | 211 | <div class="upload-view" |
| 212 | 212 | data-title="<?= $enc->html( $this->translate( 'client/code', $attribute->getName() ) ) ?>" |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | |
| 468 | 468 | $fs = $this->getContext()->fs( 'fs' ); |
| 469 | 469 | |
| 470 | - if( !$fs->has('basket-upload' ) ) { |
|
| 470 | + if( !$fs->has( 'basket-upload' ) ) { |
|
| 471 | 471 | $fs->mkdir( 'basket-upload' ); |
| 472 | 472 | } |
| 473 | 473 | |
@@ -495,25 +495,25 @@ discard block |
||
| 495 | 495 | $list = []; |
| 496 | 496 | $entries = (array) $view->param( 'b_prod', [] ); |
| 497 | 497 | |
| 498 | - for($i = 0; $i < count($entries); ++$i) { |
|
| 498 | + for( $i = 0; $i < count( $entries ); ++$i ) { |
|
| 499 | 499 | $paths = []; |
| 500 | - foreach ($attrIds as $attrId) { |
|
| 501 | - if (isset($entries[$i]['attrcustid'][$attrId]) && is_array($entries[$i]['attrcustid'][$attrId])) { |
|
| 500 | + foreach( $attrIds as $attrId ) { |
|
| 501 | + if( isset( $entries[$i]['attrcustid'][$attrId] ) && is_array( $entries[$i]['attrcustid'][$attrId] ) ) { |
|
| 502 | 502 | /** @var UploadedFile $file */ |
| 503 | - foreach ($entries[$i]['attrcustid'][$attrId] as $file) { |
|
| 504 | - $filepath = 'basket-upload/' . md5($file->getFilename() . microtime(true)) . '.' . $file->extension(); |
|
| 503 | + foreach( $entries[$i]['attrcustid'][$attrId] as $file ) { |
|
| 504 | + $filepath = 'basket-upload/' . md5( $file->getFilename() . microtime( true ) ) . '.' . $file->extension(); |
|
| 505 | 505 | try { |
| 506 | - $stream = fopen($file->getRealPath(), 'r+'); |
|
| 507 | - $fs->writes($filepath, $stream); |
|
| 508 | - fclose($stream); |
|
| 509 | - } catch (\Exception $ex) { |
|
| 510 | - Log::error($ex->getMessage()); |
|
| 506 | + $stream = fopen( $file->getRealPath(), 'r+' ); |
|
| 507 | + $fs->writes( $filepath, $stream ); |
|
| 508 | + fclose( $stream ); |
|
| 509 | + } catch( \Exception $ex ) { |
|
| 510 | + Log::error( $ex->getMessage() ); |
|
| 511 | 511 | } |
| 512 | 512 | $paths[] = $filepath; |
| 513 | 513 | } |
| 514 | 514 | $entries[$i]['attrcustid'][$attrId] = $paths; |
| 515 | 515 | } |
| 516 | - if (isset($entries[$i]['prodid'])) { |
|
| 516 | + if( isset( $entries[$i]['prodid'] ) ) { |
|
| 517 | 517 | $list[] = $entries[$i]['prodid']; |
| 518 | 518 | } |
| 519 | 519 | } |