Fixes
This commit is contained in:
parent
ddda253029
commit
5353f6b77b
@ -63,6 +63,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Install fileinfo
|
# Install fileinfo
|
||||||
RUN docker-php-ext-install -j$(nproc) fileinfo
|
RUN docker-php-ext-install -j$(nproc) fileinfo
|
||||||
# Install intl
|
# Install intl
|
||||||
|
RUN docker-php-ext-install -j$(nproc) ftp
|
||||||
|
# Install ftp
|
||||||
RUN docker-php-ext-install -j$(nproc) intl
|
RUN docker-php-ext-install -j$(nproc) intl
|
||||||
# Install mongodb
|
# Install mongodb
|
||||||
RUN pecl install mongodb \
|
RUN pecl install mongodb \
|
||||||
|
|||||||
@ -11,4 +11,4 @@ opcache.interned_strings_buffer=12
|
|||||||
memory_limit = -1
|
memory_limit = -1
|
||||||
|
|
||||||
disable_functions =
|
disable_functions =
|
||||||
extension=/pdflib.so
|
;extension=/pdflib.so
|
||||||
|
|||||||
1
.php-cs-fixer.cache
Normal file
1
.php-cs-fixer.cache
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"php":"8.1.2-1ubuntu2.17","version":"3.56.1","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"src\/old\/application\/design\/vorlagen\/tailwindcss\/layout\/.null-ls_610152_default.phtml":"cc9f32bda4a5d4114fb5ec3f782d8a92"}}
|
||||||
@ -19,6 +19,7 @@
|
|||||||
"azuyalabs/yasumi": "^2.5",
|
"azuyalabs/yasumi": "^2.5",
|
||||||
"behat/transliterator": "^1.2@dev",
|
"behat/transliterator": "^1.2@dev",
|
||||||
"brick/money": "^0.7.0",
|
"brick/money": "^0.7.0",
|
||||||
|
"chillerlan/php-qrcode": "v5.0.x-dev",
|
||||||
"cocur/slugify": "v3.1",
|
"cocur/slugify": "v3.1",
|
||||||
"composer/package-versions-deprecated": "^1.8",
|
"composer/package-versions-deprecated": "^1.8",
|
||||||
"ddeboer/imap": "1.12.2",
|
"ddeboer/imap": "1.12.2",
|
||||||
@ -30,6 +31,7 @@
|
|||||||
"gabrielbull/ups-api": "dev-master",
|
"gabrielbull/ups-api": "dev-master",
|
||||||
"gregwar/captcha-bundle": "^2.2",
|
"gregwar/captcha-bundle": "^2.2",
|
||||||
"guzzlehttp/guzzle": "^6",
|
"guzzlehttp/guzzle": "^6",
|
||||||
|
"horstoeko/zugferd": "^1.0",
|
||||||
"incenteev/composer-parameter-handler": "^2.0",
|
"incenteev/composer-parameter-handler": "^2.0",
|
||||||
"jms/serializer-bundle": "5.*",
|
"jms/serializer-bundle": "5.*",
|
||||||
"knplabs/knp-gaufrette-bundle": "0.7.*",
|
"knplabs/knp-gaufrette-bundle": "0.7.*",
|
||||||
@ -40,7 +42,6 @@
|
|||||||
"liip/imagine-bundle": "2.9.*",
|
"liip/imagine-bundle": "2.9.*",
|
||||||
"mobiledetect/mobiledetectlib": "^2.8",
|
"mobiledetect/mobiledetectlib": "^2.8",
|
||||||
"mpdf/mpdf": "dev-qrcode",
|
"mpdf/mpdf": "dev-qrcode",
|
||||||
"chillerlan/php-qrcode": "v5.0.x-dev",
|
|
||||||
"mpdf/qrcode": "^1.2",
|
"mpdf/qrcode": "^1.2",
|
||||||
"nelmio/api-doc-bundle": "v4.11.1",
|
"nelmio/api-doc-bundle": "v4.11.1",
|
||||||
"nelmio/cors-bundle": "^2.2",
|
"nelmio/cors-bundle": "^2.2",
|
||||||
@ -76,7 +77,7 @@
|
|||||||
"symfony/monolog-bundle": "^3.8",
|
"symfony/monolog-bundle": "^3.8",
|
||||||
"symfony/notifier": "*",
|
"symfony/notifier": "*",
|
||||||
"symfony/process": "*",
|
"symfony/process": "*",
|
||||||
"symfony/property-access": "*",
|
"symfony/property-access": "v6.4.4",
|
||||||
"symfony/property-info": "*",
|
"symfony/property-info": "*",
|
||||||
"symfony/proxy-manager-bridge": "*",
|
"symfony/proxy-manager-bridge": "*",
|
||||||
"symfony/runtime": "*",
|
"symfony/runtime": "*",
|
||||||
|
|||||||
1362
src/new/composer.lock
generated
1362
src/new/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,11 @@
|
|||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use PSC\Shop\EntityBundle\Entity\Contact;
|
use PSC\Shop\EntityBundle\Entity\Contact;
|
||||||
|
use PSC\Shop\EntityBundle\Entity\Shop;
|
||||||
|
use PSC\Shop\UserBundle\Model\ApiUser;
|
||||||
use PSC\Shop\UserBundle\Security\ApiKeyAuthenticator;
|
use PSC\Shop\UserBundle\Security\ApiKeyAuthenticator;
|
||||||
|
use PSC\Shop\UserBundle\Security\ApiKeyExtractor;
|
||||||
|
use PSC\Shop\UserBundle\Security\ApiKeyHandler;
|
||||||
use PSC\Shop\UserBundle\Security\ZendAuthenticator;
|
use PSC\Shop\UserBundle\Security\ZendAuthenticator;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
@ -59,10 +63,14 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||||||
'ROLE_ALLOWED_TO_SWITCH'
|
'ROLE_ALLOWED_TO_SWITCH'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'providers' => ['database' => ['entity' => ['class' => Contact::class]]],
|
'providers' => [
|
||||||
|
'database' => ['entity' => ['class' => Contact::class]],
|
||||||
|
'database_token' => ['entity' => ['class' => Shop::class]],
|
||||||
|
],
|
||||||
'firewalls' => [
|
'firewalls' => [
|
||||||
'admin_secured_area' => [
|
'admin_secured_area' => [
|
||||||
'pattern' => '^/backend',
|
'pattern' => '^/backend',
|
||||||
|
'provider' => 'database',
|
||||||
'form_login' => [
|
'form_login' => [
|
||||||
'check_path' => 'psc_backend_login',
|
'check_path' => 'psc_backend_login',
|
||||||
'login_path' => 'psc_backend_login',
|
'login_path' => 'psc_backend_login',
|
||||||
@ -79,6 +87,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||||||
'api_login' => [
|
'api_login' => [
|
||||||
'pattern' => '/api/login',
|
'pattern' => '/api/login',
|
||||||
'stateless' => false,
|
'stateless' => false,
|
||||||
|
'provider' => 'database',
|
||||||
'json_login' => [
|
'json_login' => [
|
||||||
'check_path' => '/api/login_check',
|
'check_path' => '/api/login_check',
|
||||||
'success_handler' => 'lexik_jwt_authentication.handler.authentication_success',
|
'success_handler' => 'lexik_jwt_authentication.handler.authentication_success',
|
||||||
@ -88,11 +97,16 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||||||
'api' => [
|
'api' => [
|
||||||
'pattern' => '^/api',
|
'pattern' => '^/api',
|
||||||
'stateless' => false,
|
'stateless' => false,
|
||||||
|
'provider' => 'database',
|
||||||
'jwt' => null,
|
'jwt' => null,
|
||||||
'custom_authenticators' => [ApiKeyAuthenticator::class]
|
'access_token' => [
|
||||||
|
'token_handler' => ApiKeyHandler::class,
|
||||||
|
'token_extractors' => ApiKeyExtractor::class
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'storefront' => [
|
'storefront' => [
|
||||||
'pattern' => '^/',
|
'pattern' => '^/',
|
||||||
|
'provider' => 'database',
|
||||||
'stateless' => false,
|
'stateless' => false,
|
||||||
'jwt' => null,
|
'jwt' => null,
|
||||||
'custom_authenticators' => [
|
'custom_authenticators' => [
|
||||||
|
|||||||
29
src/new/package-lock.json
generated
29
src/new/package-lock.json
generated
@ -6400,6 +6400,12 @@
|
|||||||
"postcss": "^8.1.0"
|
"postcss": "^8.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/idiomorph": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/idiomorph/-/idiomorph-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-UhV1Ey5xCxIwR9B+OgIjQa+1Jx99XQ1vQHUsKBU1RpQzCx1u+b+N6SOXgf5mEJDqemUI/ffccu6+71l2mJUsRA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/image-size": {
|
"node_modules/image-size": {
|
||||||
"version": "0.5.5",
|
"version": "0.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
|
||||||
@ -7518,12 +7524,6 @@
|
|||||||
"ufo": "^1.3.2"
|
"ufo": "^1.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/morphdom": {
|
|
||||||
"version": "2.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.7.0.tgz",
|
|
||||||
"integrity": "sha512-8L8DwbdjjWwM/aNqj7BSoSn4G7SQLNiDcxCnMWbf506jojR6lNQ5YOmQqXEIE8u3C492UlkN4d0hQwz97+M1oQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/morris.js": {
|
"node_modules/morris.js": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz",
|
||||||
@ -12024,6 +12024,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vendor/symfony/ux-autocomplete/assets": {
|
"vendor/symfony/ux-autocomplete/assets": {
|
||||||
|
"name": "@symfony/ux-autocomplete",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -12043,7 +12044,7 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"morphdom": "^2.6.1"
|
"idiomorph": "^0.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@hotwired/stimulus": "^3.0.0",
|
"@hotwired/stimulus": "^3.0.0",
|
||||||
@ -13687,7 +13688,7 @@
|
|||||||
"@testing-library/dom": "^7.31.0",
|
"@testing-library/dom": "^7.31.0",
|
||||||
"@testing-library/user-event": "^13.1.9",
|
"@testing-library/user-event": "^13.1.9",
|
||||||
"@types/node-fetch": "^2.6.2",
|
"@types/node-fetch": "^2.6.2",
|
||||||
"morphdom": "^2.6.1",
|
"idiomorph": "^0.3.0",
|
||||||
"node-fetch": "^2.6.1"
|
"node-fetch": "^2.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -16651,6 +16652,12 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
"idiomorph": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/idiomorph/-/idiomorph-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-UhV1Ey5xCxIwR9B+OgIjQa+1Jx99XQ1vQHUsKBU1RpQzCx1u+b+N6SOXgf5mEJDqemUI/ffccu6+71l2mJUsRA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"image-size": {
|
"image-size": {
|
||||||
"version": "0.5.5",
|
"version": "0.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
|
||||||
@ -17508,12 +17515,6 @@
|
|||||||
"ufo": "^1.3.2"
|
"ufo": "^1.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"morphdom": {
|
|
||||||
"version": "2.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.7.0.tgz",
|
|
||||||
"integrity": "sha512-8L8DwbdjjWwM/aNqj7BSoSn4G7SQLNiDcxCnMWbf506jojR6lNQ5YOmQqXEIE8u3C492UlkN4d0hQwz97+M1oQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"morris.js": {
|
"morris.js": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz",
|
||||||
|
|||||||
@ -19,7 +19,6 @@ use Ramsey\Uuid\Uuid;
|
|||||||
/**
|
/**
|
||||||
* Shop
|
* Shop
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @package PSC\Shop\Entity
|
* @package PSC\Shop\Entity
|
||||||
* @subpackage Entitys
|
* @subpackage Entitys
|
||||||
*/
|
*/
|
||||||
@ -27,7 +26,9 @@ use Ramsey\Uuid\Uuid;
|
|||||||
#[ORM\Entity(repositoryClass: 'PSC\Shop\EntityBundle\Repository\ProductRepository')]
|
#[ORM\Entity(repositoryClass: 'PSC\Shop\EntityBundle\Repository\ProductRepository')]
|
||||||
class Product
|
class Product
|
||||||
{
|
{
|
||||||
/** @var \DateTime */
|
/**
|
||||||
|
* @var \DateTime
|
||||||
|
*/
|
||||||
protected $ablaufDatum;
|
protected $ablaufDatum;
|
||||||
protected $ansprechPartner;
|
protected $ansprechPartner;
|
||||||
protected $noIndex = false;
|
protected $noIndex = false;
|
||||||
@ -52,40 +53,72 @@ class Product
|
|||||||
protected $availability;
|
protected $availability;
|
||||||
protected $weight;
|
protected $weight;
|
||||||
protected $text;
|
protected $text;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $collectingOrdersAccount;
|
protected $collectingOrdersAccount;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $baseUnit = 0;
|
protected $baseUnit = 0;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $salesUnit = 0;
|
protected $salesUnit = 0;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $packagingUnit;
|
protected $packagingUnit;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $collectingOrdersAccountFilter;
|
protected $collectingOrdersAccountFilter;
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $collectingOrdersChangePicture;
|
protected $collectingOrdersChangePicture;
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $collectingOrdersCopy;
|
protected $collectingOrdersCopy;
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $collectingOrdersNewContact;
|
protected $collectingOrdersNewContact;
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $collectingOrdersInviteContact;
|
protected $collectingOrdersInviteContact;
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $collectingOrdersIntegrated;
|
protected $collectingOrdersIntegrated;
|
||||||
|
|
||||||
/** @var bool */
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
protected $uploadFromLatestOrder;
|
protected $uploadFromLatestOrder;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $uploadFromLatestOrderInitalStatus;
|
protected $uploadFromLatestOrderInitalStatus;
|
||||||
|
|
||||||
/** @var bool */
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
protected $uploadProvided;
|
protected $uploadProvided;
|
||||||
/** @var string */
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
protected $uploadProvidedFile;
|
protected $uploadProvidedFile;
|
||||||
/** @var integer */
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
protected $uploadProvidedInitalStatus;
|
protected $uploadProvidedInitalStatus;
|
||||||
|
|
||||||
/** @var bool */
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
protected $uploadProvidedDownload;
|
protected $uploadProvidedDownload;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,15 +137,21 @@ class Product
|
|||||||
$this->uploadProvidedDownload = $uploadProvidedDownload;
|
$this->uploadProvidedDownload = $uploadProvidedDownload;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $hintEnable;
|
protected $hintEnable;
|
||||||
/** @var boolean */
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
protected $customTabEnable;
|
protected $customTabEnable;
|
||||||
|
|
||||||
/** @var array */
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $pluginSettings = [];
|
protected $pluginSettings = [];
|
||||||
|
|
||||||
public function __get($name)
|
public function __get(string $name): mixed
|
||||||
{
|
{
|
||||||
if (!isset($this->pluginSettings[$name])) {
|
if (!isset($this->pluginSettings[$name])) {
|
||||||
return null;
|
return null;
|
||||||
@ -121,7 +160,7 @@ class Product
|
|||||||
return $this->pluginSettings[$name];
|
return $this->pluginSettings[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __set($name, $value)
|
public function __set(string $name, mixed $value): void
|
||||||
{
|
{
|
||||||
$this->pluginSettings[$name] = $value;
|
$this->pluginSettings[$name] = $value;
|
||||||
}
|
}
|
||||||
@ -858,7 +897,7 @@ class Product
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*excel
|
* excel
|
||||||
*/
|
*/
|
||||||
public function getExportArray()
|
public function getExportArray()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,30 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* PrintshopCreator Suite
|
|
||||||
*
|
|
||||||
* PHP Version 5.3
|
|
||||||
*
|
|
||||||
* @author Thomas Peterson <info@thomas-peterson.de>
|
|
||||||
* @copyright 2012-2013 PrintshopCreator GmbH
|
|
||||||
* @license Private
|
|
||||||
* @link http://www.printshopcreator.de
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace PSC\Shop\EntityBundle\Entity;
|
namespace PSC\Shop\EntityBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
|
||||||
/**
|
|
||||||
* Shop
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @package PSC\Shop\Entity
|
|
||||||
* @subpackage Entitys
|
|
||||||
*/
|
|
||||||
#[ORM\Table(name: 'shop')]
|
#[ORM\Table(name: 'shop')]
|
||||||
#[ORM\Entity(repositoryClass: 'PSC\Shop\EntityBundle\Repository\ShopRepository')]
|
#[ORM\Entity(repositoryClass: 'PSC\Shop\EntityBundle\Repository\ShopRepository')]
|
||||||
class Shop
|
class Shop implements UserInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Id des Shops
|
* Id des Shops
|
||||||
@ -3041,4 +3024,20 @@ class Shop
|
|||||||
{
|
{
|
||||||
$this->templateDisplayUserApproval = $templateDisplayUserApproval;
|
$this->templateDisplayUserApproval = $templateDisplayUserApproval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRoles(): array
|
||||||
|
{
|
||||||
|
return ['ROLE_SHOP', 'ROLE_API'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function eraseCredentials(): void
|
||||||
|
{
|
||||||
|
// TODO: Implement eraseCredentials() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserIdentifier(): string
|
||||||
|
{
|
||||||
|
return $this->getUID();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,8 +18,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\KernelInterface;
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Component\Yaml\Yaml;
|
use Symfony\Component\Security\Http\Attribute\IsGranted as SymfonyIsGranted;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||||
|
|
||||||
class Change extends AbstractController
|
class Change extends AbstractController
|
||||||
@ -48,9 +47,9 @@ class Change extends AbstractController
|
|||||||
* @Model(type=\PSC\Shop\OrderBundle\Dto\Order\Status\Change\Input::class))
|
* @Model(type=\PSC\Shop\OrderBundle\Dto\Order\Status\Change\Input::class))
|
||||||
* )
|
* )
|
||||||
* @OA\Tag(name="Order")
|
* @OA\Tag(name="Order")
|
||||||
* @IsGranted("ROLE_API")
|
|
||||||
* @Security(name="ApiKeyAuth")
|
* @Security(name="ApiKeyAuth")
|
||||||
*/
|
*/
|
||||||
|
#[SymfonyIsGranted('ROLE_API')]
|
||||||
#[Route(path: '/order/status/change', methods: ['POST'])]
|
#[Route(path: '/order/status/change', methods: ['POST'])]
|
||||||
#[ParamConverter('data', class: '\PSC\Shop\OrderBundle\Dto\Order\Status\Change\Input', converter: 'psc_rest.request_body')]
|
#[ParamConverter('data', class: '\PSC\Shop\OrderBundle\Dto\Order\Status\Change\Input', converter: 'psc_rest.request_body')]
|
||||||
public function change(Input $data): JsonResponse
|
public function change(Input $data): JsonResponse
|
||||||
|
|||||||
@ -56,7 +56,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
|||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
require_once(__DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php');
|
require_once __DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DetailController fürs Backend
|
* DetailController fürs Backend
|
||||||
@ -73,7 +73,6 @@ class DetailController extends AbstractController
|
|||||||
/**
|
/**
|
||||||
* Detail Seite
|
* Detail Seite
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param Field $fieldService
|
* @param Field $fieldService
|
||||||
* @param Section $sectionService
|
* @param Section $sectionService
|
||||||
@ -112,7 +111,9 @@ class DetailController extends AbstractController
|
|||||||
$customGroups = $fieldService->getGroups(\PSC\System\PluginBundle\Form\Interfaces\Field::Order);
|
$customGroups = $fieldService->getGroups(\PSC\System\PluginBundle\Form\Interfaces\Field::Order);
|
||||||
$customSections = $sectionService->get(\PSC\System\PluginBundle\Form\Interfaces\Section::Order);
|
$customSections = $sectionService->get(\PSC\System\PluginBundle\Form\Interfaces\Section::Order);
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Shop $shop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Shop $shop
|
||||||
|
*/
|
||||||
$shop = $mongoService
|
$shop = $mongoService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
||||||
->findOneBy(array('uid' => (string)$selectedShop->getUid()));
|
->findOneBy(array('uid' => (string)$selectedShop->getUid()));
|
||||||
@ -121,11 +122,15 @@ class DetailController extends AbstractController
|
|||||||
$shop->setUid($selectedShop->getUid());
|
$shop->setUid($selectedShop->getUid());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var Order $order */
|
/**
|
||||||
|
* @var Order $order
|
||||||
|
*/
|
||||||
$order = $entityManager
|
$order = $entityManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
||||||
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Order $orderObj */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Order $orderObj
|
||||||
|
*/
|
||||||
$orderObj = $mongoService
|
$orderObj = $mongoService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
||||||
->findOneBy(array('uid' => (string)$order->getUid()));
|
->findOneBy(array('uid' => (string)$order->getUid()));
|
||||||
@ -232,15 +237,21 @@ class DetailController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$positions = array();
|
$positions = array();
|
||||||
/** @var Orderpos $pos */
|
/**
|
||||||
|
* @var Orderpos $pos
|
||||||
|
*/
|
||||||
foreach ($order->getPositions() as $pos) {
|
foreach ($order->getPositions() as $pos) {
|
||||||
if ($pos->getProduct()->getOriginalProduct() != 0) {
|
if ($pos->getProduct()->getOriginalProduct() != 0) {
|
||||||
/** @var Product $objProduct */
|
/**
|
||||||
|
* @var Product $objProduct
|
||||||
|
*/
|
||||||
$objProduct = $mongoService
|
$objProduct = $mongoService
|
||||||
->getRepository(Product::class)
|
->getRepository(Product::class)
|
||||||
->findOneBy(['uid' => (string)$pos->getProduct()->getOriginalProduct()]);
|
->findOneBy(['uid' => (string)$pos->getProduct()->getOriginalProduct()]);
|
||||||
} else {
|
} else {
|
||||||
/** @var Product $objProduct */
|
/**
|
||||||
|
* @var Product $objProduct
|
||||||
|
*/
|
||||||
$objProduct = $mongoService
|
$objProduct = $mongoService
|
||||||
->getRepository(Product::class)
|
->getRepository(Product::class)
|
||||||
->findOneBy(['uid' => (string)$pos->getProduct()->getUid()]);
|
->findOneBy(['uid' => (string)$pos->getProduct()->getUid()]);
|
||||||
@ -248,7 +259,9 @@ class DetailController extends AbstractController
|
|||||||
|
|
||||||
$count = $pos->getCount();
|
$count = $pos->getCount();
|
||||||
|
|
||||||
/** @var Position $objDoc */
|
/**
|
||||||
|
* @var Position $objDoc
|
||||||
|
*/
|
||||||
$objDoc = $mongoService
|
$objDoc = $mongoService
|
||||||
->getRepository(Position::class)
|
->getRepository(Position::class)
|
||||||
->findOneBy(['uid' => (string)$pos->getId()]);
|
->findOneBy(['uid' => (string)$pos->getId()]);
|
||||||
@ -348,7 +361,6 @@ class DetailController extends AbstractController
|
|||||||
/**
|
/**
|
||||||
* Switch Pos Seite
|
* Switch Pos Seite
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param EntityManagerInterface $entityManagerService
|
* @param EntityManagerInterface $entityManagerService
|
||||||
* @param Manager $eventManagerService
|
* @param Manager $eventManagerService
|
||||||
* @param Shop $shopService
|
* @param Shop $shopService
|
||||||
@ -363,14 +375,16 @@ class DetailController extends AbstractController
|
|||||||
#[Template]
|
#[Template]
|
||||||
public function switchPosStatusAction(EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $order = "", $pos = "", $status = 10)
|
public function switchPosStatusAction(EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $order = "", $pos = "", $status = 10)
|
||||||
{
|
{
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
/**
|
/**
|
||||||
* @var Orderpos $pos
|
* @var Orderpos $pos
|
||||||
*/
|
*/
|
||||||
$pos = $entityManagerService
|
$pos = $entityManagerService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos')
|
->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos')
|
||||||
->findOneBy(array('shop' => $selectedShop, 'uuid' => $pos));
|
->findOneBy(array('uuid' => $pos));
|
||||||
$pos->setStatus($status);
|
$pos->setStatus($status);
|
||||||
$entityManagerService->persist($pos);
|
$entityManagerService->persist($pos);
|
||||||
$entityManagerService->flush();
|
$entityManagerService->flush();
|
||||||
@ -386,7 +400,6 @@ class DetailController extends AbstractController
|
|||||||
/**
|
/**
|
||||||
* Switch Pos Seite
|
* Switch Pos Seite
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param string $uuid
|
* @param string $uuid
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
@ -394,9 +407,13 @@ class DetailController extends AbstractController
|
|||||||
#[Template]
|
#[Template]
|
||||||
public function setPackageExportedAction(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
|
public function setPackageExportedAction(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
|
||||||
{
|
{
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
/** @var Order $order */
|
/**
|
||||||
|
* @var Order $order
|
||||||
|
*/
|
||||||
$order = $entityManagerService
|
$order = $entityManagerService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
||||||
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
||||||
@ -408,7 +425,9 @@ class DetailController extends AbstractController
|
|||||||
->setParameter(2, $order->getUID())
|
->setParameter(2, $order->getUID())
|
||||||
->getQuery();
|
->getQuery();
|
||||||
$q->execute();
|
$q->execute();
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Order $orderObj */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Order $orderObj
|
||||||
|
*/
|
||||||
$orderObj = $mongoService
|
$orderObj = $mongoService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
||||||
->findOneBy(array('uid' => (string)$order->getUid()));
|
->findOneBy(array('uid' => (string)$order->getUid()));
|
||||||
@ -425,7 +444,6 @@ class DetailController extends AbstractController
|
|||||||
/**
|
/**
|
||||||
* Switch Pos Seite
|
* Switch Pos Seite
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param string $uuid
|
* @param string $uuid
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
@ -433,9 +451,13 @@ class DetailController extends AbstractController
|
|||||||
#[Template]
|
#[Template]
|
||||||
public function createNewOrderStatus(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
|
public function createNewOrderStatus(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
|
||||||
{
|
{
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
/** @var Order $order */
|
/**
|
||||||
|
* @var Order $order
|
||||||
|
*/
|
||||||
$order = $entityManagerService
|
$order = $entityManagerService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
||||||
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
||||||
@ -447,7 +469,9 @@ class DetailController extends AbstractController
|
|||||||
->setParameter(2, $order->getUID())
|
->setParameter(2, $order->getUID())
|
||||||
->getQuery();
|
->getQuery();
|
||||||
$q->execute();
|
$q->execute();
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Order $orderObj */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Order $orderObj
|
||||||
|
*/
|
||||||
$orderObj = $mongoService
|
$orderObj = $mongoService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
||||||
->findOneBy(array('uid' => (string)$order->getUid()));
|
->findOneBy(array('uid' => (string)$order->getUid()));
|
||||||
@ -465,7 +489,6 @@ class DetailController extends AbstractController
|
|||||||
/**
|
/**
|
||||||
* SDelete
|
* SDelete
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param string $uuid
|
* @param string $uuid
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
@ -473,15 +496,23 @@ class DetailController extends AbstractController
|
|||||||
#[Template]
|
#[Template]
|
||||||
public function deleteOrder(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
|
public function deleteOrder(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
|
||||||
{
|
{
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
/** @var Order $order */
|
/**
|
||||||
|
* @var Order $order
|
||||||
|
*/
|
||||||
$order = $entityManagerService
|
$order = $entityManagerService
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
->getRepository('PSC\Shop\EntityBundle\Entity\Order')
|
||||||
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
||||||
/** @var Orderpos $pos */
|
/**
|
||||||
|
* @var Orderpos $pos
|
||||||
|
*/
|
||||||
foreach ($order->getPositions() as $pos) {
|
foreach ($order->getPositions() as $pos) {
|
||||||
/** @var Upload $upload */
|
/**
|
||||||
|
* @var Upload $upload
|
||||||
|
*/
|
||||||
foreach ($pos->getUploads() as $upload) {
|
foreach ($pos->getUploads() as $upload) {
|
||||||
$entityManagerService->remove($upload);
|
$entityManagerService->remove($upload);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,7 @@ class Calc
|
|||||||
$order->setShippingCosts(Money::ofMinor($order->getShipping()->getCalcPrice()->net, 'EUR')->getMinorAmount()->toInt());
|
$order->setShippingCosts(Money::ofMinor($order->getShipping()->getCalcPrice()->net, 'EUR')->getMinorAmount()->toInt());
|
||||||
$order->addTax($order->getShipping()->getCalcPrice()->tax);
|
$order->addTax($order->getShipping()->getCalcPrice()->tax);
|
||||||
foreach($order->getPositions() as $position) {
|
foreach($order->getPositions() as $position) {
|
||||||
|
$position->getProduct()->setShopUuid($order->getShop()->getUuid());
|
||||||
if ($this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())) {
|
if ($this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())) {
|
||||||
$specialProductTransformer = $this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())->getProducer();
|
$specialProductTransformer = $this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())->getProducer();
|
||||||
if($specialProductTransformer) {
|
if($specialProductTransformer) {
|
||||||
|
|||||||
@ -224,7 +224,7 @@ class Order
|
|||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ($order->getPositions() as $position) {
|
foreach ($order->getPositions() as $position) {
|
||||||
|
$position->getProduct()->setShopUuid($order->getShop()->getUuid());
|
||||||
$position->setPos($i);
|
$position->setPos($i);
|
||||||
|
|
||||||
$positionEntity = new Orderpos();
|
$positionEntity = new Orderpos();
|
||||||
@ -257,6 +257,10 @@ class Order
|
|||||||
if($typ != 0) {
|
if($typ != 0) {
|
||||||
$order->setType($typ);
|
$order->setType($typ);
|
||||||
}
|
}
|
||||||
|
foreach($order->getPositions() as $position) {
|
||||||
|
$position->setUuid(Uuid::uuid7());
|
||||||
|
$position->setUid(0);
|
||||||
|
}
|
||||||
$this->storeOrder($order);
|
$this->storeOrder($order);
|
||||||
$order = $this->getOrderByUuid($order->getUuid());
|
$order = $this->getOrderByUuid($order->getUuid());
|
||||||
return $order;
|
return $order;
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PSC\Shop\UserBundle\Model;
|
namespace PSC\Shop\UserBundle\Model;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
|
||||||
class ApiUser implements UserInterface {
|
class ApiUser implements UserInterface {
|
||||||
@ -19,7 +18,7 @@ class ApiUser implements UserInterface {
|
|||||||
return ['ROLE_SHOP', 'ROLE_API'];
|
return ['ROLE_SHOP', 'ROLE_API'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function eraseCredentials()
|
public function eraseCredentials(): void
|
||||||
{
|
{
|
||||||
// TODO: Implement eraseCredentials() method.
|
// TODO: Implement eraseCredentials() method.
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,12 +66,7 @@ class ApiKeyAuthenticator extends AbstractAuthenticator
|
|||||||
$shop = $this->entityManager->getRepository(Shop::class)->findOneBy(['apiKey' => $apiToken]);
|
$shop = $this->entityManager->getRepository(Shop::class)->findOneBy(['apiKey' => $apiToken]);
|
||||||
|
|
||||||
if ($shop) {
|
if ($shop) {
|
||||||
return new SelfValidatingPassport(
|
return new UserBadge($apiToken);
|
||||||
new UserBadge($apiToken, function () use ($apiToken) {
|
|
||||||
$contact = new ApiUser($apiToken);
|
|
||||||
return $contact;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$instance = $this->documentManager
|
$instance = $this->documentManager
|
||||||
@ -79,12 +74,7 @@ class ApiKeyAuthenticator extends AbstractAuthenticator
|
|||||||
->findOneBy(['supporttoken' => $apiToken]);
|
->findOneBy(['supporttoken' => $apiToken]);
|
||||||
|
|
||||||
if ($instance) {
|
if ($instance) {
|
||||||
return new SelfValidatingPassport(
|
return new UserBadge($apiToken);
|
||||||
new UserBadge($apiToken, function () use ($apiToken) {
|
|
||||||
$contact = new ApiUser($apiToken);
|
|
||||||
return $contact;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \Exception('No API token provided');
|
throw new \Exception('No API token provided');
|
||||||
|
|||||||
23
src/new/src/PSC/Shop/UserBundle/Security/ApiKeyExtractor.php
Normal file
23
src/new/src/PSC/Shop/UserBundle/Security/ApiKeyExtractor.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PSC\Shop\UserBundle\Security;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\Security\Http\AccessToken\AccessTokenExtractorInterface;
|
||||||
|
|
||||||
|
final class ApiKeyExtractor implements AccessTokenExtractorInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public function extractAccessToken(Request $request): ?string
|
||||||
|
{
|
||||||
|
if (!$request->headers->has('apiKey') || !\is_string($header = $request->headers->get('apiKey'))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($header !== "") {
|
||||||
|
return $header;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
33
src/new/src/PSC/Shop/UserBundle/Security/ApiKeyHandler.php
Normal file
33
src/new/src/PSC/Shop/UserBundle/Security/ApiKeyHandler.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PSC\Shop\UserBundle\Security;
|
||||||
|
|
||||||
|
use PSC\Shop\EntityBundle\Repository\ShopRepository;
|
||||||
|
use PSC\Shop\UserBundle\Model\ApiUser;
|
||||||
|
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
|
||||||
|
use Symfony\Component\Security\Http\AccessToken\AccessTokenHandlerInterface;
|
||||||
|
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
|
||||||
|
|
||||||
|
class ApiKeyHandler implements AccessTokenHandlerInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private ShopRepository $repository
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserBadgeFrom(string $apiToken): UserBadge
|
||||||
|
{
|
||||||
|
// e.g. query the "access token" database to search for this token
|
||||||
|
$accessToken = $this->repository->findOneBy(['apiKey' => $apiToken]);
|
||||||
|
if (null === $accessToken) {
|
||||||
|
throw new BadCredentialsException('Invalid credentials.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// and return a UserBadge object containing the user identifier from the found token
|
||||||
|
// (this is the same identifier used in Security configuration; it can be an email,
|
||||||
|
// a UUUID, a username, a database ID, etc.)
|
||||||
|
return new UserBadge($accessToken->getUid(), function () use ($accessToken) {
|
||||||
|
return $accessToken;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,6 +14,7 @@
|
|||||||
namespace PSC\Shop\UserBundle\Security\User;
|
namespace PSC\Shop\UserBundle\Security\User;
|
||||||
|
|
||||||
use Doctrine\Bundle\DoctrineBundle\Registry;
|
use Doctrine\Bundle\DoctrineBundle\Registry;
|
||||||
|
use PSC\Shop\UserBundle\Model\ApiUser;
|
||||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
||||||
|
|||||||
51
src/new/src/PSC/Shop/UserBundle/Security/User/TokenProvider.php
Executable file
51
src/new/src/PSC/Shop/UserBundle/Security/User/TokenProvider.php
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PrintshopCreator Suite
|
||||||
|
*
|
||||||
|
* PHP Version 5.3
|
||||||
|
*
|
||||||
|
* @author Thomas Peterson <info@thomas-peterson.de>
|
||||||
|
* @copyright 2012-2013 PrintshopCreator GmbH
|
||||||
|
* @license Private
|
||||||
|
* @link http://www.printshopcreator.de
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace PSC\Shop\UserBundle\Security\User;
|
||||||
|
|
||||||
|
use PSC\Shop\EntityBundle\Repository\ShopRepository;
|
||||||
|
use PSC\Shop\UserBundle\Model\ApiUser;
|
||||||
|
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
|
||||||
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||||
|
|
||||||
|
class TokenProvider implements UserProviderInterface
|
||||||
|
{
|
||||||
|
public function __construct(private ShopRepository $ShopRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function supportsClass($class): bool
|
||||||
|
{
|
||||||
|
return $class === $this->class || is_subclass_of($class, $this->class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function refreshUser(UserInterface $user)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loadUserByIdentifier(string $identifier): UserInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
$accessToken = $this->ShopRepository->findOneBy(['apiKey' => $identifier]);
|
||||||
|
if (null === $accessToken) {
|
||||||
|
throw new BadCredentialsException('Invalid credentials.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiUser($identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -189,7 +189,7 @@ class Package
|
|||||||
*/
|
*/
|
||||||
foreach ($orderpos->getUploads() as $upload) {
|
foreach ($orderpos->getUploads() as $upload) {
|
||||||
if ($orderArchive) {
|
if ($orderArchive) {
|
||||||
$this->archive->addFile($upload->getPath(), $path . $upload->getTyp() . '_' . $upload->getName());
|
$this->archive->addFile($upload->getPath(), $path . rand(). '_' . $upload->getTyp() . '_' . $upload->getName());
|
||||||
} else {
|
} else {
|
||||||
$this->archivePosition->addFile($upload->getPath(), $path . $upload->getTyp() . '_' . $upload->getName());
|
$this->archivePosition->addFile($upload->getPath(), $path . $upload->getTyp() . '_' . $upload->getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,11 @@ use PSC\Shop\MediaBundle\Document\Media;
|
|||||||
use Symfony\Component\DomCrawler\Crawler;
|
use Symfony\Component\DomCrawler\Crawler;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
|
use horstoeko\zugferd\ZugferdDocumentBuilder;
|
||||||
|
use horstoeko\zugferd\ZugferdDocumentPdfMerger;
|
||||||
|
use horstoeko\zugferd\ZugferdProfiles;
|
||||||
|
|
||||||
require_once(__DIR__ . '/../../../Shop/EntityBundle/Lagacy/TP_Basket_Item.php');
|
require_once __DIR__ . '/../../../Shop/EntityBundle/Lagacy/TP_Basket_Item.php';
|
||||||
/**
|
/**
|
||||||
* Printing
|
* Printing
|
||||||
*
|
*
|
||||||
@ -74,10 +77,14 @@ class Printing
|
|||||||
|
|
||||||
$this->templateVars->loadOrder($order->getUuid());
|
$this->templateVars->loadOrder($order->getUuid());
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $shop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $shop
|
||||||
|
*/
|
||||||
$shop = $order->getShop();
|
$shop = $order->getShop();
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Shop $shopObj */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Shop $shopObj
|
||||||
|
*/
|
||||||
$shopObj = $this->mongoManager
|
$shopObj = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
||||||
->findOneBy(array('uid' => (string)$shop->getUid()));
|
->findOneBy(array('uid' => (string)$shop->getUid()));
|
||||||
@ -148,8 +155,42 @@ class Printing
|
|||||||
$this->fileName = $fileNameOrg;
|
$this->fileName = $fileNameOrg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$document = ZugferdDocumentBuilder::CreateNew(ZugferdProfiles::PROFILE_XRECHNUNG_2);
|
||||||
|
|
||||||
|
$document
|
||||||
|
->setDocumentInformation("471102", "380", \DateTime::createFromFormat("Ymd", "20180305"), "EUR")
|
||||||
|
->addDocumentNote('Rechnung gemäß Bestellung vom 01.03.2018.')
|
||||||
|
->setDocumentSupplyChainEvent(\DateTime::createFromFormat('Ymd', '20180305'))
|
||||||
|
->setDocumentSeller("Lieferant GmbH", "549910")
|
||||||
|
->addDocumentSellerGlobalId("4000001123452", "0088")
|
||||||
|
->addDocumentSellerTaxRegistration("FC", "201/113/40209")
|
||||||
|
->addDocumentSellerTaxRegistration("VA", "DE123456789")
|
||||||
|
->setDocumentSellerAddress("Lieferantenstraße 20", "", "", "80333", "München", "DE")
|
||||||
|
->setDocumentBuyer("Kunden AG Mitte", "GE2020211")
|
||||||
|
->setDocumentBuyerAddress("Kundenstraße 15", "", "", "69876", "Frankfurt", "DE")
|
||||||
|
->addDocumentTax("S", "VAT", 275.0, 19.25, 7.0)
|
||||||
|
->addDocumentTax("S", "VAT", 198.0, 37.02, 19.0)
|
||||||
|
->setDocumentSummation(529.87, 529.87, 473.00, 0.0, 0.0, 473.00, 56.87, null, 0.0)
|
||||||
|
->addDocumentPaymentTerm("Zahlbar innerhalb 30 Tagen netto bis 04.04.2018, 3% Skonto innerhalb 10 Tagen bis 15.03.2018")
|
||||||
|
->addNewPosition("1")
|
||||||
|
->setDocumentPositionProductDetails("Trennblätter A4", "", "TB100A4", null, "0160", "4012345001235")
|
||||||
|
->setDocumentPositionGrossPrice(9.9000)
|
||||||
|
->setDocumentPositionNetPrice(9.9000)
|
||||||
|
->setDocumentPositionQuantity(20, "H87")
|
||||||
|
->addDocumentPositionTax('S', 'VAT', 19)
|
||||||
|
->setDocumentPositionLineSummation(198.0)
|
||||||
|
->addNewPosition("2")
|
||||||
|
->setDocumentPositionProductDetails("Joghurt Banane", "", "ARNR2", null, "0160", "4000050986428")
|
||||||
|
->SetDocumentPositionGrossPrice(5.5000)
|
||||||
|
->SetDocumentPositionNetPrice(5.5000)
|
||||||
|
->SetDocumentPositionQuantity(50, "H87")
|
||||||
|
->AddDocumentPositionTax('S', 'VAT', 7)
|
||||||
|
->SetDocumentPositionLineSummation(275.0);
|
||||||
|
|
||||||
if ($bg) {
|
if ($bg) {
|
||||||
/** @var Media $bg */
|
/**
|
||||||
|
* @var Media $bg
|
||||||
|
*/
|
||||||
$bg = $this->mongoManager
|
$bg = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\MediaBundle\Document\Media')
|
->getRepository('PSC\Shop\MediaBundle\Document\Media')
|
||||||
->findOneBy(['_id' => new ObjectId($bg)]);
|
->findOneBy(['_id' => new ObjectId($bg)]);
|
||||||
@ -180,7 +221,7 @@ class Printing
|
|||||||
}
|
}
|
||||||
|
|
||||||
$output = $this->mpdf->Output(null, \Mpdf\Output\Destination::STRING_RETURN);
|
$output = $this->mpdf->Output(null, \Mpdf\Output\Destination::STRING_RETURN);
|
||||||
|
$output = (new ZugferdDocumentPdfMerger($document->getContent(), $output))->generateDocument()->downloadString("file");
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,10 +241,14 @@ class Printing
|
|||||||
|
|
||||||
$this->templateVars->loadOrder($pos->getOrder()->getUuid());
|
$this->templateVars->loadOrder($pos->getOrder()->getUuid());
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $shop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $shop
|
||||||
|
*/
|
||||||
$shop = $this->templateVars->getOrder()->getShop();
|
$shop = $this->templateVars->getOrder()->getShop();
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Shop $shopObj */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Shop $shopObj
|
||||||
|
*/
|
||||||
$shopObj = $this->mongoManager
|
$shopObj = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
||||||
->findOneBy(array('uid' => (string)$shop->getUid()));
|
->findOneBy(array('uid' => (string)$shop->getUid()));
|
||||||
@ -253,7 +298,9 @@ class Printing
|
|||||||
$html = $twig->render($this->templateVars->getPosTwigVars($pos->getUuid()));
|
$html = $twig->render($this->templateVars->getPosTwigVars($pos->getUuid()));
|
||||||
|
|
||||||
if ($bg) {
|
if ($bg) {
|
||||||
/** @var Media $bg */
|
/**
|
||||||
|
* @var Media $bg
|
||||||
|
*/
|
||||||
$bg = $this->mongoManager
|
$bg = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\MediaBundle\Document\Media')
|
->getRepository('PSC\Shop\MediaBundle\Document\Media')
|
||||||
->findOneBy(['_id' => new ObjectId($bg)]);
|
->findOneBy(['_id' => new ObjectId($bg)]);
|
||||||
@ -285,10 +332,14 @@ class Printing
|
|||||||
|
|
||||||
public function generateProductOffer(Product $product, Contact $contact, $count, $options, $netto, $steuer, $brutto, $xmlProduct = "")
|
public function generateProductOffer(Product $product, Contact $contact, $count, $options, $netto, $steuer, $brutto, $xmlProduct = "")
|
||||||
{
|
{
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Shop $shop */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Shop $shop
|
||||||
|
*/
|
||||||
$shop = $product->getShop();
|
$shop = $product->getShop();
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Shop $shopObj */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Shop $shopObj
|
||||||
|
*/
|
||||||
$shopObj = $this->mongoManager
|
$shopObj = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
||||||
->findOneBy(array('uid' => (string)$shop->getUid()));
|
->findOneBy(array('uid' => (string)$shop->getUid()));
|
||||||
@ -302,7 +353,9 @@ class Printing
|
|||||||
$html = $twig->render($this->templateVars->getProductTwigVars($product, $contact, $count, $options, $netto, $steuer, $brutto, $xmlProduct));
|
$html = $twig->render($this->templateVars->getProductTwigVars($product, $contact, $count, $options, $netto, $steuer, $brutto, $xmlProduct));
|
||||||
|
|
||||||
if ($bg) {
|
if ($bg) {
|
||||||
/** @var Media $bg */
|
/**
|
||||||
|
* @var Media $bg
|
||||||
|
*/
|
||||||
$bg = $this->mongoManager
|
$bg = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\MediaBundle\Document\Media')
|
->getRepository('PSC\Shop\MediaBundle\Document\Media')
|
||||||
->findOneBy(['_id' => new ObjectId($bg)]);
|
->findOneBy(['_id' => new ObjectId($bg)]);
|
||||||
|
|||||||
@ -40,7 +40,9 @@ class Barcode extends Node
|
|||||||
->raw('$_barcode = ob_get_clean();')
|
->raw('$_barcode = ob_get_clean();')
|
||||||
->raw(PHP_EOL);
|
->raw(PHP_EOL);
|
||||||
|
|
||||||
$compiler->raw('$options = new \chillerlan\QRCode\QROptions();
|
$compiler->raw(
|
||||||
|
'$options = new \chillerlan\QRCode\QROptions();
|
||||||
|
$options->version = 20;
|
||||||
$options->outputInterface = \chillerlan\QRCode\Output\QRMarkupSVG::class;
|
$options->outputInterface = \chillerlan\QRCode\Output\QRMarkupSVG::class;
|
||||||
$options->bgColor = $_options["bgcolor"]?? "rgb(255, 255, 255)";
|
$options->bgColor = $_options["bgcolor"]?? "rgb(255, 255, 255)";
|
||||||
$options->outputBase64 = false;
|
$options->outputBase64 = false;
|
||||||
@ -73,7 +75,8 @@ $options->moduleValues = [
|
|||||||
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => $_options["bgcolor"]?? "rgb(255, 255, 255)",
|
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => $_options["bgcolor"]?? "rgb(255, 255, 255)",
|
||||||
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => $_options["bgcolor"]?? "rgb(255, 255, 255)",
|
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => $_options["bgcolor"]?? "rgb(255, 255, 255)",
|
||||||
];
|
];
|
||||||
echo (new \chillerlan\QRCode\QRCode($options))->render(trim($_barcode));');
|
echo (new \chillerlan\QRCode\QRCode($options))->render(trim($_barcode));'
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,6 @@ class CopyAndChangeContactTest extends WebTestCase
|
|||||||
]
|
]
|
||||||
], ['HTTP_apiKey' => $shop->getApiKey()]
|
], ['HTTP_apiKey' => $shop->getApiKey()]
|
||||||
);
|
);
|
||||||
|
|
||||||
self::assertSame(200, $client->getResponse()->getStatusCode());
|
self::assertSame(200, $client->getResponse()->getStatusCode());
|
||||||
$data = json_decode($client->getResponse()->getContent(), true);
|
$data = json_decode($client->getResponse()->getContent(), true);
|
||||||
|
|
||||||
@ -110,6 +109,8 @@ class CopyAndChangeContactTest extends WebTestCase
|
|||||||
self::assertSame(200, $client->getResponse()->getStatusCode());
|
self::assertSame(200, $client->getResponse()->getStatusCode());
|
||||||
|
|
||||||
$uuid = $data['uuid'];
|
$uuid = $data['uuid'];
|
||||||
|
$possitionUuid = $data['positions'][0]['uuid'];
|
||||||
|
|
||||||
$data = json_decode($client->getResponse()->getContent(), true);
|
$data = json_decode($client->getResponse()->getContent(), true);
|
||||||
|
|
||||||
$contactId = $data['contact']['uid'];
|
$contactId = $data['contact']['uid'];
|
||||||
@ -118,6 +119,7 @@ class CopyAndChangeContactTest extends WebTestCase
|
|||||||
self::assertIsArray($data);
|
self::assertIsArray($data);
|
||||||
self::assertNotEmpty($data['uuid']);
|
self::assertNotEmpty($data['uuid']);
|
||||||
self::assertNotSame($uuid, $data['uuid']);
|
self::assertNotSame($uuid, $data['uuid']);
|
||||||
|
self::assertNotSame($possitionUuid, $data['positions'][0]['uuid']);
|
||||||
|
|
||||||
$contactRepository = static::getContainer()->get(ContactRepository::class);
|
$contactRepository = static::getContainer()->get(ContactRepository::class);
|
||||||
|
|
||||||
|
|||||||
@ -105,6 +105,7 @@ class CreateAndChangeAllStatusTest extends WebTestCase
|
|||||||
|
|
||||||
self::assertSame(30, $data['positions'][0]['status']);
|
self::assertSame(30, $data['positions'][0]['status']);
|
||||||
|
|
||||||
|
$orderUuid = $data['uuid'];
|
||||||
$client->jsonRequest(
|
$client->jsonRequest(
|
||||||
'POST', '/api/position/status/change/all', [
|
'POST', '/api/position/status/change/all', [
|
||||||
'order' => $data['uuid'],
|
'order' => $data['uuid'],
|
||||||
@ -114,12 +115,11 @@ class CreateAndChangeAllStatusTest extends WebTestCase
|
|||||||
self::assertSame(200, $client->getResponse()->getStatusCode());
|
self::assertSame(200, $client->getResponse()->getStatusCode());
|
||||||
|
|
||||||
$data = json_decode($client->getResponse()->getContent(), true);
|
$data = json_decode($client->getResponse()->getContent(), true);
|
||||||
|
|
||||||
self::assertTrue($data['success']);
|
self::assertTrue($data['success']);
|
||||||
|
|
||||||
$client->jsonRequest(
|
$client->jsonRequest(
|
||||||
'POST', '/api/order/getonebyuuid', [
|
'POST', '/api/order/getonebyuuid', [
|
||||||
'uuid' => $data['uuid'],
|
'uuid' => $orderUuid,
|
||||||
], ['HTTP_apiKey' => $shop->getApiKey()]
|
], ['HTTP_apiKey' => $shop->getApiKey()]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class PostConfirm extends Base
|
|||||||
$this->position = $position;
|
$this->position = $position;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setOrder(\PSC\Shop\OrderBundle\Model\Order $order)
|
public function setOrder(\PSC\Shop\OrderBundle\Model\Base $order)
|
||||||
{
|
{
|
||||||
$this->order = $order;
|
$this->order = $order;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ class PostPrintJob extends Base
|
|||||||
|
|
||||||
private int $auflage;
|
private int $auflage;
|
||||||
private \PSC\Shop\OrderBundle\Model\Order\Position $position;
|
private \PSC\Shop\OrderBundle\Model\Order\Position $position;
|
||||||
private \PSC\Shop\OrderBundle\Model\Order $order;
|
private \PSC\Shop\OrderBundle\Model\Base $order;
|
||||||
|
|
||||||
public function call()
|
public function call()
|
||||||
{
|
{
|
||||||
@ -28,12 +28,18 @@ class PostPrintJob extends Base
|
|||||||
private function buildData()
|
private function buildData()
|
||||||
{
|
{
|
||||||
$temp = [];
|
$temp = [];
|
||||||
$infos = $this->position->getAdditionalInfo('saxoprint')['infos'][0];
|
$infos = $this->position->getAdditionalInfo('saxoprint')['infos'];
|
||||||
$productGroup = $this->position->getAdditionalInfo('saxoprint')['saxoprintProductId'];
|
if(isset($infos[0][0]['title'])) {
|
||||||
|
$infos = $infos[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$productGroup = $this->position->getAdditionalInfo('saxoprint')['saxoprintProductId'];
|
||||||
|
$auflage = 0;
|
||||||
foreach($infos as $row)
|
foreach($infos as $row)
|
||||||
{
|
{
|
||||||
if($row['name'] == "" || $row['name'] == 'auflage') { continue;
|
if($row['name'] == "" || $row['name'] == 'auflage') {
|
||||||
|
$auflage = (int)$row['value'];
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if($row['name'] == 6) {
|
if($row['name'] == 6) {
|
||||||
$productGroup = intval($row['value']);
|
$productGroup = intval($row['value']);
|
||||||
@ -64,7 +70,7 @@ class PostPrintJob extends Base
|
|||||||
],
|
],
|
||||||
'DeliveryAddresses' => [[
|
'DeliveryAddresses' => [[
|
||||||
'IsVoucherCopy' => false,
|
'IsVoucherCopy' => false,
|
||||||
'Circulation' => $objPosition->getOptions()['auflage'],
|
'Circulation' => $auflage,
|
||||||
'Address' => [
|
'Address' => [
|
||||||
'Salutation' => 'None',
|
'Salutation' => 'None',
|
||||||
'CompanyName' => $this->order->getDeliveryAddress()->getCompany(),
|
'CompanyName' => $this->order->getDeliveryAddress()->getCompany(),
|
||||||
@ -79,7 +85,7 @@ class PostPrintJob extends Base
|
|||||||
]],
|
]],
|
||||||
'PropertyValues' => $temp,
|
'PropertyValues' => $temp,
|
||||||
'ProductGroup' => $productGroup,
|
'ProductGroup' => $productGroup,
|
||||||
'TotalCirculation' => $objPosition->getOptions()['auflage'],
|
'TotalCirculation' => $auflage,
|
||||||
'ProjectName' => $this->order->getAlias() . ' ' . $this->position->getPos()
|
'ProjectName' => $this->order->getAlias() . ' ' . $this->position->getPos()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -89,7 +95,7 @@ class PostPrintJob extends Base
|
|||||||
$this->position = $position;
|
$this->position = $position;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setOrder(\PSC\Shop\OrderBundle\Model\Order $order)
|
public function setOrder(\PSC\Shop\OrderBundle\Model\Base $order)
|
||||||
{
|
{
|
||||||
$this->order = $order;
|
$this->order = $order;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ class PostUpload extends Base
|
|||||||
{
|
{
|
||||||
|
|
||||||
private \PSC\Shop\OrderBundle\Model\Order\Position $position;
|
private \PSC\Shop\OrderBundle\Model\Order\Position $position;
|
||||||
private \PSC\Shop\OrderBundle\Model\Order $order;
|
private \PSC\Shop\OrderBundle\Model\Base $order;
|
||||||
|
|
||||||
private \PSC\Shop\OrderBundle\Model\Order\Position\Upload $upload;
|
private \PSC\Shop\OrderBundle\Model\Order\Position\Upload $upload;
|
||||||
private \Symfony\Component\Finder\SplFileInfo $file;
|
private \Symfony\Component\Finder\SplFileInfo $file;
|
||||||
@ -27,20 +27,26 @@ class PostUpload extends Base
|
|||||||
$temp[] = 'https://' . $this->domain . '/'.$upload->getPath();
|
$temp[] = 'https://' . $this->domain . '/'.$upload->getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = $this->postUploadLinks('/' . $this->position->getExternalOrderNumber() . '/link',
|
$response = $this->postUploadLinks(
|
||||||
$this->buildDataLink($temp));
|
'/' . $this->position->getExternalOrderNumber() . '/link',
|
||||||
|
$this->buildDataLink($temp)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->position->getProduct()->getUploadProvidedFile() && $this->position->getProduct()->getUploadProvidedFile()->getUrl() != "") {
|
if($this->position->getProduct()->getUploadProvidedFile() && $this->position->getProduct()->getUploadProvidedFile()->getUrl() != "") {
|
||||||
$response = $this->postUploadLinks('/' . $this->position->getExternalOrderNumber() . '/link',
|
$response = $this->postUploadLinks(
|
||||||
$this->buildDataLink(['https://' . $this->domain . $this->position->getProduct()->getUploadProvidedFile()->getUrl()]));
|
'/' . $this->position->getExternalOrderNumber() . '/link',
|
||||||
|
$this->buildDataLink(['https://' . $this->domain . $this->position->getProduct()->getUploadProvidedFile()->getUrl()])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$outfile = '/data/www/old/market/steplayouter/basket/' . $this->order->getUid() . '/' . $this->position->getPos() . '/'.$this->order->getAlias() . '_' . $this->position->getPos().'.pdf';
|
$outfile = '/data/www/old/market/steplayouter/basket/' . $this->order->getUid() . '/' . $this->position->getPos() . '/'.$this->order->getAlias() . '_' . $this->position->getPos().'.pdf';
|
||||||
|
|
||||||
if(file_exists($outfile)) {
|
if(file_exists($outfile)) {
|
||||||
$response = $this->postUploadLinks('/' . $this->position->getExternalOrderNumber() . '/link',
|
$response = $this->postUploadLinks(
|
||||||
$this->buildDataLink(['https://' . $this->domain . '/apps/market/steplayouter/basket/' . $this->order->getUid() . '/' . $this->position->getPos() . '/'.$this->order->getAlias() . '_' . $this->position->getPos().'.pdf']));
|
'/' . $this->position->getExternalOrderNumber() . '/link',
|
||||||
|
$this->buildDataLink(['https://' . $this->domain . '/apps/market/steplayouter/basket/' . $this->order->getUid() . '/' . $this->position->getPos() . '/'.$this->order->getAlias() . '_' . $this->position->getPos().'.pdf'])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -61,7 +67,7 @@ class PostUpload extends Base
|
|||||||
$this->position = $position;
|
$this->position = $position;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setOrder(\PSC\Shop\OrderBundle\Model\Order $order)
|
public function setOrder(\PSC\Shop\OrderBundle\Model\Base $order)
|
||||||
{
|
{
|
||||||
$this->order = $order;
|
$this->order = $order;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,18 @@ use PSC\Shop\OrderBundle\Model\Order\Position\IProductTypeObject;
|
|||||||
|
|
||||||
class ProductSpecialObject implements IProductTypeObject
|
class ProductSpecialObject implements IProductTypeObject
|
||||||
{
|
{
|
||||||
|
private array $params = [];
|
||||||
|
private string $xml = "";
|
||||||
|
|
||||||
|
public function getParams(): array
|
||||||
|
{
|
||||||
|
return $this->params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setParams(array $params): void
|
||||||
|
{
|
||||||
|
$this->params = $params;
|
||||||
|
}
|
||||||
|
|
||||||
public function getName(): string
|
public function getName(): string
|
||||||
{
|
{
|
||||||
@ -16,8 +28,21 @@ class ProductSpecialObject implements IProductTypeObject
|
|||||||
return 101;
|
return 101;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getXml(): string
|
||||||
|
{
|
||||||
|
return $this->xml;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setXml(string $xml = ""): void
|
||||||
|
{
|
||||||
|
$this->xml = $xml;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPositionData(): array
|
public function getPositionData(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [
|
||||||
|
'xml' => $this->xml,
|
||||||
|
'params' => $this->params
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,9 @@ namespace Plugin\Custom\PSC\WMD_API\Producer;
|
|||||||
|
|
||||||
use Brick\Math\RoundingMode;
|
use Brick\Math\RoundingMode;
|
||||||
use Brick\Money\Money;
|
use Brick\Money\Money;
|
||||||
|
use Doctrine\ODM\MongoDB\DocumentManager;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Shop\OrderBundle\Model\Order\Position;
|
use PSC\Shop\OrderBundle\Model\Order\Position;
|
||||||
use PSC\Shop\OrderBundle\Model\Order\Position\Price;
|
use PSC\Shop\OrderBundle\Model\Order\Position\Price;
|
||||||
use PSC\Shop\OrderBundle\Model\Order\Tax;
|
use PSC\Shop\OrderBundle\Model\Order\Tax;
|
||||||
@ -12,20 +14,27 @@ use PSC\Shop\ProductBundle\Interfaces\IProducerHydrateModel;
|
|||||||
use PSC\Shop\ProductBundle\Interfaces\IProductTransformer;
|
use PSC\Shop\ProductBundle\Interfaces\IProductTransformer;
|
||||||
use PSC\Shop\ProductBundle\Interfaces\IUiProducer;
|
use PSC\Shop\ProductBundle\Interfaces\IUiProducer;
|
||||||
use PSC\Shop\ProductBundle\Model\Product;
|
use PSC\Shop\ProductBundle\Model\Product;
|
||||||
|
use PSC\System\SettingsBundle\Service\Shop;
|
||||||
|
|
||||||
class Producer implements IUiProducer, IProducerHydrateModel
|
class Producer implements IUiProducer, IProducerHydrateModel
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct(private readonly EntityManagerInterface $entityManager)
|
public function __construct(private readonly DocumentManager $documentManager, private readonly EntityManagerInterface $entityManager, private readonly Shop $shopService, private readonly \Plugin\Custom\PSC\WMD_API\Api\GetPrices $priceApi)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private Product $product;
|
private Product $product;
|
||||||
|
|
||||||
private float $price = 0;
|
private Engine $engine;
|
||||||
|
private float $priceNet = 0;
|
||||||
|
private float $priceVat = 0;
|
||||||
|
private float $priceGross = 0;
|
||||||
|
|
||||||
private int $count = 1;
|
private int $count = 1;
|
||||||
|
|
||||||
|
private array $pricesArray;
|
||||||
|
private $price;
|
||||||
|
|
||||||
public function setProduct(Product $product): void
|
public function setProduct(Product $product): void
|
||||||
{
|
{
|
||||||
$this->product = $product;
|
$this->product = $product;
|
||||||
@ -34,44 +43,63 @@ class Producer implements IUiProducer, IProducerHydrateModel
|
|||||||
public function getPrice(): Price
|
public function getPrice(): Price
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var ProductSpecialObject $specProd
|
@var ProductSpecialObject $specProd
|
||||||
*/
|
*/
|
||||||
|
$this->setVariables();
|
||||||
$specProd = $this->product->getSpecialProductTypeObject();
|
$specProd = $this->product->getSpecialProductTypeObject();
|
||||||
$priceObj = Money::ofMinor($this->price*100, 'EUR');
|
$priceObjNet = Money::ofMinor($this->priceNet, 'EUR');
|
||||||
|
$priceObjVat = Money::ofMinor($this->priceVat, 'EUR');
|
||||||
|
$priceObjGross = Money::ofMinor($this->priceGross, 'EUR');
|
||||||
|
|
||||||
$price = new Price();
|
$price = new Price();
|
||||||
$price->setNet($priceObj->getMinorAmount()->toInt());
|
$price->setNet($priceObjNet->getMinorAmount()->toInt());
|
||||||
$price->setVat($priceObj->toRational()->dividedBy(100)->multipliedBy($specProd->getTaxClass()/100)->to($priceObj->getContext(), RoundingMode::UP)->getMinorAmount()->toInt());
|
$price->setVat($priceObjVat->getMinorAmount()->toInt());
|
||||||
$price->setGross($price->getNet() + $price->getVat());
|
$price->setGross($priceObjGross->getMinorAmount()->toInt());
|
||||||
$price->setCount($this->count);
|
$price->setCount($this->count);
|
||||||
$price->setAllNet($price->getNet()*$this->count);
|
$price->setAllNet($price->getNet()*$this->count);
|
||||||
$price->setAllVat($price->getVat()*$this->count);
|
$price->setAllVat($price->getVat()*$this->count);
|
||||||
$price->setAllGross($price->getGross()*$this->count);
|
$price->setAllGross($price->getGross()*$this->count);
|
||||||
$price->tax = new Tax($specProd->getTaxClass(), $price->getVat()*$this->count, TaxEnum::POSITION);
|
$price->tax = new Tax(19, $price->getVat()*$this->count, TaxEnum::POSITION);
|
||||||
return $price;
|
return $price;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getJsonForm(): array
|
public function getJsonForm(): array
|
||||||
{
|
{
|
||||||
|
$this->setVariables();
|
||||||
$temp = [
|
$temp = [
|
||||||
'title' => $this->product->getTitle(),
|
'title' => $this->product->getTitle(),
|
||||||
'type' => 'object',
|
'type' => 'object',
|
||||||
'properties' => ['count' => [
|
'properties' => [],
|
||||||
'type' => 'string',
|
|
||||||
'title' => 'Anzahl',
|
|
||||||
'default' => $this->count ?? 1
|
|
||||||
]],
|
|
||||||
'required' => ['count']
|
'required' => ['count']
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$temp['properties']['auflage'] = [
|
||||||
|
'default' => $this->product->getSpecialProductTypeObject()->getParams()['auflage']??1,
|
||||||
|
'type' => 'string',
|
||||||
|
'title' => 'Auflage',
|
||||||
|
];
|
||||||
|
|
||||||
|
$temp['properties']['versand'] = [
|
||||||
|
'default' => $this->product->getSpecialProductTypeObject()->getParams()['versand']??null,
|
||||||
|
'type' => 'string',
|
||||||
|
'oneOf' => [],
|
||||||
|
'title' => 'Versand',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach($this->pricesArray as $priceObj) {
|
||||||
|
$temp['properties']['versand']['oneOf'][] = ['const' => $priceObj['deliveryOption'], 'title' => $priceObj['deliveryOption']];
|
||||||
|
}
|
||||||
|
|
||||||
return $temp;
|
return $temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setParams(array $params): void
|
public function setParams(array $params): void
|
||||||
{
|
{
|
||||||
if(isset($params['count'])) {
|
/**
|
||||||
$this->count = $params['count'];
|
* @var ProductSpecialObject $specProd
|
||||||
}
|
*/
|
||||||
|
$specProd = $this->product->getSpecialProductTypeObject();
|
||||||
|
$specProd->setParams($params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCount(): int
|
public function getCount(): int
|
||||||
@ -102,24 +130,53 @@ class Producer implements IUiProducer, IProducerHydrateModel
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
private function setVariables(): void
|
||||||
|
{
|
||||||
|
if($this->product->getSpecialProductTypeObject()) {
|
||||||
|
/**
|
||||||
|
* @var ProductSpecialObject $specProd
|
||||||
|
*/
|
||||||
|
$specProd = $this->product->getSpecialProductTypeObject();
|
||||||
|
$this->engine->setVariable('auflage', $this->product->getSpecialProductTypeObject()->getParams()['auflage']?? 1);
|
||||||
|
$this->engine->calc();
|
||||||
|
|
||||||
|
$this->pricesArray = $this->priceApi->getPrices($this->engine->getArticle());
|
||||||
|
|
||||||
|
$price = 0;
|
||||||
|
$priceVat = 0;
|
||||||
|
$priceGross = 0;
|
||||||
|
|
||||||
|
foreach($this->pricesArray as $priceObj) {
|
||||||
|
if($price === 0) {
|
||||||
|
$price = $priceObj['price']['productPrice']['centAmount'];
|
||||||
|
$priceVat = $priceObj['price']['productTax']['centAmount'];
|
||||||
|
$priceGross = $priceObj['price']['productPriceWithTax']['centAmount'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->priceNet = $price;
|
||||||
|
$this->priceVat = $priceVat;
|
||||||
|
$this->priceGross = $priceGross;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
private function process(): void
|
private function process(): void
|
||||||
{
|
{
|
||||||
$engine = new Engine();
|
$this->engine = new Engine();
|
||||||
$paperContainer = new PaperContainer();
|
|
||||||
if($this->product->getSpecialProductTypeObject() && $this->product->getSpecialProductTypeObject()->getXml()) {
|
if($this->product->getSpecialProductTypeObject() && $this->product->getSpecialProductTypeObject()->getXml()) {
|
||||||
}
|
|
||||||
if(!empty($this->product->getSpecialProductTypeObject()->getParams()) && isset($this->product->getSpecialProductTypeObject()->getParams()['count'])) {
|
|
||||||
$this->count = $this->product->getSpecialProductTypeObject()->getParams()['count'];
|
|
||||||
}
|
}
|
||||||
if($this->product->getUid()) {
|
if($this->product->getUid()) {
|
||||||
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->find($this->product->getUid());
|
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->find($this->product->getUid());
|
||||||
|
$productDoc = $this->documentManager->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)->findOneBy(['uid' => $product->getUid()]);
|
||||||
$this->price = $product->getPrice();
|
$this->engine->loadString($productDoc->getPluginSettingModule('wmd', 'config'));
|
||||||
|
$this->priceApi->setShop($this->shopService->getMongoShopByUid($product->getShop()->getUID()));
|
||||||
}elseif($this->product->getUuid()) {
|
}elseif($this->product->getUuid()) {
|
||||||
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->findOneBy(['uuid' => $this->product->getUuid()]);
|
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->findOneBy(['uuid' => $this->product->getUuid()]);
|
||||||
|
$productDoc = $this->documentManager->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)->findOneBy(['uid' => $product->getUid()]);
|
||||||
$this->price = $product->getPrice();
|
$this->engine->loadString($productDoc->getPluginSettingModule('wmd', 'config'));
|
||||||
|
$this->priceApi->setShop($this->shopService->getMongoShopByUid($product->getShop()->getUID()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ namespace Plugin\Custom\PSC\WMD_API\Service;
|
|||||||
use PSC\Shop\OrderBundle\Model\Order\Position\IProductTypeObject;
|
use PSC\Shop\OrderBundle\Model\Order\Position\IProductTypeObject;
|
||||||
use PSC\Shop\OrderBundle\Transformer\Order\Position\IPositionTransformer;
|
use PSC\Shop\OrderBundle\Transformer\Order\Position\IPositionTransformer;
|
||||||
use PSC\Shop\ProductBundle\Interfaces\IProducer;
|
use PSC\Shop\ProductBundle\Interfaces\IProducer;
|
||||||
|
use Plugin\Custom\PSC\WMD_API\Model\ProductSpecialObject;
|
||||||
use Plugin\Custom\PSC\WMD_API\Producer\Producer;
|
use Plugin\Custom\PSC\WMD_API\Producer\Producer;
|
||||||
use Plugin\Custom\PSC\WMD_API\Transformer\Position;
|
use Plugin\Custom\PSC\WMD_API\Transformer\Position;
|
||||||
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
|
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
|
||||||
@ -38,6 +39,6 @@ class ProductType implements \PSC\System\PluginBundle\Product\Type
|
|||||||
|
|
||||||
public function getProductTypeObject(): IProductTypeObject
|
public function getProductTypeObject(): IProductTypeObject
|
||||||
{
|
{
|
||||||
// TODO: Implement getProductTypeObject() method.
|
return new ProductSpecialObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,12 @@ class Position implements IPositionTransformer
|
|||||||
|
|
||||||
public function fromDb(\PSC\Shop\OrderBundle\Model\Order\Position $position, Orderpos $posEntity, \PSC\Shop\EntityBundle\Document\Position $posDoc)
|
public function fromDb(\PSC\Shop\OrderBundle\Model\Order\Position $position, Orderpos $posEntity, \PSC\Shop\EntityBundle\Document\Position $posDoc)
|
||||||
{
|
{
|
||||||
$position->getProduct()->setSpecialProductTypeObject(new ProductSpecialObject());
|
$obj = new ProductSpecialObject();
|
||||||
|
|
||||||
|
if(isset($posDoc->getSpecialProductTypeObject()['params'])) {
|
||||||
|
$obj->setParams($posDoc->getSpecialProductTypeObject()['params']);
|
||||||
|
}
|
||||||
|
$position->getProduct()->setSpecialProductTypeObject($obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toDb(\PSC\Shop\OrderBundle\Model\Order\Position $position, Orderpos $posEntity, \PSC\Shop\EntityBundle\Document\Position $posDoc)
|
public function toDb(\PSC\Shop\OrderBundle\Model\Order\Position $position, Orderpos $posEntity, \PSC\Shop\EntityBundle\Document\Position $posDoc)
|
||||||
|
|||||||
@ -70,7 +70,7 @@ if(isset($_POST["settings"]["bootstrap3Images"]["layout"])) {
|
|||||||
$txtdefault = fread($handledefault, filesize($filenamedefault));
|
$txtdefault = fread($handledefault, filesize($filenamedefault));
|
||||||
fclose($handledefault);
|
fclose($handledefault);
|
||||||
|
|
||||||
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/_hauptmenu.phtml";
|
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/_hauptmenu.html";
|
||||||
$handlehauptmenu = fopen($filenamehauptmenu, 'r');
|
$handlehauptmenu = fopen($filenamehauptmenu, 'r');
|
||||||
$txthauptmenu = fread($handlehauptmenu, filesize($filenamehauptmenu));
|
$txthauptmenu = fread($handlehauptmenu, filesize($filenamehauptmenu));
|
||||||
fclose($handlehauptmenu);
|
fclose($handlehauptmenu);
|
||||||
|
|||||||
@ -70,7 +70,7 @@ if(isset($_POST["settings"]["bootstrap4Images"]["layout"])) {
|
|||||||
$txtdefault = fread($handledefault, filesize($filenamedefault));
|
$txtdefault = fread($handledefault, filesize($filenamedefault));
|
||||||
fclose($handledefault);
|
fclose($handledefault);
|
||||||
|
|
||||||
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/_hauptmenu.phtml";
|
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/_hauptmenu.html";
|
||||||
$handlehauptmenu = fopen($filenamehauptmenu, 'r');
|
$handlehauptmenu = fopen($filenamehauptmenu, 'r');
|
||||||
$txthauptmenu = fread($handlehauptmenu, filesize($filenamehauptmenu));
|
$txthauptmenu = fread($handlehauptmenu, filesize($filenamehauptmenu));
|
||||||
fclose($handlehauptmenu);
|
fclose($handlehauptmenu);
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
import './src/css/style.scss'
|
//import './src/css/style.scss'
|
||||||
//import 'bootstrap/scss/bootstrap.scss';
|
import './src/css/output.css'
|
||||||
|
|
||||||
|
|
||||||
import * as $ from "jquery";
|
import * as $ from "jquery";
|
||||||
import { App } from "./src/app/app";
|
import { App } from "./src/app/app";
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -9,32 +9,38 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ebay/nice-modal-react": "^1.2.10",
|
"@ebay/nice-modal-react": "^1.2.13",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@rjsf/core": "^5.0.0-beta.11",
|
"@rjsf/core": "^5.18.3",
|
||||||
"@rjsf/utils": "^5.0.0-beta.11",
|
"@rjsf/utils": "^5.18.3",
|
||||||
"@rjsf/validator-ajv6": "^5.0.0-beta.11",
|
"@rjsf/validator-ajv6": "^5.18.3",
|
||||||
"@types/react": "^18.0.26",
|
"@types/react": "^18.3.1",
|
||||||
"@types/react-dom": "^18.0.9",
|
"@types/react-dom": "^18.3.0",
|
||||||
"@types/styled-components": "^5.1.26",
|
"@types/styled-components": "^5.1.34",
|
||||||
"axios": "^0.27.2",
|
"axios": "^1.6.8",
|
||||||
"debounce-promise": "^3.1.2",
|
"debounce-promise": "^3.1.2",
|
||||||
"eta": "^1.12.3",
|
"eta": "^3.4.0",
|
||||||
"i18next": "^23.2.6",
|
"flowbite": "^2.3.0",
|
||||||
|
"flowbite-react": "^0.9.0",
|
||||||
|
"i18next": "^23.11.3",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.3.1",
|
||||||
"react-bootstrap": "^2.7.0",
|
"react-dom": "^18.3.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-i18next": "^14.1.1",
|
||||||
"react-i18next": "^13.0.1",
|
"react-router-dom": "^6.23.0",
|
||||||
"react-router-dom": "^6.5.0",
|
"react-select": "^5.8.0",
|
||||||
"react-select": "^5.4.0",
|
"react-select-async-paginate": "^0.7.4",
|
||||||
"react-select-async-paginate": "^0.6.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
"reflect-metadata": "^0.1.13",
|
"rxjs": "^7.8.1",
|
||||||
"rxjs": "^7.5.6",
|
"styled-components": "^6.1.11",
|
||||||
"styled-components": "^6.0.1",
|
"tsyringe": "^4.8.0",
|
||||||
"tsyringe": "^4.7.0",
|
"use-debounce": "^10.0.0",
|
||||||
"use-debounce": "^9.0.2",
|
"uuid": "^9.0.1",
|
||||||
"uuid": "^8.3.2",
|
"zustand": "^4.5.2"
|
||||||
"zustand": "^4.1.1"
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"autoprefixer": "^10.4.19",
|
||||||
|
"postcss": "^8.4.38",
|
||||||
|
"tailwindcss": "^3.4.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
6016
src/new/var/plugins/System/PSC/Invoice/Webpack/src/css/output.css
Normal file
6016
src/new/var/plugins/System/PSC/Invoice/Webpack/src/css/output.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,4 @@
|
|||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
$box-shadow: 0.1rem 0.1rem 0.4rem rgba(0, 0, 0, 0.5);
|
|
||||||
|
|
||||||
// Required
|
|
||||||
@import "bootstrap/scss/bootstrap";
|
|
||||||
@ -15,7 +15,6 @@ import InfoFieldComponent from "../info/InfoFieldComponent"
|
|||||||
import React = require('react')
|
import React = require('react')
|
||||||
import OrderAliasComponent from '../order/OrderAliasComponent'
|
import OrderAliasComponent from '../order/OrderAliasComponent'
|
||||||
|
|
||||||
|
|
||||||
const BaseComponent = (props) => {
|
const BaseComponent = (props) => {
|
||||||
|
|
||||||
const [shop, setShop] = useState<Shop>(new Shop())
|
const [shop, setShop] = useState<Shop>(new Shop())
|
||||||
@ -41,25 +40,24 @@ const BaseComponent = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<div className={'container-fluid'}>
|
<div className='ml-1 mt-1 mr-1'>
|
||||||
<div className='row'>
|
<div className="flex gap-1 mt-1 mb-1">
|
||||||
<div className='col-2'>
|
<div className="flex-1">
|
||||||
<OrderAliasComponent order={order} />
|
<OrderAliasComponent order={order} />
|
||||||
</div>
|
</div>
|
||||||
<div className='col-10 text-end'>
|
<div className="">
|
||||||
<ButtonComponent loadOrder={loadOrder}/>
|
<ButtonComponent loadOrder={loadOrder}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TopBarComponent shop={shop} order={order} change={setShop} />
|
<TopBarComponent shop={shop} order={order} change={setShop} />
|
||||||
<div>{ shop.id != 0 && <ContactComponent shop={shop} order={order} /> }</div>
|
<div className="mt-1 mb-1">{ shop.id != 0 && <ContactComponent shop={shop} order={order} /> }</div>
|
||||||
<div>{ shop.id != 0 && <PositionsComponent shop={shop} order={order} /> }</div>
|
<div>{ shop.id != 0 && <PositionsComponent shop={shop} order={order} /> }</div>
|
||||||
<div className={'row'}>
|
<div className="mt-1 mb-1 flex gap-1">
|
||||||
<div className={'col-6'}>{ shop.id != 0 && <PaymentComponent shop={shop} order={order} /> }</div>
|
<div className="flex-1">{ shop.id != 0 && <PaymentComponent shop={shop} order={order} /> }</div>
|
||||||
<div className={'col-6'}>{ shop.id != 0 && <ShippingComponent shop={shop} order={order} /> }</div>
|
<div className="flex-1">{ shop.id != 0 && <ShippingComponent shop={shop} order={order} /> }</div>
|
||||||
</div>
|
</div>
|
||||||
{ shop.id != 0 && <InfoFieldComponent shop={shop} order={order} /> }
|
{ shop.id != 0 && <InfoFieldComponent shop={shop} order={order} /> }
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,16 +3,16 @@ import { BsPencil } from "@react-icons/all-files/bs/BsPencil";
|
|||||||
import { RiSaveFill } from "@react-icons/all-files/ri/RiSaveFill";
|
import { RiSaveFill } from "@react-icons/all-files/ri/RiSaveFill";
|
||||||
import { RiDeleteBin2Line } from "@react-icons/all-files/ri/RiDeleteBin2Line";
|
import { RiDeleteBin2Line } from "@react-icons/all-files/ri/RiDeleteBin2Line";
|
||||||
import { BsXCircle } from "@react-icons/all-files/bs/BsXCircle";
|
import { BsXCircle } from "@react-icons/all-files/bs/BsXCircle";
|
||||||
|
import { Button as BaseButton } from "flowbite-react";
|
||||||
const Button = ({ type, variant, onClick }) => {
|
const Button = ({ type, variant, onClick }) => {
|
||||||
return (
|
return (
|
||||||
<button className={'btn btn-' + variant} onClick={onClick}>
|
<BaseButton color={variant} pill onClick={onClick}>
|
||||||
{ type == 1 && <BsPlus/> }
|
{ type == 1 && <BsPlus/> }
|
||||||
{ type == 2 && <BsPencil/> }
|
{ type == 2 && <BsPencil/> }
|
||||||
{ type == 3 && <RiSaveFill/> }
|
{ type == 3 && <RiSaveFill/> }
|
||||||
{ type == 4 && <BsXCircle/> }
|
{ type == 4 && <BsXCircle/> }
|
||||||
{ type == 5 && <RiDeleteBin2Line/> }
|
{ type == 5 && <RiDeleteBin2Line/> }
|
||||||
</button>
|
</BaseButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import {debounceTime} from "rxjs"
|
|||||||
import {Order} from "../../model/order"
|
import {Order} from "../../model/order"
|
||||||
import { RiSaveFill } from "@react-icons/all-files/ri/RiSaveFill";
|
import { RiSaveFill } from "@react-icons/all-files/ri/RiSaveFill";
|
||||||
import { RiPrinterFill } from "@react-icons/all-files/ri/RiPrinterFill";
|
import { RiPrinterFill } from "@react-icons/all-files/ri/RiPrinterFill";
|
||||||
|
import { Button } from "flowbite-react";
|
||||||
|
|
||||||
class ButtonComponent extends React.Component<{loadOrder},{disabled: boolean}> {
|
class ButtonComponent extends React.Component<{loadOrder},{disabled: boolean}> {
|
||||||
orderState: OrderState
|
orderState: OrderState
|
||||||
@ -51,14 +52,13 @@ class ButtonComponent extends React.Component<{loadOrder},{disabled: boolean}> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className={"p-2 m-1"}>
|
<div className="flex gap-3">
|
||||||
<button className='btn btn-success' disabled={this.state.disabled} onClick={(e:any) => this.handleSave(e)}>
|
<Button size="xs" color="info" disabled={this.state.disabled} onClick={(e:any) => this.handleSave(e)}>
|
||||||
<RiSaveFill/> Speichern
|
<RiSaveFill className="mr-2 h-5 w-5"/> Speichern
|
||||||
</button>
|
</Button>
|
||||||
<button className='btn btn-info ms-2' disabled={!this.orderState.getCurrentOrder().value.saved} onClick={(e:any) => this.handlePrint(e)}>
|
<Button size="xs" color="success" disabled={!this.orderState.getCurrentOrder().value.saved} onClick={(e:any) => this.handlePrint(e)}>
|
||||||
<RiPrinterFill/> Drucken
|
<RiPrinterFill className="mr-2 h-5 w-5"/> Drucken
|
||||||
</button>
|
</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import NiceModal, { useModal, bootstrapDialog } from "@ebay/nice-modal-react"
|
import NiceModal, { useModal, bootstrapDialog } from "@ebay/nice-modal-react"
|
||||||
import Button from '../base/Button'
|
import Button from '../base/Button'
|
||||||
import Modal from 'react-bootstrap/Modal'
|
|
||||||
import {RJSFSchema} from "@rjsf/utils"
|
import {RJSFSchema} from "@rjsf/utils"
|
||||||
import validator from "@rjsf/validator-ajv6"
|
import validator from "@rjsf/validator-ajv6"
|
||||||
import Form from "@rjsf/core"
|
import Form from "@rjsf/core"
|
||||||
import { CountryService } from '../../services/country'
|
import { CountryService } from '../../services/country'
|
||||||
|
import { Modal } from "flowbite-react";
|
||||||
|
|
||||||
const AddressModal = NiceModal.create(
|
const Addressdiv = NiceModal.create(
|
||||||
({ title, action, address, shop }) => {
|
({ title, action, address, shop }) => {
|
||||||
|
|
||||||
const country_api = new CountryService()
|
const country_api = new CountryService()
|
||||||
@ -80,9 +80,9 @@ const AddressModal = NiceModal.create(
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal {...bootstrapDialog(modal)} >
|
<Modal show={modal.visible} onClose={() => modal.remove()}>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header>
|
||||||
<Modal.Title>{title}</Modal.Title>
|
<div>{title}</div>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
{action === "Save" && (
|
{action === "Save" && (
|
||||||
@ -125,4 +125,4 @@ const AddressModal = NiceModal.create(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
export default AddressModal
|
export default Addressdiv
|
||||||
|
|||||||
@ -33,7 +33,7 @@ const AddressModalComponent = ({handleAdd, handleEdit, address, shop}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'btn-group'}>
|
<div className={'flex gap-1'}>
|
||||||
<Button type={1} variant="success" onClick={showAddModal} />
|
<Button type={1} variant="success" onClick={showAddModal} />
|
||||||
<Button type={2} variant="info" onClick={() => {
|
<Button type={2} variant="info" onClick={() => {
|
||||||
showEditModal(address)
|
showEditModal(address)
|
||||||
|
|||||||
@ -69,8 +69,8 @@ const AddressSelect = ({address, contact, type, changeAddress, name, shop}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='row'>
|
<div className='flex gap-1'>
|
||||||
<div className='col-8'>
|
<div className='flex-1'>
|
||||||
<AsyncPaginate
|
<AsyncPaginate
|
||||||
defaultOptions
|
defaultOptions
|
||||||
defaultValue={address}
|
defaultValue={address}
|
||||||
@ -87,7 +87,7 @@ const AddressSelect = ({address, contact, type, changeAddress, name, shop}) => {
|
|||||||
|
|
||||||
{ localAddress && <AddressDetail address={localAddress} />}
|
{ localAddress && <AddressDetail address={localAddress} />}
|
||||||
</div>
|
</div>
|
||||||
<div className='col-2'>
|
<div >
|
||||||
<AddressModalComponent address={localAddress} handleAdd={handleAdd} handleEdit={handleEdit} shop={shop}/>
|
<AddressModalComponent address={localAddress} handleAdd={handleAdd} handleEdit={handleEdit} shop={shop}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,26 +34,23 @@ const ContactComponent = ({order, shop}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
<div className="flex">
|
||||||
<div className='row'>
|
<div className="flex-1">
|
||||||
<div className='col-6'>
|
|
||||||
<ContactSelect
|
<ContactSelect
|
||||||
order={order}
|
order={order}
|
||||||
shop={shop}
|
shop={shop}
|
||||||
onChange={setContact}
|
onChange={setContact}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-6'>
|
<div className="flex-1">
|
||||||
<AccountSelectComponent
|
<AccountSelectComponent
|
||||||
shop={shop} order={order}
|
shop={shop} order={order}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="flex gap-1">
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
<div className="flex-1">
|
||||||
<div className='row'>
|
|
||||||
<div className='col-4'>
|
|
||||||
{ order.contact.uuid != "" && <AddressSelect
|
{ order.contact.uuid != "" && <AddressSelect
|
||||||
address={order.invoiceAddress}
|
address={order.invoiceAddress}
|
||||||
contact={order.contact}
|
contact={order.contact}
|
||||||
@ -63,7 +60,7 @@ const ContactComponent = ({order, shop}) => {
|
|||||||
shop={shop}
|
shop={shop}
|
||||||
/> }
|
/> }
|
||||||
</div>
|
</div>
|
||||||
<div className='col-4'>
|
<div className="flex-1">
|
||||||
{ order.contact.uuid != "" && <AddressSelect
|
{ order.contact.uuid != "" && <AddressSelect
|
||||||
address={order.deliveryAddress}
|
address={order.deliveryAddress}
|
||||||
contact={order.contact}
|
contact={order.contact}
|
||||||
@ -73,7 +70,7 @@ const ContactComponent = ({order, shop}) => {
|
|||||||
shop={shop}
|
shop={shop}
|
||||||
/> }
|
/> }
|
||||||
</div>
|
</div>
|
||||||
<div className='col-4'>
|
<div className="flex-1">
|
||||||
{ order.contact.uuid != "" && <AddressSelect
|
{ order.contact.uuid != "" && <AddressSelect
|
||||||
address={order.senderAddress}
|
address={order.senderAddress}
|
||||||
changeAddress={changeAddress}
|
changeAddress={changeAddress}
|
||||||
@ -84,8 +81,7 @@ const ContactComponent = ({order, shop}) => {
|
|||||||
/> }
|
/> }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import NiceModal, { useModal, bootstrapDialog } from "@ebay/nice-modal-react";
|
import NiceModal, { useModal, bootstrapDialog } from "@ebay/nice-modal-react";
|
||||||
import Button from '../base/Button'
|
import Button from '../base/Button'
|
||||||
import Modal from 'react-bootstrap/Modal';
|
|
||||||
import {RJSFSchema} from "@rjsf/utils";
|
import {RJSFSchema} from "@rjsf/utils";
|
||||||
import {Contact} from "../../model/contact";
|
import {Contact} from "../../model/contact";
|
||||||
import validator from "@rjsf/validator-ajv6";
|
import validator from "@rjsf/validator-ajv6";
|
||||||
import Form from "@rjsf/core";
|
import Form from "@rjsf/core";
|
||||||
import {CountryService} from "../../services/country";
|
import {CountryService} from "../../services/country";
|
||||||
|
import { Modal } from "flowbite-react";
|
||||||
|
|
||||||
const ContactModal = NiceModal.create(
|
const ContactModal = NiceModal.create(
|
||||||
({ title, action, contact, shop }) => {
|
({ title, action, contact, shop }) => {
|
||||||
@ -20,7 +20,7 @@ const ContactModal = NiceModal.create(
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(contact) {
|
if(contact.uid != "") {
|
||||||
setFormData({
|
setFormData({
|
||||||
email: contact.username,
|
email: contact.username,
|
||||||
firstname: contact.layouter_data.firstname,
|
firstname: contact.layouter_data.firstname,
|
||||||
@ -37,7 +37,6 @@ const ContactModal = NiceModal.create(
|
|||||||
}
|
}
|
||||||
}, [contact]);
|
}, [contact]);
|
||||||
|
|
||||||
|
|
||||||
const uiSchema: RJSFSchema = {
|
const uiSchema: RJSFSchema = {
|
||||||
"ui:submitButtonOptions": {
|
"ui:submitButtonOptions": {
|
||||||
"submitText": "Save",
|
"submitText": "Save",
|
||||||
@ -82,9 +81,9 @@ const ContactModal = NiceModal.create(
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal {...bootstrapDialog(modal)} >
|
<Modal show={modal.visible} onClose={() => modal.remove()}>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header>
|
||||||
<Modal.Title>{title}</Modal.Title>
|
{title}
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
{action === "Save" && (
|
{action === "Save" && (
|
||||||
@ -104,7 +103,6 @@ const ContactModal = NiceModal.create(
|
|||||||
variant="success"
|
variant="success"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (action === "Save") {
|
if (action === "Save") {
|
||||||
console.log(formData);
|
|
||||||
if (formData) {
|
if (formData) {
|
||||||
modal.resolve(formData);
|
modal.resolve(formData);
|
||||||
modal.remove();
|
modal.remove();
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import { AddressService } from "../../services/address"
|
|||||||
|
|
||||||
const ContactModalComponent = ({shop, handleAdd, handleEdit, contact}) => {
|
const ContactModalComponent = ({shop, handleAdd, handleEdit, contact}) => {
|
||||||
|
|
||||||
|
|
||||||
const contactModal = useModal(ContactModal)
|
const contactModal = useModal(ContactModal)
|
||||||
|
|
||||||
const showAddModal = useCallback(() => {
|
const showAddModal = useCallback(() => {
|
||||||
@ -20,13 +21,15 @@ const ContactModalComponent = ({shop, handleAdd, handleEdit, contact}) => {
|
|||||||
},[contactModal])
|
},[contactModal])
|
||||||
|
|
||||||
const showEditModal = useCallback((contact) => {
|
const showEditModal = useCallback((contact) => {
|
||||||
|
contact = contact
|
||||||
|
console.log(contact)
|
||||||
contactModal.show({ title: 'Edit Contact', action: 'Save', contact: contact, shop: shop }).then((formData) => {
|
contactModal.show({ title: 'Edit Contact', action: 'Save', contact: contact, shop: shop }).then((formData) => {
|
||||||
updateContact(formData)
|
contact.parseFromFormData(formData)
|
||||||
|
updateContact(contact)
|
||||||
})
|
})
|
||||||
},[contactModal])
|
},[contactModal])
|
||||||
|
|
||||||
const updateContact = (formData) => {
|
const updateContact = (contact) => {
|
||||||
contact.parseFromFormData(formData)
|
|
||||||
const contact_api = new ContactService()
|
const contact_api = new ContactService()
|
||||||
contact_api.updateContact(contact).then((e: any) => {
|
contact_api.updateContact(contact).then((e: any) => {
|
||||||
handleEdit(contact)
|
handleEdit(contact)
|
||||||
@ -53,7 +56,7 @@ const ContactModalComponent = ({shop, handleAdd, handleEdit, contact}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'btn-group'}>
|
<div className={'flex gap-1'}>
|
||||||
<Button type={1} variant="success" onClick={showAddModal} />
|
<Button type={1} variant="success" onClick={showAddModal} />
|
||||||
<Button type={2} variant="info" onClick={() => {
|
<Button type={2} variant="info" onClick={() => {
|
||||||
showEditModal(contact)
|
showEditModal(contact)
|
||||||
|
|||||||
@ -52,8 +52,8 @@ const ContactSelect = ({order, shop, onChange}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"row"}>
|
<div className="flex gap-1">
|
||||||
<div className={"col-10"}>
|
<div className="flex-1">
|
||||||
<AsyncPaginate
|
<AsyncPaginate
|
||||||
defaultOptions
|
defaultOptions
|
||||||
className={`${orderState.getCurrentOrder().value.contact.username == "" ? "border border-danger" : ""}`}
|
className={`${orderState.getCurrentOrder().value.contact.username == "" ? "border border-danger" : ""}`}
|
||||||
@ -73,7 +73,7 @@ const ContactSelect = ({order, shop, onChange}) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={"col-2"}>
|
<div>
|
||||||
<ContactModalComponent shop={shop} contact={order.contact} handleAdd={handleAdd} handleEdit={handleEdit}/>
|
<ContactModalComponent shop={shop} contact={order.contact} handleAdd={handleAdd} handleEdit={handleEdit}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -20,8 +20,12 @@ const DraftComponent = ({order}) => {
|
|||||||
}, [order.draft])
|
}, [order.draft])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="gap-2">
|
||||||
<input type='checkbox' className='form-check-input' value={1} checked={ draft } onChange={(e) => onChange(e)} /> Entwurf
|
<label className="inline-flex items-center cursor-pointer">
|
||||||
|
<input type="checkbox" value="1" className="sr-only peer" defaultChecked={draft} onChange={(e) => onChange(e)}/>
|
||||||
|
<div className="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div>
|
||||||
|
<span className="ms-3 text-sm font-medium text-gray-900 dark:text-gray-300">Entwurf</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,17 +35,17 @@ const InfoFieldComponent = ({shop, order}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
<div className="">
|
||||||
<div className={"row"}>
|
<div className={"flex"}>
|
||||||
<div className={"col-6"}>
|
<div className={"flex-1"}>
|
||||||
<div className='form-floating'>
|
<div className='flex gap-1'>
|
||||||
<input type="text" name="basketField1" value={basketField1} onChange={ e => changeBasketField1(e.target.value)} className={"form-control"} placeholder={"Info 1"} />
|
<input type="text" name="basketField1" value={basketField1} onChange={ e => changeBasketField1(e.target.value)} className={"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"} placeholder={"Info 1"} />
|
||||||
<label>{shop.basketField1}</label>
|
<label>{shop.basketField1}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={"col-6"}>
|
<div className={"flex-1"}>
|
||||||
<div className='form-floating'>
|
<div className='flex gap-1'>
|
||||||
<input type="text" name="basketField2" value={basketField2} onChange={e => changeBasketField2(e.target.value)} className={"form-control"} placeholder={"Info 2"} />
|
<input type="text" name="basketField2" value={basketField2} onChange={e => changeBasketField2(e.target.value)} className={"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"} placeholder={"Info 2"} />
|
||||||
<label>{shop.basketField2}</label>
|
<label>{shop.basketField2}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -44,7 +44,7 @@ const PaymentComponent = ({ shop, order }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
<div className={"p-2"}>
|
||||||
<AsyncPaginate
|
<AsyncPaginate
|
||||||
defaultOptions
|
defaultOptions
|
||||||
key={JSON.stringify(shopUuid)}
|
key={JSON.stringify(shopUuid)}
|
||||||
@ -57,7 +57,7 @@ const PaymentComponent = ({ shop, order }) => {
|
|||||||
getOptionLabel={(option) => option.title}
|
getOptionLabel={(option) => option.title}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
isSearchable={false}
|
isSearchable={false}
|
||||||
className={`${payment == 0 ? "border border-danger" : ""}`}
|
className={`${payment == 0 ? "border border-red-500" : ""}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import {useEffect, useState} from 'react'
|
import {useEffect, useState} from 'react'
|
||||||
import Modal from 'react-bootstrap/Modal'
|
|
||||||
import * as PropTypes from "prop-types"
|
import * as PropTypes from "prop-types"
|
||||||
import { Shop } from '../../model/shop'
|
import { Shop } from '../../model/shop'
|
||||||
import {Product} from "../../model/product"
|
import {Product} from "../../model/product"
|
||||||
@ -11,6 +10,7 @@ import ProductForm from "../product/ProductForm"
|
|||||||
import {Order} from "../../model/order"
|
import {Order} from "../../model/order"
|
||||||
import { Pos } from '../../model/pos'
|
import { Pos } from '../../model/pos'
|
||||||
import Button from '../base/Button'
|
import Button from '../base/Button'
|
||||||
|
import { Modal } from "flowbite-react";
|
||||||
|
|
||||||
const AddPositionComponent = (props) => {
|
const AddPositionComponent = (props) => {
|
||||||
|
|
||||||
@ -34,15 +34,16 @@ const AddPositionComponent = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='text-center'>
|
<div className='text-center'>
|
||||||
<Button variant="primary" type={1} onClick={handleShow}/>
|
<Button type={1} onClick={handleShow} variant="success"/>
|
||||||
|
|
||||||
<Modal show={show} fullscreen={true} onHide={handleClose}>
|
<Modal size="7xl" show={show} onClose={() => handleClose()}
|
||||||
<Modal.Header closeButton>
|
>
|
||||||
<Modal.Title>add position</Modal.Title>
|
<Modal.Header>
|
||||||
|
add position
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body className="min-h-96">
|
||||||
<div className='row'>
|
<div className='flex'>
|
||||||
<div className='col-6'>
|
<div className='flex-1'>
|
||||||
<h4>ProductGroup</h4>
|
<h4>ProductGroup</h4>
|
||||||
<ProductGroupSelect
|
<ProductGroupSelect
|
||||||
value={productGroup}
|
value={productGroup}
|
||||||
@ -50,7 +51,7 @@ const AddPositionComponent = (props) => {
|
|||||||
onChange={setProductGroup}
|
onChange={setProductGroup}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-6'>
|
<div className='flex-1'>
|
||||||
<h4>Product</h4>
|
<h4>Product</h4>
|
||||||
<ProductSelect
|
<ProductSelect
|
||||||
value={product}
|
value={product}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import {useEffect, useState} from 'react'
|
import {useEffect, useState} from 'react'
|
||||||
import Modal from 'react-bootstrap/Modal'
|
|
||||||
import * as PropTypes from "prop-types"
|
import * as PropTypes from "prop-types"
|
||||||
import { Shop } from '../../model/shop'
|
import { Shop } from '../../model/shop'
|
||||||
import {Product} from "../../model/product"
|
import {Product} from "../../model/product"
|
||||||
@ -10,6 +9,7 @@ import ProductSelect from "../product/ProductSelect"
|
|||||||
import { Pos } from '../../model/pos'
|
import { Pos } from '../../model/pos'
|
||||||
import Button from '../base/Button'
|
import Button from '../base/Button'
|
||||||
import ProductForm from '../product/ProductForm'
|
import ProductForm from '../product/ProductForm'
|
||||||
|
import { Modal } from "flowbite-react";
|
||||||
|
|
||||||
const EditPositionComponent = ({position, shop, changePos}) => {
|
const EditPositionComponent = ({position, shop, changePos}) => {
|
||||||
|
|
||||||
@ -19,23 +19,23 @@ const EditPositionComponent = ({position, shop, changePos}) => {
|
|||||||
const handleShow = () => setShow(true)
|
const handleShow = () => setShow(true)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div>
|
||||||
<Button type={2} variant="primary" onClick={handleShow}/>
|
<div>
|
||||||
|
<Button type={2} variant="gray" onClick={handleShow}/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Modal show={show} fullscreen={true} onHide={handleClose}>
|
<Modal>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header className="text-mauve12 m-0 text-[17px] font-medium">
|
||||||
<Modal.Title>edit position</Modal.Title>
|
edit position
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<ProductForm
|
<ProductForm
|
||||||
pos={position}
|
pos={position}
|
||||||
handleChange={changePos}
|
handleChange={changePos}
|
||||||
handleClose={handleClose}
|
handleClose={handleClose}
|
||||||
/>
|
/></Modal.Body>
|
||||||
|
|
||||||
</Modal.Body>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
</>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,29 +10,29 @@ const ItemsComponent = ({positions, delPos, shop, changePos}) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className={'row'}>
|
<div className={'flex'}>
|
||||||
<div className={'col-1'}>
|
<div className={'flex-1'}>
|
||||||
<h5>Pos</h5>
|
<h5>Pos</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-3'}>
|
<div className={'flex-1'}>
|
||||||
<h5>Title</h5>
|
<h5>Title</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-1'}>
|
<div className={'flex-1'}>
|
||||||
<h5>Anzahl</h5>
|
<h5>Anzahl</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-1 text-end'}>
|
<div className={'flex-1 text-end'}>
|
||||||
<h5>Netto</h5>
|
<h5>Netto</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-1 text-end'}>
|
<div className={'flex-1 text-end'}>
|
||||||
<h5>Tax</h5>
|
<h5>Tax</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-1 text-end'}>
|
<div className={'flex-1 text-end'}>
|
||||||
<h5>Gross</h5>
|
<h5>Gross</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-2 text-end'}>
|
<div className={'flex-1 text-end'}>
|
||||||
<h5>Status</h5>
|
<h5>Status</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-2'}>
|
<div className={'flex-1'}>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -15,15 +15,20 @@ const PosComponent = ({index, pos, delPos, changePos, shop}) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={'row'}>
|
<div className={'flex'}>
|
||||||
<div className={'col-1'}>{index + 1}</div>
|
<div className={'flex-1'}>{index + 1}</div>
|
||||||
<div className={'col-3'}>{pos.product.title}</div>
|
<div className={'flex-1'}>{pos.product.title}</div>
|
||||||
<div className={'col-1'}>{pos.count}</div>
|
<div className={'flex-1'}>{pos.count}</div>
|
||||||
<div className={'col-1 text-end'}><Currency price={ pos.price.allNet} /></div>
|
<div className={'flex-1 text-end'}><Currency price={ pos.price.allNet} /></div>
|
||||||
<div className={'col-1 text-end'}><Currency price={ pos.price.allVat} /></div>
|
<div className={'flex-1 text-end'}><Currency price={ pos.price.allVat} /></div>
|
||||||
<div className={'col-1 text-end'}><Currency price={ pos.price.allGross} /></div>
|
<div className={'flex-1 text-end'}><Currency price={ pos.price.allGross} /></div>
|
||||||
<div className={'col-2 text-end'}></div>
|
<div className={'flex-1 text-end'}></div>
|
||||||
<div className={'col-2 text-end'}><EditPositionComponent shop={shop} position={pos} changePos={changePos} /><Button type={5} variant={'danger'} onClick={() => deletePos(pos.uuid)} /></div>
|
<div className={'flex-1 text-end'}>
|
||||||
|
<div className="flex gap-1">
|
||||||
|
<EditPositionComponent shop={shop} position={pos} changePos={changePos} />
|
||||||
|
<Button type={5} variant={'failure'} onClick={() => deletePos(pos.uuid)} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -44,12 +44,10 @@ const PositionsComponent = ({order, shop, updateOrder}) => {
|
|||||||
}, [positions])
|
}, [positions])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className={"p-2"}>
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
|
||||||
<ItemsComponent positions={positions} shop={shop} delPos={delPos} changePos={changePos}/>
|
<ItemsComponent positions={positions} shop={shop} delPos={delPos} changePos={changePos}/>
|
||||||
<AddPositionComponent shop={shop} addPos={addPos}/>
|
<AddPositionComponent shop={shop} addPos={addPos}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,15 +88,15 @@ const ProductForm = ({shop, pos, handleClose, handleChange}) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='row'>
|
<div className='flex'>
|
||||||
<div className='col-6'>
|
<div className='flex-1'>
|
||||||
<Form schema={schema}
|
<Form schema={schema}
|
||||||
uiSchema={uiSchema}
|
uiSchema={uiSchema}
|
||||||
formData={formData}
|
formData={formData}
|
||||||
onChange={(e) => changeCalc(e.formData)}
|
onChange={(e) => changeCalc(e.formData)}
|
||||||
validator={validator}/>
|
validator={validator}/>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-6'>
|
<div className=''>
|
||||||
<>
|
<>
|
||||||
<h5>Netto: <Currency price={ price.allNet} /></h5>
|
<h5>Netto: <Currency price={ price.allNet} /></h5>
|
||||||
<h5>Mwert: <Currency price={ price.allVat} /></h5>
|
<h5>Mwert: <Currency price={ price.allVat} /></h5>
|
||||||
|
|||||||
@ -42,7 +42,7 @@ const ShippingComponent = ({shop, order}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
<div className={"p-2"}>
|
||||||
<AsyncPaginate
|
<AsyncPaginate
|
||||||
defaultOptions
|
defaultOptions
|
||||||
key={JSON.stringify(shopUuid)}
|
key={JSON.stringify(shopUuid)}
|
||||||
@ -55,7 +55,7 @@ const ShippingComponent = ({shop, order}) => {
|
|||||||
getOptionLabel={(option) => option.title}
|
getOptionLabel={(option) => option.title}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
isSearchable={false}
|
isSearchable={false}
|
||||||
className={`${shipping == 0 ? "border border-danger" : ""}`}
|
className={`${shipping == 0 ? "border border-red-500" : ""}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -38,7 +38,7 @@ const ShopSelectComponent = (props) => {
|
|||||||
getOptionLabel={(option) => option.name}
|
getOptionLabel={(option) => option.name}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
isSearchable={false}
|
isSearchable={false}
|
||||||
className={`${props.shop.uuid == "" ? "border border-danger" : ""}`}
|
className={`${props.shop.uuid == "" ? "border border-danger" : "border border-slate-200"}`}
|
||||||
name='Shop'
|
name='Shop'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@ -9,22 +9,20 @@ import CalcComponent from '../calc/CalcComponent'
|
|||||||
const TopBarComponent = ({shop, order, change}) => {
|
const TopBarComponent = ({shop, order, change}) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"shadow p-2 mt-3 rounded"}>
|
<div className="flex gap-3">
|
||||||
<div className='row'>
|
<div>
|
||||||
<div className='col-1'>
|
|
||||||
<DraftComponent order={order} />
|
<DraftComponent order={order} />
|
||||||
</div>
|
</div>
|
||||||
<div className='col-3'>
|
<div className="flex-auto">
|
||||||
<TypeSelectComponent order={order} />
|
<TypeSelectComponent order={order} />
|
||||||
</div>
|
</div>
|
||||||
<div className='col-4'>
|
<div className="flex-auto">
|
||||||
<ShopSelectComponent shop={shop} change={change} />
|
<ShopSelectComponent shop={shop} change={change} />
|
||||||
</div>
|
</div>
|
||||||
<div className={'col-4 text-end'}>
|
<div>
|
||||||
<CalcComponent />
|
<CalcComponent />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
const flowbite = require("flowbite-react/tailwind");
|
||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
module.exports = {
|
||||||
|
content: [
|
||||||
|
'./src/**/*.{js,jsx,ts,tsx}',
|
||||||
|
flowbite.content()
|
||||||
|
],
|
||||||
|
theme: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [flowbite.plugin()],
|
||||||
|
}
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
require_once (__DIR__ .'/../../../../../../../src/PSC/Shop/EntityBundle/Lagacy/TP_Basket_Item.php');
|
require_once __DIR__ .'/../../../../../../../src/PSC/Shop/EntityBundle/Lagacy/TP_Basket_Item.php';
|
||||||
|
|
||||||
#[Route('/correction')]
|
#[Route('/correction')]
|
||||||
class CorrectionController extends AbstractController
|
class CorrectionController extends AbstractController
|
||||||
@ -41,8 +41,8 @@ class CorrectionController extends AbstractController
|
|||||||
$userRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$userRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
$qb = $userRepository->createQueryBuilder('orderspos')
|
$qb = $userRepository->createQueryBuilder('orderspos')
|
||||||
->leftJoin('orderspos.order', 'ord')
|
->leftJoin('orderspos.order', 'ord')
|
||||||
->andWhere('orderspos.shop = :shop_id')
|
->andWhere('ord.shop = :shop_id')
|
||||||
->andWhere('orderspos.status IN (50,155,500,510,520,530)')
|
->andWhere('orderspos.status IN (30,50,155,500,510,520,530)')
|
||||||
->setParameter("shop_id", $selectedShop->getUid())
|
->setParameter("shop_id", $selectedShop->getUid())
|
||||||
->orderBy('orderspos.id', 'desc');
|
->orderBy('orderspos.id', 'desc');
|
||||||
|
|
||||||
@ -61,16 +61,22 @@ class CorrectionController extends AbstractController
|
|||||||
#[Route('/deleteupload/{uuid}/{upload}', name: 'psc_backend_production_correction_deleteupload')]
|
#[Route('/deleteupload/{uuid}/{upload}', name: 'psc_backend_production_correction_deleteupload')]
|
||||||
public function deleteuploadAction(\PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, $uuid, $upload)
|
public function deleteuploadAction(\PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, $uuid, $upload)
|
||||||
{
|
{
|
||||||
/** @var Shop $selectedShop */
|
/**
|
||||||
|
* @var Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
|
|
||||||
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
/** @var Orderpos $position */
|
/**
|
||||||
$position = $positionRepo->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
* @var Orderpos $position
|
||||||
|
*/
|
||||||
|
$position = $positionRepo->findOneBy(array('uuid' => $uuid));
|
||||||
|
|
||||||
if($position) {
|
if($position) {
|
||||||
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
||||||
/** @var Upload $upload */
|
/**
|
||||||
|
* @var Upload $upload
|
||||||
|
*/
|
||||||
$upload = $uploadRepo->findOneBy(array('orderPos' => $position, 'uid' => $upload));
|
$upload = $uploadRepo->findOneBy(array('orderPos' => $position, 'uid' => $upload));
|
||||||
if($upload) {
|
if($upload) {
|
||||||
$entityManager->remove($upload);
|
$entityManager->remove($upload);
|
||||||
@ -85,16 +91,22 @@ class CorrectionController extends AbstractController
|
|||||||
#[Route('/changeexport/{uuid}/{upload}', name: 'psc_backend_production_correction_changeexport')]
|
#[Route('/changeexport/{uuid}/{upload}', name: 'psc_backend_production_correction_changeexport')]
|
||||||
public function changeexportAction(\PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, $uuid, $upload)
|
public function changeexportAction(\PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, $uuid, $upload)
|
||||||
{
|
{
|
||||||
/** @var Shop $selectedShop */
|
/**
|
||||||
|
* @var Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
|
|
||||||
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
/** @var Orderpos $position */
|
/**
|
||||||
$position = $positionRepo->findOneBy(array('shop' => $selectedShop, 'uuid' => $uuid));
|
* @var Orderpos $position
|
||||||
|
*/
|
||||||
|
$position = $positionRepo->findOneBy(array('uuid' => $uuid));
|
||||||
if($position) {
|
if($position) {
|
||||||
|
|
||||||
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
||||||
/** @var Upload $upload */
|
/**
|
||||||
|
* @var Upload $upload
|
||||||
|
*/
|
||||||
$upload = $uploadRepo->findOneBy(array('orderPos' => $position, 'uid' => $upload));
|
$upload = $uploadRepo->findOneBy(array('orderPos' => $position, 'uid' => $upload));
|
||||||
|
|
||||||
if($upload) {
|
if($upload) {
|
||||||
@ -112,15 +124,21 @@ class CorrectionController extends AbstractController
|
|||||||
#[Route('/detail/{uuid}', name: 'psc_backend_production_correction_detail_index')]
|
#[Route('/detail/{uuid}', name: 'psc_backend_production_correction_detail_index')]
|
||||||
public function detailAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, Manager $eventManager, PaperDB $paperDB, SessionInterface $session, Order $orderService)
|
public function detailAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, Manager $eventManager, PaperDB $paperDB, SessionInterface $session, Order $orderService)
|
||||||
{
|
{
|
||||||
/** @var Shop $selectedShop */
|
/**
|
||||||
|
* @var Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
|
|
||||||
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
/** @var Orderpos $position */
|
/**
|
||||||
$position = $positionRepo->findOneBy(array('shop' => $selectedShop, 'uuid' => $request->get('uuid', false)));
|
* @var Orderpos $position
|
||||||
|
*/
|
||||||
|
$position = $positionRepo->findOneBy(array('uuid' => $request->get('uuid', false)));
|
||||||
|
|
||||||
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
||||||
/** @var Upload $uploadObj */
|
/**
|
||||||
|
* @var Upload $uploadObj
|
||||||
|
*/
|
||||||
$uploadObj = $uploadRepo->findOneBy(array('orderPos' => $position));
|
$uploadObj = $uploadRepo->findOneBy(array('orderPos' => $position));
|
||||||
|
|
||||||
$upload = new Upload();
|
$upload = new Upload();
|
||||||
@ -138,7 +156,9 @@ class CorrectionController extends AbstractController
|
|||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
|
||||||
/** @var UploadedFile $uploadFile */
|
/**
|
||||||
|
* @var UploadedFile $uploadFile
|
||||||
|
*/
|
||||||
$uploadFile = $form->get('file')->getData();
|
$uploadFile = $form->get('file')->getData();
|
||||||
if($uploadFile instanceOf UploadedFile) {
|
if($uploadFile instanceOf UploadedFile) {
|
||||||
$id = Uuid::uuid4();
|
$id = Uuid::uuid4();
|
||||||
@ -174,9 +194,12 @@ class CorrectionController extends AbstractController
|
|||||||
|
|
||||||
if (($formStatus->isSubmitted() && $formStatus->isValid()) || ($formQuickStatus->isSubmitted() && $formQuickStatus->isValid())) {
|
if (($formStatus->isSubmitted() && $formStatus->isValid()) || ($formQuickStatus->isSubmitted() && $formQuickStatus->isValid())) {
|
||||||
$inPackage = false;
|
$inPackage = false;
|
||||||
/** @var Upload $upload */
|
/**
|
||||||
|
* @var Upload $upload
|
||||||
|
*/
|
||||||
foreach($uploads as $upload) {
|
foreach($uploads as $upload) {
|
||||||
if($upload->isExport()) $inPackage = true;
|
if($upload->isExport()) { $inPackage = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($inPackage || $position->getStatus() != 155) {
|
if($inPackage || $position->getStatus() != 155) {
|
||||||
|
|||||||
@ -6,8 +6,6 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||||||
use Knp\Component\Pager\PaginatorInterface;
|
use Knp\Component\Pager\PaginatorInterface;
|
||||||
use Plugin\System\PSC\Production\Form\Backend\QuickStatusType;
|
use Plugin\System\PSC\Production\Form\Backend\QuickStatusType;
|
||||||
use Plugin\System\PSC\Production\Form\Backend\StatusType;
|
use Plugin\System\PSC\Production\Form\Backend\StatusType;
|
||||||
use PSC\Library\Calc\Engine;
|
|
||||||
use PSC\Library\Calc\PaperContainer;
|
|
||||||
use PSC\Shop\EntityBundle\Entity\Orderpos;
|
use PSC\Shop\EntityBundle\Entity\Orderpos;
|
||||||
use PSC\Shop\EntityBundle\Entity\Shop;
|
use PSC\Shop\EntityBundle\Entity\Shop;
|
||||||
use PSC\Shop\OrderBundle\Form\Backend\ProdType;
|
use PSC\Shop\OrderBundle\Form\Backend\ProdType;
|
||||||
@ -23,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
require_once (__DIR__ .'/../../../../../../../src/PSC/Shop/EntityBundle/Lagacy/TP_Basket_Item.php');
|
require_once __DIR__ .'/../../../../../../../src/PSC/Shop/EntityBundle/Lagacy/TP_Basket_Item.php';
|
||||||
|
|
||||||
#[Route('/prepress')]
|
#[Route('/prepress')]
|
||||||
class PrepressController extends AbstractController
|
class PrepressController extends AbstractController
|
||||||
@ -40,7 +38,7 @@ class PrepressController extends AbstractController
|
|||||||
$userRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$userRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
$qb = $userRepository->createQueryBuilder('orderspos')
|
$qb = $userRepository->createQueryBuilder('orderspos')
|
||||||
->leftJoin('orderspos.order', 'ord')
|
->leftJoin('orderspos.order', 'ord')
|
||||||
->andWhere('orderspos.shop = :shop_id')
|
->andWhere('ord.shop = :shop_id')
|
||||||
->andWhere('orderspos.status = 158')
|
->andWhere('orderspos.status = 158')
|
||||||
->setParameter("shop_id", $selectedShop->getUid())
|
->setParameter("shop_id", $selectedShop->getUid())
|
||||||
->orderBy('orderspos.id', 'desc');
|
->orderBy('orderspos.id', 'desc');
|
||||||
@ -61,12 +59,16 @@ class PrepressController extends AbstractController
|
|||||||
#[Route('/detail/{uuid}', name: 'psc_backend_production_prepress_detail_index')]
|
#[Route('/detail/{uuid}', name: 'psc_backend_production_prepress_detail_index')]
|
||||||
public function detailAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, Order $orderService, SessionInterface $session, PaperDB $paperDB, EntityManagerInterface $entityManager, DocumentManager $documentManager, Manager $eventManager)
|
public function detailAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, Order $orderService, SessionInterface $session, PaperDB $paperDB, EntityManagerInterface $entityManager, DocumentManager $documentManager, Manager $eventManager)
|
||||||
{
|
{
|
||||||
/** @var Shop $selectedShop */
|
/**
|
||||||
|
* @var Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
|
|
||||||
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
/** @var Orderpos $position */
|
/**
|
||||||
$position = $positionRepo->findOneBy(array('shop' => $selectedShop, 'uuid' => $request->get('uuid', false)));
|
* @var Orderpos $position
|
||||||
|
*/
|
||||||
|
$position = $positionRepo->findOneBy(array('uuid' => $request->get('uuid', false)));
|
||||||
|
|
||||||
$formStatus = $this->createForm(StatusType::class, $position);
|
$formStatus = $this->createForm(StatusType::class, $position);
|
||||||
$formQuickStatus = $this->createForm(QuickStatusType::class, $position);
|
$formQuickStatus = $this->createForm(QuickStatusType::class, $position);
|
||||||
@ -74,12 +76,16 @@ class PrepressController extends AbstractController
|
|||||||
$formProd = $this->createForm(ProdType::class);
|
$formProd = $this->createForm(ProdType::class);
|
||||||
|
|
||||||
if($position->getProduct()->getOriginalProduct() != 0) {
|
if($position->getProduct()->getOriginalProduct() != 0) {
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Product $productDoc
|
||||||
|
*/
|
||||||
$productDoc = $documentManager
|
$productDoc = $documentManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
||||||
->findOneBy(array('uid' => (string)$position->getProduct()->getOriginalProduct()));
|
->findOneBy(array('uid' => (string)$position->getProduct()->getOriginalProduct()));
|
||||||
}else{
|
}else{
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Document\Product $productDoc
|
||||||
|
*/
|
||||||
$productDoc = $documentManager
|
$productDoc = $documentManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
||||||
->findOneBy(array('uid' => (string)$position->getProduct()->getUid()));
|
->findOneBy(array('uid' => (string)$position->getProduct()->getUid()));
|
||||||
|
|||||||
@ -25,7 +25,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
require_once (__DIR__ .'/../../../../../../../src/PSC/Shop/EntityBundle/Lagacy/TP_Basket_Item.php');
|
require_once __DIR__ .'/../../../../../../../src/PSC/Shop/EntityBundle/Lagacy/TP_Basket_Item.php';
|
||||||
|
|
||||||
#[Route('/production')]
|
#[Route('/production')]
|
||||||
class ProductionController extends AbstractController
|
class ProductionController extends AbstractController
|
||||||
@ -42,7 +42,7 @@ class ProductionController extends AbstractController
|
|||||||
$userRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$userRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
$qb = $userRepository->createQueryBuilder('orderspos')
|
$qb = $userRepository->createQueryBuilder('orderspos')
|
||||||
->leftJoin('orderspos.order', 'ord')
|
->leftJoin('orderspos.order', 'ord')
|
||||||
->andWhere('orderspos.shop = :shop_id')
|
->andWhere('ord.shop = :shop_id')
|
||||||
->andWhere('orderspos.status = 160')
|
->andWhere('orderspos.status = 160')
|
||||||
->setParameter("shop_id", $selectedShop->getUid())
|
->setParameter("shop_id", $selectedShop->getUid())
|
||||||
->orderBy('orderspos.id', 'desc');
|
->orderBy('orderspos.id', 'desc');
|
||||||
@ -63,15 +63,21 @@ class ProductionController extends AbstractController
|
|||||||
#[Route('/detail/{uuid}', name: 'psc_backend_production_production_detail_index')]
|
#[Route('/detail/{uuid}', name: 'psc_backend_production_production_detail_index')]
|
||||||
public function detailAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, Order $orderService, SessionInterface $session, PaperDB $paperDB, EntityManagerInterface $entityManager, DocumentManager $documentManager, Manager $eventManager)
|
public function detailAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, Order $orderService, SessionInterface $session, PaperDB $paperDB, EntityManagerInterface $entityManager, DocumentManager $documentManager, Manager $eventManager)
|
||||||
{
|
{
|
||||||
/** @var Shop $selectedShop */
|
/**
|
||||||
|
* @var Shop $selectedShop
|
||||||
|
*/
|
||||||
$selectedShop = $shopService->getSelectedShop();
|
$selectedShop = $shopService->getSelectedShop();
|
||||||
|
|
||||||
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
$positionRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
|
||||||
/** @var Orderpos $position */
|
/**
|
||||||
$position = $positionRepo->findOneBy(array('shop' => $selectedShop, 'uuid' => $request->get('uuid', false)));
|
* @var Orderpos $position
|
||||||
|
*/
|
||||||
|
$position = $positionRepo->findOneBy(array('uuid' => $request->get('uuid', false)));
|
||||||
|
|
||||||
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
$uploadRepo = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Upload');
|
||||||
/** @var Upload $uploadObj */
|
/**
|
||||||
|
* @var Upload $uploadObj
|
||||||
|
*/
|
||||||
$uploadObj = $uploadRepo->findOneBy(array('orderPos' => $position));
|
$uploadObj = $uploadRepo->findOneBy(array('orderPos' => $position));
|
||||||
|
|
||||||
$upload = new Upload();
|
$upload = new Upload();
|
||||||
@ -87,7 +93,9 @@ class ProductionController extends AbstractController
|
|||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
/** @var UploadedFile $uploadFile */
|
/**
|
||||||
|
* @var UploadedFile $uploadFile
|
||||||
|
*/
|
||||||
$uploadFile = $form->get('file')->getData();
|
$uploadFile = $form->get('file')->getData();
|
||||||
|
|
||||||
$id = Uuid::uuid4();
|
$id = Uuid::uuid4();
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<p class="bg-info text-white p-2">Es werden nur Positionen mit den Stati: 50, 155,500, 510, 520, 530 angezeigt</p>
|
<p class="bg-info text-white p-2">Es werden nur Positionen mit den Stati: 30, 50, 155,500, 510, 520, 530 angezeigt</p>
|
||||||
<table class="table table-striped table-sm">
|
<table class="table table-striped table-sm">
|
||||||
<thead class="">
|
<thead class="">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -21,7 +21,8 @@ use PSC\Shop\ProductBundle\Model\Product;
|
|||||||
use PSC\System\SettingsBundle\Service\PaperDB;
|
use PSC\System\SettingsBundle\Service\PaperDB;
|
||||||
use PSC\System\SettingsBundle\Service\Shop;
|
use PSC\System\SettingsBundle\Service\Shop;
|
||||||
|
|
||||||
class Producer implements IUiProducer, IProducerHydrateModel {
|
class Producer implements IUiProducer, IProducerHydrateModel
|
||||||
|
{
|
||||||
|
|
||||||
private Shop $shopService;
|
private Shop $shopService;
|
||||||
private PaperDB $paperService;
|
private PaperDB $paperService;
|
||||||
@ -46,7 +47,9 @@ class Producer implements IUiProducer, IProducerHydrateModel {
|
|||||||
|
|
||||||
public function setParams(array $params): void
|
public function setParams(array $params): void
|
||||||
{
|
{
|
||||||
/** @var ProductSpecialObject $specProd */
|
/**
|
||||||
|
* @var ProductSpecialObject $specProd
|
||||||
|
*/
|
||||||
$specProd = $this->product->getSpecialProductTypeObject();
|
$specProd = $this->product->getSpecialProductTypeObject();
|
||||||
$specProd->setParams($params);
|
$specProd->setParams($params);
|
||||||
}
|
}
|
||||||
@ -60,7 +63,9 @@ class Producer implements IUiProducer, IProducerHydrateModel {
|
|||||||
{
|
{
|
||||||
|
|
||||||
$this->setVariables();
|
$this->setVariables();
|
||||||
/** @var ProductSpecialObject $specProd */
|
/**
|
||||||
|
* @var ProductSpecialObject $specProd
|
||||||
|
*/
|
||||||
$specProd = $this->product->getSpecialProductTypeObject();
|
$specProd = $this->product->getSpecialProductTypeObject();
|
||||||
|
|
||||||
$priceObj = Money::ofMinor($this->engine->getPrice()*100, 'EUR');
|
$priceObj = Money::ofMinor($this->engine->getPrice()*100, 'EUR');
|
||||||
@ -81,7 +86,9 @@ class Producer implements IUiProducer, IProducerHydrateModel {
|
|||||||
private function setVariables(): void
|
private function setVariables(): void
|
||||||
{
|
{
|
||||||
if($this->product->getSpecialProductTypeObject()) {
|
if($this->product->getSpecialProductTypeObject()) {
|
||||||
/** @var ProductSpecialObject $specProd */
|
/**
|
||||||
|
* @var ProductSpecialObject $specProd
|
||||||
|
*/
|
||||||
$specProd = $this->product->getSpecialProductTypeObject();
|
$specProd = $this->product->getSpecialProductTypeObject();
|
||||||
|
|
||||||
$this->engine->setVariables($specProd->getParams());
|
$this->engine->setVariables($specProd->getParams());
|
||||||
@ -100,13 +107,17 @@ class Producer implements IUiProducer, IProducerHydrateModel {
|
|||||||
$engine = new Engine();
|
$engine = new Engine();
|
||||||
$paperContainer = new PaperContainer();
|
$paperContainer = new PaperContainer();
|
||||||
if($this->product->getSpecialProductTypeObject() && $this->product->getSpecialProductTypeObject()->getXml()) {
|
if($this->product->getSpecialProductTypeObject() && $this->product->getSpecialProductTypeObject()->getXml()) {
|
||||||
|
$shop = $this->shopService->getShopByUid($this->product->getShopUuid());
|
||||||
$engine = new Engine();
|
$engine = new Engine();
|
||||||
$engine->setPaperRepository($this->paperService);
|
|
||||||
$engine->setPaperContainer($paperContainer);
|
|
||||||
$engine->loadString($this->product->getSpecialProductTypeObject()->getXml());
|
$engine->loadString($this->product->getSpecialProductTypeObject()->getXml());
|
||||||
|
if($shop) {
|
||||||
|
$engine->setFormulas($shop->getFormel());
|
||||||
|
$engine->setParameters($shop->getParameter());
|
||||||
|
}
|
||||||
}elseif($this->product->getUid()) {
|
}elseif($this->product->getUid()) {
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Product $product */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Product $product
|
||||||
|
*/
|
||||||
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->find($this->product->getUid());
|
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->find($this->product->getUid());
|
||||||
|
|
||||||
$paperContainer->parse(simplexml_load_string($product->getShop()->getInstall()->getPaperContainer()));
|
$paperContainer->parse(simplexml_load_string($product->getShop()->getInstall()->getPaperContainer()));
|
||||||
@ -120,9 +131,10 @@ class Producer implements IUiProducer, IProducerHydrateModel {
|
|||||||
$engine->setFormulas($product->getShop()->getFormel());
|
$engine->setFormulas($product->getShop()->getFormel());
|
||||||
$engine->setParameters($product->getShop()->getParameter());
|
$engine->setParameters($product->getShop()->getParameter());
|
||||||
}elseif($this->product->getUuid()) {
|
}elseif($this->product->getUuid()) {
|
||||||
/** @var \PSC\Shop\EntityBundle\Entity\Product $product */
|
/**
|
||||||
|
* @var \PSC\Shop\EntityBundle\Entity\Product $product
|
||||||
|
*/
|
||||||
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->findOneBy(['uuid' => $this->product->getUuid()]);
|
$product = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->findOneBy(['uuid' => $this->product->getUuid()]);
|
||||||
|
|
||||||
$paperContainer->parse(simplexml_load_string($product->getShop()->getInstall()->getPaperContainer()));
|
$paperContainer->parse(simplexml_load_string($product->getShop()->getInstall()->getPaperContainer()));
|
||||||
$engine = new Engine();
|
$engine = new Engine();
|
||||||
$engine->setPaperRepository($this->paperService);
|
$engine->setPaperRepository($this->paperService);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
src/new/web/build/881.ec863007.js
Normal file
2
src/new/web/build/881.ec863007.js
Normal file
File diff suppressed because one or more lines are too long
@ -4,6 +4,11 @@
|
|||||||
http://jedwatson.github.io/classnames
|
http://jedwatson.github.io/classnames
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* tabbable 6.2.0
|
||||||
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||||
|
*/
|
||||||
|
|
||||||
/*! *****************************************************************************
|
/*! *****************************************************************************
|
||||||
Copyright (C) Microsoft. All rights reserved.
|
Copyright (C) Microsoft. All rights reserved.
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
@ -34,8 +39,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|||||||
PERFORMANCE OF THIS SOFTWARE.
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
***************************************************************************** */
|
***************************************************************************** */
|
||||||
|
|
||||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @license React
|
* @license React
|
||||||
* react-dom.production.min.js
|
* react-dom.production.min.js
|
||||||
@ -87,7 +90,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @remix-run/router v1.7.1
|
* @remix-run/router v1.16.0
|
||||||
*
|
*
|
||||||
* Copyright (c) Remix Software Inc.
|
* Copyright (c) Remix Software Inc.
|
||||||
*
|
*
|
||||||
@ -98,7 +101,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React Router DOM v6.14.1
|
* React Router DOM v6.23.0
|
||||||
*
|
*
|
||||||
* Copyright (c) Remix Software Inc.
|
* Copyright (c) Remix Software Inc.
|
||||||
*
|
*
|
||||||
@ -109,7 +112,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React Router v6.14.1
|
* React Router v6.23.0
|
||||||
*
|
*
|
||||||
* Copyright (c) Remix Software Inc.
|
* Copyright (c) Remix Software Inc.
|
||||||
*
|
*
|
||||||
File diff suppressed because one or more lines are too long
2
src/new/web/build/backend/dashboard.e01d5ec9.js
Normal file
2
src/new/web/build/backend/dashboard.e01d5ec9.js
Normal file
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
|||||||
"/apps/build/runtime.9f422cb9.js",
|
"/apps/build/runtime.9f422cb9.js",
|
||||||
"/apps/build/560.268023de.js",
|
"/apps/build/560.268023de.js",
|
||||||
"/apps/build/858.8dae100c.js",
|
"/apps/build/858.8dae100c.js",
|
||||||
"/apps/build/backend/dashboard.125eeddd.js"
|
"/apps/build/backend/dashboard.e01d5ec9.js"
|
||||||
],
|
],
|
||||||
"css": [
|
"css": [
|
||||||
"/apps/build/858.29b73cf7.css",
|
"/apps/build/858.29b73cf7.css",
|
||||||
@ -16,11 +16,11 @@
|
|||||||
"js": [
|
"js": [
|
||||||
"/apps/build/runtime.9f422cb9.js",
|
"/apps/build/runtime.9f422cb9.js",
|
||||||
"/apps/build/560.268023de.js",
|
"/apps/build/560.268023de.js",
|
||||||
"/apps/build/633.13cd1e94.js",
|
"/apps/build/881.ec863007.js",
|
||||||
"/apps/build/plugins/system/psc/invoice.c97f8fd3.js"
|
"/apps/build/plugins/system/psc/invoice.23427dd3.js"
|
||||||
],
|
],
|
||||||
"css": [
|
"css": [
|
||||||
"/apps/build/plugins/system/psc/invoice.45eb341f.css"
|
"/apps/build/plugins/system/psc/invoice.19592370.css"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"/apps/backend/dashboard.css": "/apps/build/backend/dashboard.1bdabc5b.css",
|
"/apps/backend/dashboard.css": "/apps/build/backend/dashboard.1bdabc5b.css",
|
||||||
"/apps/backend/dashboard.js": "/apps/build/backend/dashboard.125eeddd.js",
|
"/apps/backend/dashboard.js": "/apps/build/backend/dashboard.e01d5ec9.js",
|
||||||
"/apps/plugins/system/psc/invoice.css": "/apps/build/plugins/system/psc/invoice.45eb341f.css",
|
"/apps/plugins/system/psc/invoice.css": "/apps/build/plugins/system/psc/invoice.19592370.css",
|
||||||
"/apps/plugins/system/psc/invoice.js": "/apps/build/plugins/system/psc/invoice.c97f8fd3.js",
|
"/apps/plugins/system/psc/invoice.js": "/apps/build/plugins/system/psc/invoice.23427dd3.js",
|
||||||
"/apps/runtime.js": "/apps/build/runtime.9f422cb9.js",
|
"/apps/runtime.js": "/apps/build/runtime.9f422cb9.js",
|
||||||
"/apps/560.268023de.js": "/apps/build/560.268023de.js",
|
"/apps/560.268023de.js": "/apps/build/560.268023de.js",
|
||||||
"/apps/633.13cd1e94.js": "/apps/build/633.13cd1e94.js",
|
"/apps/881.ec863007.js": "/apps/build/881.ec863007.js",
|
||||||
"/apps/858.29b73cf7.css": "/apps/build/858.29b73cf7.css",
|
"/apps/858.29b73cf7.css": "/apps/build/858.29b73cf7.css",
|
||||||
"/apps/858.8dae100c.js": "/apps/build/858.8dae100c.js",
|
"/apps/858.8dae100c.js": "/apps/build/858.8dae100c.js",
|
||||||
"/apps/fonts/summernote.eot": "/apps/build/fonts/summernote.bd0d8be1.eot",
|
"/apps/fonts/summernote.eot": "/apps/build/fonts/summernote.bd0d8be1.eot",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
src/new/web/build/plugins/system/psc/invoice.23427dd3.js
Normal file
1
src/new/web/build/plugins/system/psc/invoice.23427dd3.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -33,7 +33,7 @@ Encore
|
|||||||
config.useBuiltIns = 'usage';
|
config.useBuiltIns = 'usage';
|
||||||
config.corejs = 3;
|
config.corejs = 3;
|
||||||
})
|
})
|
||||||
|
// .enablePostCssLoader()
|
||||||
.enableSassLoader()
|
.enableSassLoader()
|
||||||
.enableStimulusBridge('./assets/controllers.json')
|
.enableStimulusBridge('./assets/controllers.json')
|
||||||
.enableLessLoader()
|
.enableLessLoader()
|
||||||
|
|||||||
@ -2989,6 +2989,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0:
|
|||||||
resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz"
|
resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz"
|
||||||
integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==
|
integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==
|
||||||
|
|
||||||
|
idiomorph@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.npmjs.org/idiomorph/-/idiomorph-0.3.0.tgz"
|
||||||
|
integrity sha512-UhV1Ey5xCxIwR9B+OgIjQa+1Jx99XQ1vQHUsKBU1RpQzCx1u+b+N6SOXgf5mEJDqemUI/ffccu6+71l2mJUsRA==
|
||||||
|
|
||||||
image-size@~0.5.0:
|
image-size@~0.5.0:
|
||||||
version "0.5.5"
|
version "0.5.5"
|
||||||
resolved "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz"
|
resolved "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz"
|
||||||
@ -3472,11 +3477,6 @@ mlly@^1.2.0, mlly@^1.4.2:
|
|||||||
pkg-types "^1.0.3"
|
pkg-types "^1.0.3"
|
||||||
ufo "^1.3.2"
|
ufo "^1.3.2"
|
||||||
|
|
||||||
morphdom@^2.6.1:
|
|
||||||
version "2.7.0"
|
|
||||||
resolved "https://registry.npmjs.org/morphdom/-/morphdom-2.7.0.tgz"
|
|
||||||
integrity sha512-8L8DwbdjjWwM/aNqj7BSoSn4G7SQLNiDcxCnMWbf506jojR6lNQ5YOmQqXEIE8u3C492UlkN4d0hQwz97+M1oQ==
|
|
||||||
|
|
||||||
morris.js@^0.5.0:
|
morris.js@^0.5.0:
|
||||||
version "0.5.0"
|
version "0.5.0"
|
||||||
resolved "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz"
|
resolved "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz"
|
||||||
|
|||||||
33
src/old/+
Normal file
33
src/old/+
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<div class="mb-10">
|
||||||
|
<h2 class="text-center mb-2 font-lenzFont text-4xl tracking-widest text-highlight font-medium m-auto">Printmedien Shop</h2>
|
||||||
|
<p class="m-auto text-lg text-center w-1/3">Erwerben Sie in unserem Printmedien Onlineshop günstige Druckprodukte zu erstklassiger Qualität kostenlos direkt zu Ihnen vor Ihre Haustüre geliefert.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $articlegroups = $this->articlegroup()->getByArray($this->designsettings()->get('mc_start_productgroups')); ?>
|
||||||
|
<?php $first = array_shift($articlegroups); ?>
|
||||||
|
<div class="p-10 flex bg-dark w-2/4 m-auto text-white flex-row">
|
||||||
|
<div class="w-1/2">
|
||||||
|
<a href="<?= $this->url(array('id' => $first->url), 'overview') ?>" class="">
|
||||||
|
<?= $this->image()->thumbnailImage($first->title, 'productgrouplist', $first->image); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="w-1/2 p-5">
|
||||||
|
<h4 class="text-2xl font-lenzFont"><?php echo $first->title ?></h4>
|
||||||
|
<p class="mt-4 mb-8 font-lenzFont"><?php echo $first->getEinleitung() ?></p>
|
||||||
|
<a href="<?= $this->url(array('id' => $first->url), 'overview') ?>" class="uppercase bg-white p-4 text-black rounded-full text-sm font-bold">Zu den Produkten</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w-2/4 m-auto text-white gap-5 columns-2 pt-5">
|
||||||
|
<?php foreach ($articlegroups as $key => $articlegroup): ?>
|
||||||
|
<div class="break-inside-avoid-column mb-5">
|
||||||
|
<div class="bg-highlight p-10">
|
||||||
|
<a href="<?= $this->url(array('id' => $articlegroup->url), 'overview') ?>" class="">
|
||||||
|
<?= $this->image()->thumbnailImage($articlegroup->title, 'productgrouplist', $articlegroup->image); ?>
|
||||||
|
</a>
|
||||||
|
<h4 class="text-2xl font-lenzFont"><?php echo $articlegroup->title ?></h4>
|
||||||
|
<p class="mt-4 mb-8 font-lenzFont"><?php echo $articlegroup->getEinleitung() ?></p>
|
||||||
|
<a href="<?= $this->url(array('id' => $articlegroup->url), 'overview') ?>" class="uppercase text-center bg-white p-4 m-1 block text-black rounded-full text-sm font-bold hover:bg-black hover:text-white">Zu den Produkten</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
@ -6,37 +6,41 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||||||
|
|
||||||
protected Shop $shop;
|
protected Shop $shop;
|
||||||
|
|
||||||
protected function _initAutoload ()
|
protected function _initAutoload()
|
||||||
{
|
{
|
||||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||||
$autoloader->registerNamespace( 'TP_' );
|
$autoloader->registerNamespace('TP_');
|
||||||
$autoloader->registerNamespace( 'XMPPHP_' );
|
$autoloader->registerNamespace('XMPPHP_');
|
||||||
$autoloader->registerNamespace( 'Imind_' );
|
$autoloader->registerNamespace('Imind_');
|
||||||
$autoloader->registerNamespace( 'Apache_' );
|
$autoloader->registerNamespace('Apache_');
|
||||||
$autoloader->registerNamespace( 'ZFDebug' );
|
$autoloader->registerNamespace('ZFDebug');
|
||||||
$autoloader->registerNamespace( 'Pheanstalk' );
|
$autoloader->registerNamespace('Pheanstalk');
|
||||||
$autoloader->registerNamespace( 'Payment_' );
|
$autoloader->registerNamespace('Payment_');
|
||||||
$autoloader->registerNamespace( 'Twig' );
|
$autoloader->registerNamespace('Twig');
|
||||||
$autoloader->registerNamespace( 'Elastica_' );
|
$autoloader->registerNamespace('Elastica_');
|
||||||
$autoloader->registerNamespace( 'EasyBib_' );
|
$autoloader->registerNamespace('EasyBib_');
|
||||||
require_once ('Doctrine.php');
|
include_once 'Doctrine.php';
|
||||||
$autoloader->pushAutoloader( array (
|
$autoloader->pushAutoloader(
|
||||||
|
array (
|
||||||
'Doctrine',
|
'Doctrine',
|
||||||
'autoload'), 'Doctrine' );
|
'autoload'), 'Doctrine'
|
||||||
$autoloaderModule = new Zend_Application_Module_Autoloader( array (
|
);
|
||||||
|
$autoloaderModule = new Zend_Application_Module_Autoloader(
|
||||||
|
array (
|
||||||
'namespace' => 'Admin',
|
'namespace' => 'Admin',
|
||||||
'basePath' => APPLICATION_PATH . '/modules/admin') );
|
'basePath' => APPLICATION_PATH . '/modules/admin')
|
||||||
$autoloader->pushAutoloader( $autoloaderModule );
|
);
|
||||||
|
$autoloader->pushAutoloader($autoloaderModule);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
protected function _initDb ()
|
protected function _initDb()
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$config = new Zend_Config_Ini( APPLICATION_PATH . '/configs/database.ini', APPLICATION_ENV );
|
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/database.ini', APPLICATION_ENV);
|
||||||
/**
|
/**
|
||||||
* @see Zend_Db
|
* @see Zend_Db
|
||||||
*/
|
*/
|
||||||
@ -49,13 +53,12 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||||||
'compression' => false
|
'compression' => false
|
||||||
)
|
)
|
||||||
);*/
|
);*/
|
||||||
$cacheDriver = new Doctrine_Cache_Array( );
|
$cacheDriver = new Doctrine_Cache_Array();
|
||||||
$dsn = 'mysql:dbname=psc;host=mysql';
|
$dsn = 'mysql:dbname=psc;host=mysql';
|
||||||
$user = 'root';
|
$user = 'root';
|
||||||
$password = 'Wichtig1';
|
$password = 'Wichtig1';
|
||||||
|
|
||||||
if ( (isset( $_REQUEST['ARTID'] ) || isset( $_REQUEST['artid'] ) || isset( $_POST['ARTID'] )) && (strpos( $_SERVER['REQUEST_URI'], 'upload' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'template' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'basket' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'article' ) !== FALSE) )
|
if ((isset($_REQUEST['ARTID']) || isset($_REQUEST['artid']) || isset($_POST['ARTID'])) && (strpos($_SERVER['REQUEST_URI'], 'upload') !== false || strpos($_SERVER['REQUEST_URI'], 'template') !== false || strpos($_SERVER['REQUEST_URI'], 'basket') !== false || strpos($_SERVER['REQUEST_URI'], 'article') !== false) ) {
|
||||||
{
|
|
||||||
if(strlen($_REQUEST['ARTID']) > 100) {
|
if(strlen($_REQUEST['ARTID']) > 100) {
|
||||||
$values = TP_Crypt::decrypt($_REQUEST['ARTID']);
|
$values = TP_Crypt::decrypt($_REQUEST['ARTID']);
|
||||||
$_SERVER["SERVER_NAME"] = str_replace(array("http://", "https://"), array("", ""), $values['SERVER']);
|
$_SERVER["SERVER_NAME"] = str_replace(array("http://", "https://"), array("", ""), $values['SERVER']);
|
||||||
@ -66,58 +69,58 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||||||
$dbh = new PDO($dsn, $user, $password);
|
$dbh = new PDO($dsn, $user, $password);
|
||||||
|
|
||||||
$dbh -> exec("set names utf8");
|
$dbh -> exec("set names utf8");
|
||||||
Doctrine_Manager::connection( $dbh )->setAttribute( Doctrine::ATTR_QUERY_CACHE, $cacheDriver )->setAttribute( Doctrine::ATTR_RESULT_CACHE, $cacheDriver )->setAttribute( Doctrine::ATTR_QUERY_CACHE_LIFESPAN, 3600 )->setAttribute( Doctrine::ATTR_RESULT_CACHE_LIFESPAN, 3600 );
|
Doctrine_Manager::connection($dbh)->setAttribute(Doctrine::ATTR_QUERY_CACHE, $cacheDriver)->setAttribute(Doctrine::ATTR_RESULT_CACHE, $cacheDriver)->setAttribute(Doctrine::ATTR_QUERY_CACHE_LIFESPAN, 3600)->setAttribute(Doctrine::ATTR_RESULT_CACHE_LIFESPAN, 3600);
|
||||||
Doctrine_Manager::getInstance()->setCharset( 'utf8' );
|
Doctrine_Manager::getInstance()->setCharset('utf8');
|
||||||
Doctrine_Manager::getInstance()->setCollate( 'utf8_general_ci' );
|
Doctrine_Manager::getInstance()->setCollate('utf8_general_ci');
|
||||||
//Doctrine_Manager::getInstance()->getCurrentConnection()->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8';");
|
//Doctrine_Manager::getInstance()->getCurrentConnection()->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8';");
|
||||||
Doctrine_Manager::getInstance()->registerExtension( 'Taggable' );
|
Doctrine_Manager::getInstance()->registerExtension('Taggable');
|
||||||
Doctrine::loadModels( dirname( __FILE__ ) . '/data/models/generated' );
|
Doctrine::loadModels(dirname(__FILE__) . '/data/models/generated');
|
||||||
Doctrine::loadModels( dirname( __FILE__ ) . '/data/models' );
|
Doctrine::loadModels(dirname(__FILE__) . '/data/models');
|
||||||
/*
|
/*
|
||||||
* Configure Doctrine
|
* Configure Doctrine
|
||||||
*/
|
*/
|
||||||
Zend_Registry::set( 'doctrine_config', array (
|
Zend_Registry::set(
|
||||||
'data_fixtures_path' => dirname( __FILE__ ) . '/doctrine/data/fixtures',
|
'doctrine_config', array (
|
||||||
'models_path' => dirname( __FILE__ ) . '/models',
|
'data_fixtures_path' => dirname(__FILE__) . '/doctrine/data/fixtures',
|
||||||
'migrations_path' => dirname( __FILE__ ) . '/doctrine/migrations',
|
'models_path' => dirname(__FILE__) . '/models',
|
||||||
'sql_path' => dirname( __FILE__ ) . '/doctrine/data/sql',
|
'migrations_path' => dirname(__FILE__) . '/doctrine/migrations',
|
||||||
'yaml_schema_path' => dirname( __FILE__ ) . '/doctrine/schema') );
|
'sql_path' => dirname(__FILE__) . '/doctrine/data/sql',
|
||||||
|
'yaml_schema_path' => dirname(__FILE__) . '/doctrine/schema')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
catch ( Exception $e )
|
catch ( Exception $e )
|
||||||
{
|
{
|
||||||
die( $e->getMessage() );
|
die($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected function _initLog ()
|
protected function _initLog()
|
||||||
{
|
{
|
||||||
$writer = new Zend_Log_Writer_Stream( APPLICATION_PATH . '/../logs/app.log' );
|
$writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../logs/app.log');
|
||||||
//$writer = new Zend_Log_Writer_Null();
|
//$writer = new Zend_Log_Writer_Null();
|
||||||
$logger = new Zend_Log( $writer );
|
$logger = new Zend_Log($writer);
|
||||||
$logger->addPriority( 'TABLE', 8 );
|
$logger->addPriority('TABLE', 8);
|
||||||
Zend_Registry::set( 'log', $logger );
|
Zend_Registry::set('log', $logger);
|
||||||
ini_set( 'error_log', APPLICATION_PATH . '/../logs/php.error.log' );
|
ini_set('error_log', APPLICATION_PATH . '/../logs/php.error.log');
|
||||||
if ( (isset( $_REQUEST['ARTID'] ) || isset( $_REQUEST['artid'] ) || isset( $_POST['ARTID'] )) && (strpos( $_SERVER['REQUEST_URI'], 'upload' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'template' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'basket' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'overview' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'steplayouter' ) !== FALSE || strpos( $_SERVER['REQUEST_URI'], 'article' ) !== FALSE) )
|
if ((isset($_REQUEST['ARTID']) || isset($_REQUEST['artid']) || isset($_POST['ARTID'])) && (strpos($_SERVER['REQUEST_URI'], 'upload') !== false || strpos($_SERVER['REQUEST_URI'], 'template') !== false || strpos($_SERVER['REQUEST_URI'], 'basket') !== false || strpos($_SERVER['REQUEST_URI'], 'overview') !== false || strpos($_SERVER['REQUEST_URI'], 'steplayouter') !== false || strpos($_SERVER['REQUEST_URI'], 'article') !== false) ) {
|
||||||
{
|
|
||||||
if(strlen($_REQUEST['ARTID']) > 100) {
|
if(strlen($_REQUEST['ARTID']) > 100) {
|
||||||
$values = TP_Crypt::decrypt($_REQUEST['ARTID']);
|
$values = TP_Crypt::decrypt($_REQUEST['ARTID']);
|
||||||
Zend_Session::setId( $values['ARTID'] );
|
Zend_Session::setId($values['ARTID']);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if ( isset( $_POST['ARTID'] ) )
|
if (isset($_POST['ARTID']) ) {
|
||||||
{
|
Zend_Registry::get('log')->debug($_POST['ARTID']);
|
||||||
Zend_Registry::get( 'log' )->debug( $_POST['ARTID'] );
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Zend_Session::setId( $_POST['ARTID'] );
|
Zend_Session::setId($_POST['ARTID']);
|
||||||
}
|
}
|
||||||
catch ( Exception $e )
|
catch ( Exception $e )
|
||||||
{
|
{
|
||||||
Zend_Registry::get( 'log' )->debug( $e->getMessage() );
|
Zend_Registry::get('log')->debug($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Zend_Session::setId( $_REQUEST['ARTID'] );
|
Zend_Session::setId($_REQUEST['ARTID']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,134 +131,133 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||||||
Zend_Session::start(array('cookie_domain' => '.'.$hostname[1].'.'.$hostname[2]));
|
Zend_Session::start(array('cookie_domain' => '.'.$hostname[1].'.'.$hostname[2]));
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
protected function _initCli ()
|
protected function _initCli()
|
||||||
{
|
{
|
||||||
if ( strrpos( strtolower( PHP_SAPI ), 'cli' ) !== false && APPLICATION_ENV != 'testing' )
|
if (strrpos(strtolower(PHP_SAPI), 'cli') !== false && APPLICATION_ENV != 'testing' ) {
|
||||||
{
|
$this->bootstrap('frontController');
|
||||||
$this->bootstrap( 'frontController' );
|
$this->frontController->setRouter(new TP_Controller_Router_Cli())->setRequest(new TP_Controller_Request_Cli())->setResponse(new TP_Controller_Response_Cli());
|
||||||
$this->frontController->setRouter( new TP_Controller_Router_Cli( ) )->setRequest( new TP_Controller_Request_Cli( ) )->setResponse( new TP_Controller_Response_Cli( ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected function _initLayout ()
|
protected function _initLayout()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if($_SERVER["SERVER_NAME"] == "" && isset($_SERVER["HTTP_HOST"]) && $_SERVER["HTTP_HOST"] != "") {
|
if($_SERVER["SERVER_NAME"] == "" && isset($_SERVER["HTTP_HOST"]) && $_SERVER["HTTP_HOST"] != "") {
|
||||||
$_SERVER["SERVER_NAME"] = $_SERVER["HTTP_HOST"];
|
$_SERVER["SERVER_NAME"] = $_SERVER["HTTP_HOST"];
|
||||||
}
|
}
|
||||||
$config = new Zend_Config_Ini( APPLICATION_PATH . '/configs/layout.ini', APPLICATION_ENV, true );
|
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/layout.ini', APPLICATION_ENV, true);
|
||||||
$row = Doctrine_Query::create()->from( 'Domain m' )->where( 'm.name = ?', $_SERVER["SERVER_NAME"] )->fetchOne();
|
$row = Doctrine_Query::create()->from('Domain m')->where('m.name = ?', $_SERVER["SERVER_NAME"])->fetchOne();
|
||||||
if ( $row === false )
|
if ($row === false ) {
|
||||||
{
|
$shop = Doctrine_Query::create()->from('Shop s')->fetchOne();
|
||||||
$shop = Doctrine_Query::create()->from( 'Shop s' )->fetchOne();
|
|
||||||
}else{
|
}else{
|
||||||
$shop = $row->Shop;
|
$shop = $row->Shop;
|
||||||
}
|
}
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
if ( $row->redirect != "" && $_SERVER["SERVER_NAME"] != "web") {
|
if ($row->redirect != "" && $_SERVER["SERVER_NAME"] != "web") {
|
||||||
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
header('Location: '.$row->redirect. $path, true, 301);
|
header('Location: '.$row->redirect. $path, true, 301);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($shop->deleted == true) {
|
if($shop->deleted == true) {
|
||||||
die('<html>
|
die(
|
||||||
|
'<html>
|
||||||
<head><title>' . $shop->name . ' ist geschlossen</title></head>
|
<head><title>' . $shop->name . ' ist geschlossen</title></head>
|
||||||
<body>
|
<body>
|
||||||
<center>
|
<center>
|
||||||
<h1 style="font-family:arial">Dieser Shop ist zur Zeit geschlossen</h1>
|
<h1 style="font-family:arial">Dieser Shop ist zur Zeit geschlossen</h1>
|
||||||
</center>
|
</center>
|
||||||
</body>
|
</body>
|
||||||
</html>');
|
</html>'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$config->layoutPath = str_replace( '%SHOPID%', $shop->uid, $config->layoutPath );
|
$config->layoutPath = str_replace('%SHOPID%', $shop->uid, $config->layoutPath);
|
||||||
$config->shopPath = APPLICATION_PATH . '/' . str_replace( '%SHOPID%', $shop->uid, $config->shopPath );
|
$config->shopPath = APPLICATION_PATH . '/' . str_replace('%SHOPID%', $shop->uid, $config->shopPath);
|
||||||
|
|
||||||
$this->shop_id = $shop->uid;
|
$this->shop_id = $shop->uid;
|
||||||
if ( $shop->customtemplates == 1 )
|
if ($shop->customtemplates == 1 ) {
|
||||||
{
|
|
||||||
$config->layoutPath = APPLICATION_PATH . '/design/vorlagen/' . $shop->layout;
|
$config->layoutPath = APPLICATION_PATH . '/design/vorlagen/' . $shop->layout;
|
||||||
}elseif($shop->template_switch && Zend_Auth::getInstance()->hasIdentity()) {
|
}elseif($shop->template_switch && Zend_Auth::getInstance()->hasIdentity()) {
|
||||||
$user = Zend_Auth::getInstance()->getIdentity();
|
$user = Zend_Auth::getInstance()->getIdentity();
|
||||||
$accountPath = $this->getAccountTemplatePath($user['account_id']);
|
$accountPath = $this->getAccountTemplatePath($user['account_id']);
|
||||||
if($accountPath != "") {
|
if($accountPath != "") {
|
||||||
$config->layoutPath = APPLICATION_PATH . '/' . str_replace( '%LAYOUT%', $accountPath, $config->layoutPath );
|
$config->layoutPath = APPLICATION_PATH . '/' . str_replace('%LAYOUT%', $accountPath, $config->layoutPath);
|
||||||
}else{
|
}else{
|
||||||
$config->layoutPath = APPLICATION_PATH . '/' . str_replace( '%LAYOUT%', $shop->layout, $config->layoutPath );
|
$config->layoutPath = APPLICATION_PATH . '/' . str_replace('%LAYOUT%', $shop->layout, $config->layoutPath);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!file_exists(APPLICATION_PATH . str_replace( '%LAYOUT%', "", $config->layoutPath))) mkdir(APPLICATION_PATH . str_replace( '%LAYOUT%', "", $config->layoutPath));
|
if(!file_exists(APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath))) { mkdir(APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath));
|
||||||
|
}
|
||||||
if(strpos('_'.$shop->layout, "/")) {
|
if(strpos('_'.$shop->layout, "/")) {
|
||||||
$config->layoutPath = APPLICATION_PATH . str_replace( '%LAYOUT%', "", $config->layoutPath) . $shop->layout;
|
$config->layoutPath = APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath) . $shop->layout;
|
||||||
}else{
|
}else{
|
||||||
$config->layoutPath = APPLICATION_PATH . '/' . str_replace( '%LAYOUT%', $shop->layout, $config->layoutPath );
|
$config->layoutPath = APPLICATION_PATH . '/' . str_replace('%LAYOUT%', $shop->layout, $config->layoutPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Zend_Registry::set( 'install', $shop->Install->toArray() );
|
Zend_Registry::set('install', $shop->Install->toArray());
|
||||||
Zend_Registry::set( 'shop', $shop->toArray() );
|
Zend_Registry::set('shop', $shop->toArray());
|
||||||
Zend_Registry::set( 'shop_path', $config->shopPath );
|
Zend_Registry::set('shop_path', $config->shopPath);
|
||||||
Zend_Registry::set( 'layout_path', $config->layoutPath );
|
Zend_Registry::set('layout_path', $config->layoutPath);
|
||||||
$config->layoutPath = $config->layoutPath . '/layout';
|
$config->layoutPath = $config->layoutPath . '/layout';
|
||||||
require_once 'Zend/Layout.php';
|
include_once 'Zend/Layout.php';
|
||||||
Zend_Layout::startMvc( $config );
|
Zend_Layout::startMvc($config);
|
||||||
|
|
||||||
if ( isset( $_GET['no_cache'] ) )
|
if (isset($_GET['no_cache']) ) {
|
||||||
{
|
|
||||||
TP_Util::clearCache(TP_Util::CLEAR_ALL);
|
TP_Util::clearCache(TP_Util::CLEAR_ALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( Exception $e )
|
catch ( Exception $e )
|
||||||
{
|
{
|
||||||
var_dump($e->getTraceAsString());
|
var_dump($e->getTraceAsString());
|
||||||
die( var_dump( $e ) );
|
die(var_dump($e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected function _initLanguage ()
|
protected function _initLanguage()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$config = new Zend_Config_Ini( APPLICATION_PATH . '/configs/printshopcreator.ini', APPLICATION_ENV, true );
|
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/printshopcreator.ini', APPLICATION_ENV, true);
|
||||||
Zend_Registry::set( 'marketid', $config->marketid );
|
Zend_Registry::set('marketid', $config->marketid);
|
||||||
if ( isset( $_REQUEST['ticketid'] ) && strpos( $_SERVER['REQUEST_URI'], 'service/upload' ) !== FALSE )
|
if (isset($_REQUEST['ticketid']) && strpos($_SERVER['REQUEST_URI'], 'service/upload') !== false ) {
|
||||||
Zend_Session::setId( $_REQUEST['ticketid'] );
|
Zend_Session::setId($_REQUEST['ticketid']);
|
||||||
if ( isset( $_REQUEST['chunkid'] ) && strpos( $_SERVER['REQUEST_URI'], 'service/upload' ) !== FALSE )
|
}
|
||||||
Zend_Session::setId( $_REQUEST['chunkid'] );
|
if (isset($_REQUEST['chunkid']) && strpos($_SERVER['REQUEST_URI'], 'service/upload') !== false ) {
|
||||||
require_once ('Zend/Locale.php');
|
Zend_Session::setId($_REQUEST['chunkid']);
|
||||||
if ( isset( $_REQUEST['speak'] ) )
|
}
|
||||||
{
|
include_once 'Zend/Locale.php';
|
||||||
$langsess = new Zend_Session_Namespace( 'lang' );
|
if (isset($_REQUEST['speak']) ) {
|
||||||
|
$langsess = new Zend_Session_Namespace('lang');
|
||||||
$langsess->code = $_REQUEST['speak'];
|
$langsess->code = $_REQUEST['speak'];
|
||||||
}
|
}
|
||||||
if ( Zend_Auth::getInstance()->hasIdentity() && ! Zend_Session::namespaceIsset( 'lang' ) )
|
if (Zend_Auth::getInstance()->hasIdentity() && ! Zend_Session::namespaceIsset('lang') ) {
|
||||||
{
|
|
||||||
$user = Zend_Auth::getInstance()->getIdentity();
|
$user = Zend_Auth::getInstance()->getIdentity();
|
||||||
if($user['language']) {
|
if($user['language']) {
|
||||||
$locale = new Zend_Locale( $user['language'] );
|
$locale = new Zend_Locale($user['language']);
|
||||||
}else{
|
}else{
|
||||||
$locale = new Zend_Locale( 'de_DE' );
|
$locale = new Zend_Locale('de_DE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ( Zend_Session::namespaceIsset( 'lang' ) )
|
elseif (Zend_Session::namespaceIsset('lang') ) {
|
||||||
{
|
$lang = new Zend_Session_Namespace('lang');
|
||||||
$lang = new Zend_Session_Namespace( 'lang' );
|
$locale = new Zend_Locale($lang->code);
|
||||||
$locale = new Zend_Locale( $lang->code );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$locale = new Zend_Locale( $this->shop->getDefaultLocale() );
|
$locale = new Zend_Locale($this->shop->getDefaultLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file_exists(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/')) mkdir(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/');
|
if(!file_exists(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/')) { mkdir(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/');
|
||||||
|
}
|
||||||
|
|
||||||
$frontendOptions = array (
|
$frontendOptions = array (
|
||||||
'lifetime' => 14000, // Lebensdauer des Caches 2 Stunden
|
'lifetime' => 14000, // Lebensdauer des Caches 2 Stunden
|
||||||
'automatic_serialization' => true);
|
'automatic_serialization' => true);
|
||||||
$backendOptions = array (
|
$backendOptions = array (
|
||||||
'cache_dir' => APPLICATION_PATH . '/../cache/'.$this->shop_id.'/')// Verzeichnis, in welches die Cache Dateien kommen
|
'cache_dir' => APPLICATION_PATH . '/../cache/'.$this->shop_id.'/')// Verzeichnis, in welches die Cache Dateien kommen
|
||||||
;
|
;
|
||||||
/*$backendOptions = array('host' => 'localhost',
|
/*$backendOptions = array('host' => 'localhost',
|
||||||
'port' => 11211,
|
'port' => 11211,
|
||||||
'persistent' => true,
|
'persistent' => true,
|
||||||
@ -265,76 +267,84 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||||||
'status' => true,
|
'status' => true,
|
||||||
'failure_callback' => '');*/
|
'failure_callback' => '');*/
|
||||||
|
|
||||||
$cache = Zend_Cache::factory( 'Core', 'File', $frontendOptions, array () );
|
$cache = Zend_Cache::factory('Core', 'File', $frontendOptions, array ());
|
||||||
$fcache = Zend_Cache::factory( 'Core', 'File', $frontendOptions, $backendOptions );
|
$fcache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
|
||||||
$locale->setCache( $cache );
|
$locale->setCache($cache);
|
||||||
Zend_Registry::set( 'locale', $locale );
|
Zend_Registry::set('locale', $locale);
|
||||||
Zend_Translate::setCache( $fcache );
|
Zend_Translate::setCache($fcache);
|
||||||
|
|
||||||
$translate = new Zend_Translate( 'TP_Translate_Adapter_Frontend_Db', APPLICATION_PATH . '/locale', $locale, array (
|
$translate = new Zend_Translate(
|
||||||
'scan' => Zend_Translate::LOCALE_DIRECTORY) );
|
'TP_Translate_Adapter_Frontend_Db', APPLICATION_PATH . '/locale', $locale, array (
|
||||||
|
'scan' => Zend_Translate::LOCALE_DIRECTORY)
|
||||||
|
);
|
||||||
|
|
||||||
$translateDb = new Zend_Translate('TP_Translate_Adapter_Db', null ,$locale->getLanguage());
|
$translateDb = new Zend_Translate('TP_Translate_Adapter_Db', null, $locale->getLanguage());
|
||||||
$translateDb->addTranslation('admin_translation', Zend_Registry::get('locale')->getLanguage());
|
$translateDb->addTranslation('admin_translation', Zend_Registry::get('locale')->getLanguage());
|
||||||
|
|
||||||
Zend_Registry::set( 'translate', $translateDb );
|
Zend_Registry::set('translate', $translateDb);
|
||||||
|
|
||||||
Zend_Registry::set( 'Zend_Translate', $translate );
|
Zend_Registry::set('Zend_Translate', $translate);
|
||||||
Zend_Registry::set( 'cache', $cache );
|
Zend_Registry::set('cache', $cache);
|
||||||
Zend_Registry::set( 'filecache', $fcache );
|
Zend_Registry::set('filecache', $fcache);
|
||||||
Zend_Form::setDefaultTranslator( $translate );
|
Zend_Form::setDefaultTranslator($translate);
|
||||||
}
|
}
|
||||||
catch ( Exception $e )
|
catch ( Exception $e )
|
||||||
{
|
{
|
||||||
die( $e->getMessage() );
|
die($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected function _initArticleQueues ()
|
protected function _initArticleQueues()
|
||||||
{
|
{
|
||||||
$articles = array ();
|
$articles = array ();
|
||||||
foreach ( new DirectoryIterator( APPLICATION_PATH . '/articles' ) as $file )
|
foreach ( new DirectoryIterator(APPLICATION_PATH . '/articles') as $file )
|
||||||
{
|
{
|
||||||
if ( $file == '.' || $file == '..' || $file == '.svn' || $file == '.DS_Store' )
|
if ($file == '.' || $file == '..' || $file == '.svn' || $file == '.DS_Store' ) {
|
||||||
continue;
|
continue;
|
||||||
require_once (APPLICATION_PATH . '/articles/' . $file->getFilename() . '/Article.php');
|
}
|
||||||
eval( '$article = new ' . $file->getFilename() . '_Article();' );
|
include_once APPLICATION_PATH . '/articles/' . $file->getFilename() . '/Article.php';
|
||||||
|
eval('$article = new ' . $file->getFilename() . '_Article();');
|
||||||
$articles[$article->id] = $file->getFilename() . '_Article';
|
$articles[$article->id] = $file->getFilename() . '_Article';
|
||||||
}
|
}
|
||||||
Zend_Registry::set( 'articles', $articles );
|
Zend_Registry::set('articles', $articles);
|
||||||
$queues = array ();
|
$queues = array ();
|
||||||
foreach ( new DirectoryIterator( APPLICATION_PATH . '/queues' ) as $file )
|
foreach ( new DirectoryIterator(APPLICATION_PATH . '/queues') as $file )
|
||||||
{
|
{
|
||||||
if ( $file == '.' || $file == '..' || $file == '.svn' || $file == '.DS_Store' )
|
if ($file == '.' || $file == '..' || $file == '.svn' || $file == '.DS_Store' ) {
|
||||||
continue;
|
continue;
|
||||||
require_once (APPLICATION_PATH . '/queues/' . $file->getFilename() . '/Queues.php');
|
}
|
||||||
eval( '$queue = new ' . $file->getFilename() . '_Queues();' );
|
include_once APPLICATION_PATH . '/queues/' . $file->getFilename() . '/Queues.php';
|
||||||
|
eval('$queue = new ' . $file->getFilename() . '_Queues();');
|
||||||
$queues[$queue->id] = $file->getFilename() . '_Queues';
|
$queues[$queue->id] = $file->getFilename() . '_Queues';
|
||||||
}
|
}
|
||||||
Zend_Registry::set( 'queues', $queues );
|
Zend_Registry::set('queues', $queues);
|
||||||
|
|
||||||
}
|
}
|
||||||
protected function _initPlugins ()
|
protected function _initPlugins()
|
||||||
{
|
{
|
||||||
$this->bootstrap( 'FrontController' );
|
$this->bootstrap('FrontController');
|
||||||
$front = $this->getResource( 'FrontController' );
|
$front = $this->getResource('FrontController');
|
||||||
$auth = Zend_Auth::getInstance();
|
$auth = Zend_Auth::getInstance();
|
||||||
$cache = Zend_Registry::get( 'cache' );
|
$cache = Zend_Registry::get('cache');
|
||||||
if ( ! ($acl = $cache->load( 'acl' )) )
|
if (! ($acl = $cache->load('acl')) ) {
|
||||||
{
|
$acl = new TP_Plugin_Acl($auth);
|
||||||
$acl = new TP_Plugin_Acl( $auth );
|
$cache->save($acl);
|
||||||
$cache->save( $acl );
|
|
||||||
}
|
}
|
||||||
$acl = new TP_Plugin_Acl( $auth );
|
$acl = new TP_Plugin_Acl($auth);
|
||||||
$cache->save( $acl );
|
$cache->save($acl);
|
||||||
$front->registerPlugin( new Zend_Controller_Plugin_ErrorHandler( array (
|
$front->registerPlugin(
|
||||||
|
new Zend_Controller_Plugin_ErrorHandler(
|
||||||
|
array (
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'error',
|
'controller' => 'error',
|
||||||
'action' => 'error') ) );
|
'action' => 'error')
|
||||||
$front->registerPlugin( new TP_Plugin_Auth( $auth, $acl ) );
|
)
|
||||||
|
);
|
||||||
|
$front->registerPlugin(new TP_Plugin_Auth($auth, $acl));
|
||||||
$front = Zend_Controller_Front::getInstance();
|
$front = Zend_Controller_Front::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getAccountTemplatePath($account_id) {
|
protected function getAccountTemplatePath($account_id)
|
||||||
|
{
|
||||||
$account = Doctrine_Query::create()->from('Account c')->where('c.id = ?', array($account_id))->fetchOne();
|
$account = Doctrine_Query::create()->from('Account c')->where('c.id = ?', array($account_id))->fetchOne();
|
||||||
if($account['template_switch'] != "") {
|
if($account['template_switch'] != "") {
|
||||||
return $account['template_switch'];
|
return $account['template_switch'];
|
||||||
@ -345,10 +355,10 @@ $acl = new TP_Plugin_Acl( $auth );
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _initCustomRouter ()
|
protected function _initCustomRouter()
|
||||||
{
|
{
|
||||||
$this->bootstrap('router');
|
$this->bootstrap('router');
|
||||||
$router = $this->getResource( 'router' );
|
$router = $this->getResource('router');
|
||||||
|
|
||||||
$shop = Zend_Registry::get('shop');
|
$shop = Zend_Registry::get('shop');
|
||||||
|
|
||||||
@ -360,12 +370,14 @@ $acl = new TP_Plugin_Acl( $auth );
|
|||||||
if($obj->controller == 2) {
|
if($obj->controller == 2) {
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->url,
|
$obj->url,
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'cms',
|
'controller' => 'cms',
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
],
|
],
|
||||||
$obj->parameter->getArrayCopy())
|
$obj->parameter->getArrayCopy()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}
|
}
|
||||||
@ -373,12 +385,14 @@ $acl = new TP_Plugin_Acl( $auth );
|
|||||||
if($obj->controller == 1) {
|
if($obj->controller == 1) {
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->url,
|
$obj->url,
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'article',
|
'controller' => 'article',
|
||||||
'action' => 'show',
|
'action' => 'show',
|
||||||
],
|
],
|
||||||
$obj->parameter->getArrayCopy())
|
$obj->parameter->getArrayCopy()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}
|
}
|
||||||
@ -386,12 +400,14 @@ $acl = new TP_Plugin_Acl( $auth );
|
|||||||
if($obj->controller == 3) {
|
if($obj->controller == 3) {
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->url,
|
$obj->url,
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'overview',
|
'controller' => 'overview',
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
],
|
],
|
||||||
$obj->parameter->getArrayCopy())
|
$obj->parameter->getArrayCopy()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}
|
}
|
||||||
@ -403,73 +419,87 @@ $acl = new TP_Plugin_Acl( $auth );
|
|||||||
|
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->parameter->getArrayCopy()['target'],
|
$obj->parameter->getArrayCopy()['target'],
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'basket',
|
'controller' => 'basket',
|
||||||
'action' => $basketUrl[2]?$basketUrl[2]:'index',
|
'action' => $basketUrl[2]?$basketUrl[2]:'index',
|
||||||
])
|
]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}elseif(strpos($obj->url, 'user') !== false) {
|
}elseif(strpos($obj->url, 'user') !== false) {
|
||||||
$basketUrl = explode("/", $obj->url);
|
$basketUrl = explode("/", $obj->url);
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->parameter->getArrayCopy()['target'],
|
$obj->parameter->getArrayCopy()['target'],
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'user',
|
'controller' => 'user',
|
||||||
'action' => $basketUrl[2]?$basketUrl[2]:'index',
|
'action' => $basketUrl[2]?$basketUrl[2]:'index',
|
||||||
])
|
]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->url,
|
$obj->url,
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'index',
|
'controller' => 'index',
|
||||||
'action' => 'redirect',
|
'action' => 'redirect',
|
||||||
],
|
],
|
||||||
$obj->parameter->getArrayCopy())
|
$obj->parameter->getArrayCopy()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id.'_route', $route);
|
$router->addRoute((string)$obj->_id.'_route', $route);
|
||||||
}elseif(strpos($obj->url, 'impress') !== false) {
|
}elseif(strpos($obj->url, 'impress') !== false) {
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->parameter->getArrayCopy()['target'],
|
$obj->parameter->getArrayCopy()['target'],
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'index',
|
'controller' => 'index',
|
||||||
'action' => 'impress'
|
'action' => 'impress'
|
||||||
])
|
]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}elseif(strpos($obj->url, 'privacy') !== false) {
|
}elseif(strpos($obj->url, 'privacy') !== false) {
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->parameter->getArrayCopy()['target'],
|
$obj->parameter->getArrayCopy()['target'],
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'index',
|
'controller' => 'index',
|
||||||
'action' => 'privacy',
|
'action' => 'privacy',
|
||||||
])
|
]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}elseif(strpos($obj->url, 'agb') !== false) {
|
}elseif(strpos($obj->url, 'agb') !== false) {
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->parameter->getArrayCopy()['target'],
|
$obj->parameter->getArrayCopy()['target'],
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'index',
|
'controller' => 'index',
|
||||||
'action' => 'agb',
|
'action' => 'agb',
|
||||||
])
|
]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}else{
|
}else{
|
||||||
$route = new Zend_Controller_Router_Route(
|
$route = new Zend_Controller_Router_Route(
|
||||||
$obj->url,
|
$obj->url,
|
||||||
array_merge([
|
array_merge(
|
||||||
|
[
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'index',
|
'controller' => 'index',
|
||||||
'action' => 'redirect',
|
'action' => 'redirect',
|
||||||
],
|
],
|
||||||
$obj->parameter->getArrayCopy())
|
$obj->parameter->getArrayCopy()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute((string)$obj->_id, $route);
|
$router->addRoute((string)$obj->_id, $route);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
<div class="md:flex mt-10 md:w-2/4 m-auto">
|
||||||
|
<div class="w-1/2">
|
||||||
|
</div>
|
||||||
|
<div class="w-1/2">
|
||||||
|
<h2><?php echo $this->article->title ?></h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$basketArticle = $this->article['article'];
|
||||||
|
$articleObj = new market_article();
|
||||||
|
$filesOptions =$this->article['basketarticle']->getFiles();
|
||||||
|
?>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<?php if(($basketArticle['a6_org_article'] == 0 || $basketArticle['a6_org_article'] == "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php elseif(($basketArticle['a6_org_article'] != 0 && $basketArticle['file'] != "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= $articleObj->generatePreview($basketArticle['id'],$this->article['basketarticle']->getLayouterId()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5"><span class="mobilelabel"><strong>Anzahl:</strong> </span>
|
||||||
|
<?php if(isset($count)): ?>
|
||||||
|
<strong><?php echo $count ?></strong>
|
||||||
|
<?php else: ?>
|
||||||
|
<strong>Anzahl: <?php echo $this->article['basketarticle']->getAuflage() ?></strong><br /><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if(($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<strong><?php echo $basketArticle['title'] ?></strong><br />
|
||||||
|
<?php else: ?>
|
||||||
|
<strong><?php echo $this->layouter()->getTitle($this->article['basketarticle']->getLayouterId()); ?></strong><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(($this->article['options'])): ?>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ($this->article['options'] as $key => $option): ?>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(stripos($option, 'Auflage') === 0) {
|
||||||
|
$count = str_replace('Auflage: ', '', $option);
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<li><?php echo $option ?></li>
|
||||||
|
<?php } ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<?php foreach ($filesOptions as $key => $option): ?>
|
||||||
|
|
||||||
|
<li><b><a href="/uploads/<?php echo $this->shop->uid ?>/article/<?php echo $option['value'] ?>" target="_blank"><?php echo $option['name'] ?></a></b></li>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php if($this->shop->basketposfield1 != ""): ?><?php echo $this->shop->basketposfield1 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="ref_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getRef(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->shop->basketposfield2 != ""): ?><?php echo $this->shop->basketposfield2 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="kst_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getKst(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
Gewicht: <?php echo $this->article['basketarticle']->getWeight() ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4" style="text-align: right;">
|
||||||
|
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->article['basketarticle']->getNetto()*$this->article['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;width: 45px;">(Netto)</label><br /><strong><?php echo $this->currency->toCurrency($this->article['basketarticle']->getBrutto()*$this->article['basketarticle']->getCount()) ?></strong> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$basketArticle["mwert"].'% MwSt.)')?></label></label><?php } ?>
|
||||||
|
<br/><a href="<?php echo $this->url(array('del' => $this->article['uuid']), 'basketdel') ?>"><?php echo $this->translate('Löschen'); ?></a>
|
||||||
|
<br/><a href="<?php echo $this->url(array('key' => $this->article['uuid']), 'articleload') ?>"><?php echo $this->translate('Bearbeiten') ?></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
1734
src/old/application/design/vorlagen/tailwindcss/articletemplates/scripts/101.phtml
Executable file
1734
src/old/application/design/vorlagen/tailwindcss/articletemplates/scripts/101.phtml
Executable file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,76 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$basketArticle = $this->article['article'];
|
||||||
|
$articleObj = new market_article();
|
||||||
|
$filesOptions =$this->article['basketarticle']->getFiles();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<?php if(($basketArticle['a6_org_article'] == 0 || $basketArticle['a6_org_article'] == "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php elseif(($basketArticle['a6_org_article'] != 0 && $basketArticle['file'] != "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= $articleObj->generatePreview($basketArticle['id'],$this->article['basketarticle']->getLayouterId()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5"><span class="mobilelabel"><strong>Anzahl:</strong> </span>
|
||||||
|
<?php if(isset($count)): ?>
|
||||||
|
<strong><?php echo $count ?></strong>
|
||||||
|
<?php else: ?>
|
||||||
|
<strong>Anzahl: <?php echo $this->article['basketarticle']->getAuflage() ?></strong><br /><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if(($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<strong><?php echo $basketArticle['title'] ?></strong><br />
|
||||||
|
<?php else: ?>
|
||||||
|
<strong><?php echo $this->layouter()->getTitle($this->article['basketarticle']->getLayouterId()); ?></strong><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(($this->article['options'])): ?>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ($this->article['options'] as $key => $option): ?>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(stripos($option, 'Auflage') === 0) {
|
||||||
|
$count = str_replace('Auflage: ', '', $option);
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<li><?php echo $option ?></li>
|
||||||
|
<?php } ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<?php foreach ($filesOptions as $key => $option): ?>
|
||||||
|
|
||||||
|
<li><b><a href="/uploads/<?php echo $this->shop->uid ?>/article/<?php echo $option['value'] ?>" target="_blank"><?php echo $option['name'] ?></a></b></li>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php if($this->shop->basketposfield1 != ""): ?><?php echo $this->shop->basketposfield1 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="ref_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getRef(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->shop->basketposfield2 != ""): ?><?php echo $this->shop->basketposfield2 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="kst_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getKst(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
Gewicht: <?php echo $this->article['basketarticle']->getWeight() ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4" style="text-align: right;">
|
||||||
|
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->article['basketarticle']->getNetto()*$this->article['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;width: 45px;">(Netto)</label><br /><strong><?php echo $this->currency->toCurrency($this->article['basketarticle']->getBrutto()*$this->article['basketarticle']->getCount()) ?></strong> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$basketArticle["mwert"].'% MwSt.)')?></label></label><?php } ?>
|
||||||
|
<br/><a href="<?php echo $this->url(array('del' => $this->article['uuid']), 'basketdel') ?>"><?php echo $this->translate('Löschen'); ?></a>
|
||||||
|
<br/><a href="<?php echo $this->url(array('key' => $this->article['uuid']), 'articleload') ?>"><?php echo $this->translate('Bearbeiten') ?></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
1776
src/old/application/design/vorlagen/tailwindcss/articletemplates/scripts/106.phtml
Executable file
1776
src/old/application/design/vorlagen/tailwindcss/articletemplates/scripts/106.phtml
Executable file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$basketArticle = $this->article['article'];
|
||||||
|
$articleObj = new market_article();
|
||||||
|
$filesOptions =$this->article['basketarticle']->getFiles();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<?php if(($basketArticle['a6_org_article'] == 0 || $basketArticle['a6_org_article'] == "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php elseif(($basketArticle['a6_org_article'] != 0 && $basketArticle['file'] != "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= $articleObj->generatePreview($basketArticle['id'],$this->article['basketarticle']->getLayouterId()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5"><span class="mobilelabel"><strong>Anzahl:</strong> </span>
|
||||||
|
<?php if(isset($count)): ?>
|
||||||
|
<strong><?php echo $count ?></strong>
|
||||||
|
<?php else: ?>
|
||||||
|
<strong>Anzahl: <?php echo $this->article['basketarticle']->getAuflage() ?></strong><br /><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if(($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<strong><?php echo $basketArticle['title'] ?></strong><br />
|
||||||
|
<?php else: ?>
|
||||||
|
<strong><?php echo $this->layouter()->getTitle($this->article['basketarticle']->getLayouterId()); ?></strong><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(($this->article['options'])): ?>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ($this->article['options'] as $key => $option): ?>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(stripos($option, 'Auflage') === 0) {
|
||||||
|
$count = str_replace('Auflage: ', '', $option);
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<li><?php echo $option ?></li>
|
||||||
|
<?php } ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<?php foreach ($filesOptions as $key => $option): ?>
|
||||||
|
|
||||||
|
<li><b><a href="/uploads/<?php echo $this->shop->uid ?>/article/<?php echo $option['value'] ?>" target="_blank"><?php echo $option['name'] ?></a></b></li>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->shop->basketposfield1 != ""): ?><?php echo $this->shop->basketposfield1 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="ref_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getRef(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->shop->basketposfield2 != ""): ?><?php echo $this->shop->basketposfield2 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="kst_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getKst(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
Gewicht: <?php echo $this->article['basketarticle']->getWeight() ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4" style="text-align: right;">
|
||||||
|
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->article['basketarticle']->getNetto()*$this->article['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;width: 45px;">(Netto)</label><br /><strong><?php echo $this->currency->toCurrency($this->article['basketarticle']->getBrutto()*$this->article['basketarticle']->getCount()) ?></strong> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$basketArticle["mwert"].'% MwSt.)')?></label></label><?php } ?>
|
||||||
|
<br/><a href="<?php echo $this->url(array('del' => $this->article['uuid']), 'basketdel') ?>"><?php echo $this->translate('Löschen'); ?></a>
|
||||||
|
<br/><a href="<?php echo $this->url(array('key' => $this->article['uuid']), 'articleload') ?>"><?php echo $this->translate('Bearbeiten') ?></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
File diff suppressed because one or more lines are too long
249
src/old/application/design/vorlagen/tailwindcss/articletemplates/scripts/2.phtml
Executable file
249
src/old/application/design/vorlagen/tailwindcss/articletemplates/scripts/2.phtml
Executable file
@ -0,0 +1,249 @@
|
|||||||
|
<script>
|
||||||
|
function loadFile(link, file, title) {
|
||||||
|
if(file == "pic") {
|
||||||
|
$('.thumbnail').html('<a href="' + link + '" data-lightbox="article_detail"><img id="layouter" src="' + link +'" class="articlelistimg " alt="' + title + '" title="' + title + '"></a>');
|
||||||
|
} else if(file == "youtube") {
|
||||||
|
$('.thumbnail').html('<iframe style="width:100%;" src="' + link + '" frameborder="0" allowfullscreen=""></iframe>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="row articletemplates-2">
|
||||||
|
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<a class="btn-large pull-right" href="<?php echo $this->backurl ?>"><?php echo $this->translate('Zurück') ?></a>
|
||||||
|
<h1><?php echo $this->article->title ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
|
||||||
|
<li class="active" role="presentation" ><a href="#details" data-toggle="tab"><?php echo $this->translate('Produkt') ?></a></li>
|
||||||
|
<?php if(!$this->designsettings()->get('einbetten')): ?><li><a href="#einbetten" data-toggle="tab"><?php echo $this->translate('Einbetten')?></a></li><?php endif; ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tab-content">
|
||||||
|
<div class="tab-pane active" id="details">
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
<div class="thumbnail">
|
||||||
|
|
||||||
|
<?php echo $this->image()->thumbnailImage($this->article->title, 'layouter', $this->article->file); ?>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if ($this->admin && $this->role->level >= 40): ?>
|
||||||
|
|
||||||
|
<a class="btn btn-inverse btn-large pop_over" data-trigger="hover" data-placement="bottom" data-content="Bearbeiten Sie die Eigenschaften des Produkts." data-original-title="Eigenschaften" onclick="javascript:window.open('/admin/article/edit?sid=<?= $this->article->shop_id ?>&uid=<?= $this->article->id ?>&type=<?= $this->article->typ ?>', 'contactWindow', 'width=800,height=600,top=10,left=10,directories=no,toolbar=no,location=no,menubar=no,scrollbars=no,status=no,resizable=yes,dependent=no');return false;" href="/myshop/editarticle/<?= $this->article->uuid ?>">
|
||||||
|
<span class="glyphicon glyphicon-folder-open"></span> <?php echo $this->translate('Eigenschaften bearbeiten')?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/******************************************************************************************************************************************************************************
|
||||||
|
* Beginn SPalte 2
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
<form method="post" action="">
|
||||||
|
<dl> <?php echo $this->form->auflage ?></dl> <?php echo $this->form->ajax_calc_id ?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Produktkonfiguration und Summe:
|
||||||
|
* Verschachtelte Anzeige: daher: neue Row
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8" style="padding:0 2em">
|
||||||
|
<?php if ($this->article->lager_file_preview != ""): ?>
|
||||||
|
|
||||||
|
<a href="<?= $this->image()->thumbnailImage('test', 'test', $this->article->lager_file_preview, true, true) ?>"><?php $this->translate('Vorschau') ?></a>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
<?= $this->article->info ?>
|
||||||
|
|
||||||
|
|
||||||
|
<p><br/></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4" style="padding-right: 0px;padding-left: 0px;">
|
||||||
|
<div class="well wellMobile2 andMobile" style="padding: 10px;">
|
||||||
|
<?php if(!$this->article->display_no_price): ?>
|
||||||
|
<?php if($this->article->stock): ?>
|
||||||
|
<label class="basketstocklabel"><?php echo $this->translate('Aktueller Bestand')?>: <?php echo $this->article->stock_count ?> <?php echo $this->translate('Stk.')?></label><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if(!$this->article->display_no_price AND !$this->designsettings()->get('display_no_price')): ?>
|
||||||
|
<h3><?php echo $this->translate('Summe')?></h3>
|
||||||
|
<br/>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->weight > 0): ?>
|
||||||
|
<p id="weight_display" class="text-info"><?php echo $this->translate('Gewicht')?>: <span><?php echo $this->weight ?></span>g</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="wellforMobilePrice">
|
||||||
|
<?php if(!$this->article->display_no_price AND !$this->designsettings()->get('display_no_price')): ?>
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $this->translate('Preis (netto)')?>:</td>
|
||||||
|
<td class="pull-right"><span
|
||||||
|
id="price_netto"><?= $this->currency->toCurrency($this->netto) ?></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= $this->translate('zzgl. ') ?> <?php echo $this->article->mwert; ?>% <?= $this->translate('MwSt.') ?></td>
|
||||||
|
<td class="pull-right"><span
|
||||||
|
id="price_steuer"><?= $this->currency->toCurrency(($this->brutto - $this->netto) * 1) ?></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong><?php echo $this->translate('Preis (brutto)')?>:</strong></td>
|
||||||
|
<td class="pull-right"><strong><span
|
||||||
|
id="price_brutto"><?= $this->currency->toCurrency($this->brutto) ?></span></strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="wellforMobileBTN">
|
||||||
|
<form action="/article/buy/?id=<?= $this->article->id ?>" target="_self" role="form" class="form-horizontal buy" id="buyform" method="POST" style="padding:8px">
|
||||||
|
<div class="form-group form-group-sm">
|
||||||
|
<label class="col-sm-3 control-label" for="count"><?php echo $this->translate('Anzahl')?>: </label>
|
||||||
|
<div class="col-sm-5 col-sm-offset-4">
|
||||||
|
<input type="text" value="1" class="form-control" name="count">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<?= $this->formHidden('load', $this->load) ?>
|
||||||
|
<input type="submit" class="btn btn-success btn-large orderbtn"
|
||||||
|
value="<?= $this->translate('Buy') ?>">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if(!$this->designsettings()->get('einbetten')): ?>
|
||||||
|
<div class="tab-pane" id="einbetten">
|
||||||
|
<h2><?php echo $this->translate('Einbetten') ?></h2>
|
||||||
|
<p><?php echo $this->translate('Teilen Sie dieses Produkt mit Anderen, bewerben Sie es im eigenen BLOG oder Ihrer Website') ?></p>
|
||||||
|
<div class="htmlSnippet">
|
||||||
|
<textarea onclick="this.focus(); this.select();" style="width:99%; height: 180px;">
|
||||||
|
<?php echo $this->escape($this->htmlsnippet) ?>
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<!-- vorschau-bilder -->
|
||||||
|
<?php if($this->article->file1 != "" || $this->article->file2 != "" || $this->article->file3 != "" || $this->article->file4 != "" || $this->article->file5 != ""): ?>
|
||||||
|
|
||||||
|
<div class="vorschau-bilder-klein clearfix">
|
||||||
|
|
||||||
|
<?php if($this->article->file != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file1 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file1, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file1, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file2 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file2, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file2, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file3 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file3, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file3, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file4 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file4, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file4, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file5 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file5, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file5, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file6 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file6, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file6, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->file7 != ""): ?>
|
||||||
|
<label onclick="loadFile('<?php echo $this->image()->thumbnailImage($this->article->title, 'articlesinglegreater', $this->article->file7, true); ?>', 'pic', '<?php echo $this->article->title ?>')">
|
||||||
|
<img src="<?php echo $this->image()->thumbnailImage($this->article->title, 'little', $this->article->file7, true); ?>" class="img-fluid">
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ( $this->article->getYoutubeId() != '') : ?>
|
||||||
|
<label onclick="loadFile('//www.youtube.com/embed/<?php echo $this->article->getYoutubeId(); ?>', 'youtube')">
|
||||||
|
<img style="background:url(<?php echo'https://img.youtube.com/vi/'.$this->article->getYoutubeId().'/1.jpg'; ?>)" src="/<?php echo $this->designPath ?>bootstrap/img/miniplay.png"alt="" />
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="col-md-4" style="padding-left: 0px;padding-right: 0px;">
|
||||||
|
<?php if($this->article->text_art != ""):?><?php echo $this->article->text_art ?><br/><?php endif; ?>
|
||||||
|
<?php if($this->article->text_format != ""):?><?php echo $this->article->text_format ?><br/><?php endif; ?>
|
||||||
|
<?php if($this->article->kostenstelle): ?>
|
||||||
|
<?= $this->translate('Kostenstelle') ?>: <?php echo $this->article->kostenstelle; ?><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->article_nr_extern): ?>
|
||||||
|
<?= $this->translate('Artikelnummer') ?>: <?php echo $this->article->article_nr_extern; ?><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->weight > 0): ?>
|
||||||
|
<p id="weight_display" class="text-info"><?= $this->translate('Gewicht') ?>: <span><?php echo $this->weight ?></span>g</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->article->article_nr_extern or $this->article->stock or $this->weight > 0): ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<p>
|
||||||
|
<br/><?php if($this->shop->install_id == 7):?><a target="_blank" href="/cms/zahlung-versand#lieferzeiten"><?php echo $this->translate('Die Lieferzeiten in der Übersicht')?></a><?php endif; ?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5" style="padding-left: 0px;padding-right: 0px;">
|
||||||
|
<?php /*var_dump($this->article->getAblaufDatum(),"d.m.Y"); if($this->article->getAblaufDatum()) { echo "Ablaufdatum: " . date_format($this->article->getAblaufDatum(),"d.m.Y") . "<br />"; }*/
|
||||||
|
if($this->article->getZusatzDesigner() != "") { echo $this->article->getZusatzDesigner() . "<br />"; }
|
||||||
|
if($this->article->getZusatzAbmessung() != "") { echo $this->article->getZusatzAbmessung() . "<br />"; }
|
||||||
|
if($this->article->getZusatzShipping() != "") { echo $this->article->getZusatzShipping() . "<br />"; }
|
||||||
|
if($this->article->getAnsprechPartner() != "") { echo $this->article->getAnsprechPartner() . "<br />"; }
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div style="margin-bottom:50px;"><?php echo $this->article->getText() ?></div>
|
||||||
|
</div> <!-- // row articletemplates-2 -->
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$basketArticle = $this->article['article'];
|
||||||
|
|
||||||
|
$filesOptions =$this->article['basketarticle']->getFiles();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="col-sm-3"><?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?></div>
|
||||||
|
<div class="col-sm-5"><?php echo $this->translate('Anzahl')?>: <?php echo$this->article['basketarticle']->getAuflage() ?><br /><br /><b><?php echo $basketArticle['title'] ?></b>
|
||||||
|
<br />
|
||||||
|
<?php if(is_array($this->article['options'])): ?>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<?php foreach ($this->article['options'] as $key => $option): ?>
|
||||||
|
|
||||||
|
<li><?php echo $option ?></li>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<?php foreach ($filesOptions as $key => $option): ?>
|
||||||
|
|
||||||
|
<li><b><a href="/uploads/<?php echo $this->shop->uid ?>/article/<?php echo $option['value'] ?>" target="_blank"><?php echo $option['name'] ?></a></b></li>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-4" style="text-align: right;"> <?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->article['basketarticle']->getNetto()*$this->article['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;width: 45px;"><?php echo $this->translate('(Netto)')?></label><br /><strong><?php echo $this->currency->toCurrency($this->article['basketarticle']->getBrutto()*$this->article['basketarticle']->getCount()) ?></strong> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$basketArticle["mwert"].'% MwSt.)')?></label></label><?php } ?><br />
|
||||||
|
|
||||||
|
<a href="<?php echo $this->url(array('del' => $this->article['uuid']), 'basketdel') ?>"><?php echo $this->translate('Löschen'); ?></a></p></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
<?php $this->headScript()->prependFile('/' . $this->designPath . '/js/calc.js'); ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
productUUId = '<?php echo $this->article->uuid ?>';
|
||||||
|
productLoaded = <?php echo ($this->load) ? 1 : 0 ?>;
|
||||||
|
productReBuy = <?php echo ($this->rebuy) ? 1 : 0 ?>;
|
||||||
|
productValues = {};
|
||||||
|
productLanguage = '<?php echo $this->currency->getShortName() ?>';
|
||||||
|
productXml = '';
|
||||||
|
productUrl = '<?php echo $this->article->url ?>';
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ($this->load || $this->rebuy) {
|
||||||
|
foreach (TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getOptions() as $key => $var) {
|
||||||
|
echo "productValues['" . $key . "'] = '" . $var . "';";
|
||||||
|
}
|
||||||
|
echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");';
|
||||||
|
}
|
||||||
|
if($this->layouterSession) {
|
||||||
|
echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
window.onload = function() {
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ($this->load || $this->rebuy) {
|
||||||
|
echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");';
|
||||||
|
}
|
||||||
|
if($this->layouterSession) {
|
||||||
|
echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
$('#in_basket').removeClass('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<div class="md:flex mt-10 md:w-2/4 m-auto gap-10">
|
||||||
|
<div class="md:w-1/2">
|
||||||
|
<?php if ($this->article->file != "" && $this->layouterPreviewId == "") : ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($this->article->title, 'productdetail', $this->article->file); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="md:w-1/2">
|
||||||
|
<h2 class="text-highlight text-2xl font-lenzFont"><?php echo $this->article->title ?></h2>
|
||||||
|
<p><?php echo $this->article->einleitung ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="border border-slate-200 mt-10 md:w-2/4 m-auto">
|
||||||
|
<div class="bg-slate-50 divide-x flex w-full" id="default-tab" data-tabs-active-classes="border-b-2 border-slate-200 bg-slate-100" data-tabs-toggle="#product-content" role="tablist">
|
||||||
|
<div class="w-1/2 p-1 cursor-pointer" data-tabs-target="#div-calc" type="button" role="tab" aria-controls="div-calc" aria-selected="false">Kalkulation</div>
|
||||||
|
<div class="w-1/2 p-1 cursor-pointer" data-tabs-target="#div-details" type="button" role="tab" aria-controls="div-details" aria-selected="false">Beschreibung</div>
|
||||||
|
</div>
|
||||||
|
<div id="product-content">
|
||||||
|
<div id="div-calc" role="tabpanel" aria-labelledby="div-calc-tab">
|
||||||
|
<form id="CALCFORM" class="m-2"></form>
|
||||||
|
</div>
|
||||||
|
<div id="div-details" role="tabpanel" aria-labelledby="div-details-tab">
|
||||||
|
<div class="m-2"><?php echo $this->article->info ?></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
$basketArticle = $this->article['article'];
|
||||||
|
$articleObj = new market_article();
|
||||||
|
$filesOptions =$this->article['basketarticle']->getFiles();
|
||||||
|
?>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<?php if(($basketArticle['a6_org_article'] == 0 || $basketArticle['a6_org_article'] == "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php elseif(($basketArticle['a6_org_article'] != 0 && $basketArticle['file'] != "") && ($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<?php echo $this->image()->thumbnailImage($basketArticle['title'], 'articlelist', $basketArticle['file']); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
|
||||||
|
<?= $articleObj->generatePreview($basketArticle['id'],$this->article['basketarticle']->getLayouterId()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4"><span class="mobilelabel"><strong>Anzahl:</strong> </span>
|
||||||
|
<?php if(isset($count)): ?>
|
||||||
|
<strong><?php echo $count ?></strong>
|
||||||
|
<?php else: ?>
|
||||||
|
<strong>Anzahl: <?php echo $this->article['basketarticle']->getAuflage() ?></strong><br /><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if(($this->article['basketarticle']->getLayouterId() == "" || $this->article['basketarticle']->getLayouterId() == false)): ?>
|
||||||
|
<strong><?php echo $basketArticle['title'] ?></strong><br />
|
||||||
|
<?php else: ?>
|
||||||
|
<strong><?php echo $this->layouter()->getTitle($this->article['basketarticle']->getLayouterId()); ?></strong><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(($this->article['options'])): ?>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ($this->article['options'] as $key => $option): ?>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(stripos($option, 'Auflage') === 0) {
|
||||||
|
$count = str_replace('Auflage: ', '', $option);
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
<li><?php echo $option ?></li>
|
||||||
|
<?php } ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ($filesOptions as $key => $option): ?>
|
||||||
|
<li><b><a href="/uploads/<?php echo $this->shop->uid ?>/article/<?php echo $option['value'] ?>" target="_blank"><?php echo $option['name'] ?></a></b></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->shop->basketposfield1 != ""): ?><?php echo $this->shop->basketposfield1 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="ref_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getRef(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->shop->basketposfield2 != ""): ?><?php echo $this->shop->basketposfield2 ?>
|
||||||
|
<form enctype="multipart/form-data" method="post">
|
||||||
|
<div><input type="text" class="span3" style="margin-bottom: 0;" name="kst_<?php echo $this->article['uuid'] ?>" value="<?php echo $this->article['basketarticle']->getKst(); ?>"/>
|
||||||
|
<input type="submit" class="btn vouchersubmit" style="" value="<?php echo $this->translate('übernehmen')?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
Gewicht: <?php echo $this->article['basketarticle']->getWeight() ?>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4" style="text-align: right;">
|
||||||
|
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->article['basketarticle']->getNetto()*$this->article['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;width: 45px;">(Netto)</label><br /><strong><?php echo $this->currency->toCurrency($this->article['basketarticle']->getBrutto()*$this->article['basketarticle']->getCount()) ?></strong> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$basketArticle["mwert"].'% MwSt.)')?></label></label><?php } ?>
|
||||||
|
<br/><a href="<?php echo $this->url(array('del' => $this->article['uuid']), 'basketdel') ?>"><?php echo $this->translate('Löschen'); ?></a>
|
||||||
|
<?php if($this->article['basketarticle']->getLayouterId() != "" && !$this->article()->checkIfCollectionOrdersForTemplatePrint($this->article['basketarticle']->getLayouterId())): ?><br/><a href="<?php echo $this->url(array('key' => $this->article['uuid']), 'articleload') ?>"><?php echo $this->translate('Bearbeiten') ?></a><?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
BIN
src/old/application/design/vorlagen/tailwindcss/config/._screenshot.png
Executable file
BIN
src/old/application/design/vorlagen/tailwindcss/config/._screenshot.png
Executable file
Binary file not shown.
25
src/old/application/design/vorlagen/tailwindcss/config/article/approval.ini
Executable file
25
src/old/application/design/vorlagen/tailwindcss/config/article/approval.ini
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
[approval]
|
||||||
|
; general form metainformation
|
||||||
|
user.approval.action = "/article/approval"
|
||||||
|
user.approval.method = "post"
|
||||||
|
|
||||||
|
; approval element
|
||||||
|
user.approval.elements.type.type = "radio"
|
||||||
|
user.approval.elements.type.options.label = "Freigabe?"
|
||||||
|
user.approval.elements.type.options.required = true
|
||||||
|
user.approval.elements.type.options.multiOptions.2 = "freigeben"
|
||||||
|
user.approval.elements.type.options.multiOptions.1 = "Nicht freigeben"
|
||||||
|
|
||||||
|
|
||||||
|
; approval element
|
||||||
|
user.approval.elements.text.type = "textarea"
|
||||||
|
user.approval.elements.text.options.label = "Text"
|
||||||
|
user.approval.elements.text.options.rows = 20
|
||||||
|
user.approval.elements.text.options.cols = 20
|
||||||
|
user.approval.elements.text.options.style = "width: 470px;height: 100px;"
|
||||||
|
|
||||||
|
|
||||||
|
; submit element
|
||||||
|
user.approval.elements.submit.type = "submit"
|
||||||
|
user.approval.elements.submit.options.class = "submit"
|
||||||
|
user.approval.elements.submit.options.label = "Senden"
|
||||||
12
src/old/application/design/vorlagen/tailwindcss/config/config.ini
Executable file
12
src/old/application/design/vorlagen/tailwindcss/config/config.ini
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
elements.b2bshop.type = "checkbox"
|
||||||
|
elements.b2bshop.options.label = "B2B Shop ja/nein"
|
||||||
|
elements.b2bshop.options.required = false
|
||||||
|
|
||||||
|
|
||||||
|
elements.display_no_language.type = "checkbox"
|
||||||
|
elements.display_no_language.options.label = "Sprache nicht benutzen?"
|
||||||
|
elements.display_no_language.options.required = false
|
||||||
|
|
||||||
|
elements.einbetten.type = "checkbox"
|
||||||
|
elements.einbetten.options.label = "Einbetten nicht anzeigen?"
|
||||||
|
elements.einbetten.options.required = false
|
||||||
177
src/old/application/design/vorlagen/tailwindcss/config/images.ini
Executable file
177
src/old/application/design/vorlagen/tailwindcss/config/images.ini
Executable file
@ -0,0 +1,177 @@
|
|||||||
|
[production]
|
||||||
|
|
||||||
|
mode = "imagick"
|
||||||
|
|
||||||
|
languageDefault = "de_DE"
|
||||||
|
|
||||||
|
;PreflightCheck Preview
|
||||||
|
images.articlelist.scale.type = "scaleWidth"
|
||||||
|
images.articlelist.scale.data.width = "165"
|
||||||
|
images.articlelist.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Shop Einstellungen > Allgemeines > Allgemein > Logo1
|
||||||
|
;Startseite Topbannerlogo /layout/default.phtml
|
||||||
|
images.logo1.scale.type = "scaleWidth"
|
||||||
|
images.logo1.scale.data.width = "1140"
|
||||||
|
images.logo1.scale.data.height = ""
|
||||||
|
images.logo1.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Shop Einstellungen > Allgemeines > Allgemein > Logo2
|
||||||
|
;Startseite Topbannerlogo 2 /layout/default.phtml
|
||||||
|
images.logo2.scale.type = "scaleWidth"
|
||||||
|
images.logo2.scale.data.width = "1140"
|
||||||
|
images.logo2.scale.data.height = ""
|
||||||
|
images.logo2.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Shop Kunde > Info & Branding > Bild
|
||||||
|
;Startseite Kundenbanner /layout/default.phtml
|
||||||
|
images.userlogo1.scale.type = "scaleWidth"
|
||||||
|
images.userlogo1.scale.data.width = "1140"
|
||||||
|
images.userlogo1.scale.data.height = ""
|
||||||
|
images.userlogo1.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Shop Firmen > Info & Branding > Bild
|
||||||
|
;Startseite Accountbanner /layout/default.phtml
|
||||||
|
images.accountlogo1.scale.type = "scaleWidth"
|
||||||
|
images.accountlogo1.scale.data.width = "1140"
|
||||||
|
images.accountlogo1.scale.data.height = ""
|
||||||
|
images.accountlogo1.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Produktgruppen > Bilder > Images 1
|
||||||
|
;Produktgruppenbilder Startseite, Produktgruppenseite /templates/article/_articlegrouplistitem.phtml
|
||||||
|
images.productgrouplist.scale.type = "scaleWidth"
|
||||||
|
images.productgrouplist.scale.data.width = "480"
|
||||||
|
images.productgrouplist.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Produkte > Bilder > Images 1
|
||||||
|
;Produktbilder Startseite, Produktgruppenseite /templates/article/_articlelistitem_produktuebersicht.phtml
|
||||||
|
images.productlist.scale.type = "scaleWidth"
|
||||||
|
images.productlist.scale.data.width = "165"
|
||||||
|
images.productlist.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Produktgruppen > Bilder > Images 2
|
||||||
|
;Produktgruppenseite overview/index.phtml
|
||||||
|
images.productgrouplist_overview_box1.scale.type = "scaleWidth"
|
||||||
|
images.productgrouplist_overview_box1.scale.data.width = "1140"
|
||||||
|
images.productgrouplist_overview_box1.scale.data.height = ""
|
||||||
|
images.productgrouplist_overview_box1.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Produktgruppen > Bilder > Images 1
|
||||||
|
;Produktgruppenseite overview/index.phtml
|
||||||
|
images.productgrouplist_overview_box2.scale.type = "scaleWidth"
|
||||||
|
images.productgrouplist_overview_box2.scale.data.width = "200"
|
||||||
|
images.productgrouplist_overview_box2.scale.data.height = ""
|
||||||
|
images.productgrouplist_overview_box2.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Produkte > Bilder
|
||||||
|
;Produktbilder Detailansicht Kalkulationsprodukte /articletemplates/scripts/6.phtml
|
||||||
|
images.productdetail.scale.type = "scaleWidth"
|
||||||
|
images.productdetail.scale.data.width = "500"
|
||||||
|
images.productdetail.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
images.motivelistoverview.scale.type = "scaleWidth"
|
||||||
|
images.motivelistoverview.scale.data.width = "240"
|
||||||
|
images.motivelistoverview.scale.data.direction = "SCALE_DOWN"
|
||||||
|
images.motivelistoverview.render_copyright = "1"
|
||||||
|
|
||||||
|
images.motivelistoverviewbig.scale.type = "scaleWidth"
|
||||||
|
images.motivelistoverviewbig.scale.data.width = "500"
|
||||||
|
images.motivelistoverviewbig.scale.data.height = "300"
|
||||||
|
images.motivelistoverviewbig.scale.data.direction = "SCALE_DOWN"
|
||||||
|
images.motivelistoverviewbig.render_copyright = "1"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
images.motivuploadlist.scale.type = "scaleWidth"
|
||||||
|
images.motivuploadlist.scale.data.width = "250"
|
||||||
|
images.motivuploadlist.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
images.articlelist_box.scale.type = "scaleWidth"
|
||||||
|
images.articlelist_box.scale.data.width = "150"
|
||||||
|
images.articlelist_box.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.top_modul_list.scale.type = "scaleWidth"
|
||||||
|
images.top_modul_list.scale.data.width = "94"
|
||||||
|
images.top_modul_list.scale.data.height = "94"
|
||||||
|
images.top_modul_list.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.motivelist.scale.type = "scaleWidth"
|
||||||
|
images.motivelist.scale.data.width = "170"
|
||||||
|
images.motivelist.scale.data.height = "131"
|
||||||
|
images.motivelist.scale.data.direction = "SCALE_BOTH"
|
||||||
|
images.motivelist.render_copyright = "1"
|
||||||
|
|
||||||
|
images.sliderbg.scale.type = "scaleWidth"
|
||||||
|
images.sliderbg.scale.data.width = "700"
|
||||||
|
images.sliderbg.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
;Sliderbilder
|
||||||
|
images.sliderbgbig.scale.type = "scaleWidth"
|
||||||
|
images.sliderbgbig.scale.data.width = "1170"
|
||||||
|
images.sliderbgbig.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.stepcrop.scale.type = "scaleWidth"
|
||||||
|
images.stepcrop.scale.data.width = "520"
|
||||||
|
images.stepcrop.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.shoplist.scale.type = "scaleWidth"
|
||||||
|
images.shoplist.scale.data.width = "160"
|
||||||
|
images.shoplist.scale.data.height = "131"
|
||||||
|
images.shoplist.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.articletop.scale.type = "scaleWidth"
|
||||||
|
images.articletop.scale.data.width = "20"
|
||||||
|
images.articletop.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.admin.scale.type = "scaleWidth"
|
||||||
|
images.admin.scale.data.width = "90"
|
||||||
|
images.admin.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.contact.scale.type = "scaleWidth"
|
||||||
|
images.contact.scale.data.height = "106"
|
||||||
|
images.contact.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.account.scale.type = "scaleWidth"
|
||||||
|
images.account.scale.data.height = "106"
|
||||||
|
images.account.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
|
||||||
|
images.overview.scale.type = "scaleWidth"
|
||||||
|
images.overview.scale.data.width = "240"
|
||||||
|
images.overview.scale.data.direction = "SCALE_DOWN"
|
||||||
|
|
||||||
|
images.productbarimage.scale.type = "scaleWidth"
|
||||||
|
images.productbarimage.scale.data.width = "170"
|
||||||
|
images.productbarimage.scale.data.height = "110"
|
||||||
|
images.productbarimage.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.articlesingle.scale.type = "scaleWidth"
|
||||||
|
images.articlesingle.scale.data.width = "350"
|
||||||
|
images.articlesingle.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.waren.scale.type = "scaleWidth"
|
||||||
|
images.waren.scale.data.width = "100"
|
||||||
|
images.waren.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
images.designer.scale.type = "scaleWidth"
|
||||||
|
images.designer.scale.data.width = "300"
|
||||||
|
images.designer.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.little.scale.type = "scaleWidth"
|
||||||
|
images.little.scale.data.width = "50"
|
||||||
|
images.little.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
images.articlesinglegreater.scale.type = "scaleWidth"
|
||||||
|
images.articlesinglegreater.scale.data.width = "500"
|
||||||
|
images.articlesinglegreater.scale.data.direction = "SCALE_BOTH"
|
||||||
|
|
||||||
|
[development : production]
|
||||||
|
|
||||||
|
[testing : production]
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user