diff --git a/.docker/nginx.conf b/.docker/nginx.conf index e0deb2b8da..d1844c4f13 100644 --- a/.docker/nginx.conf +++ b/.docker/nginx.conf @@ -3,12 +3,8 @@ # include mime.types; # } -upstream php-pimcore10 { - server coreshop-4-php:9000; -} - -upstream php-pimcore10-debug { - server coreshop-4-php-debug:9000; +upstream php-pimcore11 { + server coreshop4-php:9000; } server { @@ -121,7 +117,6 @@ server { #try_files $fastcgi_script_name =404; # include fastcgi.conf if needed include fastcgi_params; - # Bypass the fact that try_files resets $fastcgi_path_info # see: http://trac.nginx.org/nginx/ticket/321 set $path_info $fastcgi_path_info; @@ -134,12 +129,7 @@ server { # Mitigate https://httpoxy.org/ vulnerabilities fastcgi_param HTTP_PROXY ""; - # If Xdebug session is requested, pass it to the Xdebug enabled container - if ($http_cookie ~* "XDEBUG_SESSION") { - fastcgi_pass php-pimcore10-debug; - } - - fastcgi_pass php-pimcore10; + fastcgi_pass php-pimcore11; # Prevents URIs that include the front controller. This will 404: # http://domain.tld/index.php/some-path # Remove the internal directive to allow URIs like this @@ -155,10 +145,10 @@ server { allow 127.0.0.1; # add additional IP's or Ranges deny all; - fastcgi_pass php-pimcore10; + fastcgi_pass php-pimcore11; } location /fpm-ping { - fastcgi_pass php-pimcore10; + fastcgi_pass php-pimcore11; } } # nginx Status diff --git a/.env b/.env index 6dc4027aeb..6140d6861c 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ PIMCORE_KERNEL_CLASS=Kernel +APP_DEBUG=1 \ No newline at end of file diff --git a/.github/workflows/behat.yml b/.github/workflows/behat.yml index 45feff6124..66bc227459 100644 --- a/.github/workflows/behat.yml +++ b/.github/workflows/behat.yml @@ -2,10 +2,22 @@ name: Behat on: push: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' pull_request: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' release: types: [ created ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs.yaml' + - 'README.md' schedule: - cron: "0 1 * * 1" @@ -25,12 +37,11 @@ jobs: PIMCORE_INSTALL_MYSQL_DATABASE: "coreshop_test" PIMCORE_INSTALL_MYSQL_PORT: "3306" PIMCORE_KERNEL_CLASS: 'Kernel' - PIMCORE_CLASS_DIRECTORY: 'var/tmp/behat/var/classes' strategy: matrix: php: [ 8.1, 8.2 ] - pimcore: [ ^11.0 ] + pimcore: [ ~11.1.0, ~11.2.0 ] dependencies: [ highest ] exclude: - php: 8.1 @@ -47,7 +58,7 @@ jobs: name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -68,7 +79,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/behat_ui.yml b/.github/workflows/behat_ui.yml index 605b5c9c52..7f74f6851a 100644 --- a/.github/workflows/behat_ui.yml +++ b/.github/workflows/behat_ui.yml @@ -2,8 +2,16 @@ name: Behat UI on: push: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' pull_request: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' release: types: [ created ] schedule: @@ -26,12 +34,11 @@ jobs: PANTHER_EXTERNAL_BASE_URI: "http://localhost:9080/index_test.php" PANTHER_CHROME_ARGUMENTS: "--disable-dev-shm-usage" PIMCORE_KERNEL_CLASS: 'Kernel' - PIMCORE_CLASS_DIRECTORY: 'var/tmp/behat/var/classes' strategy: matrix: php: [ 8.1, 8.2 ] - pimcore: [ ^11.0 ] + pimcore: [ ~11.1.0, ~11.2.0 ] dependencies: [ highest ] exclude: - php: 8.1 @@ -49,7 +56,7 @@ jobs: name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -71,7 +78,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} @@ -113,7 +120,7 @@ jobs: run: vendor/bin/behat --strict --no-interaction -vvv -f progress --config behat.yml.dist -p ui - name: Upload Behat logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: failure() with: name: "Behat logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})" @@ -121,7 +128,7 @@ jobs: if-no-files-found: ignore - name: Upload Pimcore logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: failure() with: name: "Pimcore logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})" diff --git a/.github/workflows/codestyles.yml b/.github/workflows/codestyles.yml index bc436917e4..b33420ab0a 100644 --- a/.github/workflows/codestyles.yml +++ b/.github/workflows/codestyles.yml @@ -18,7 +18,7 @@ jobs: branch: [ '4.0' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} diff --git a/.github/workflows/docs_next.yml b/.github/workflows/docs_next.yml index 24c778103b..88794b232b 100644 --- a/.github/workflows/docs_next.yml +++ b/.github/workflows/docs_next.yml @@ -1,37 +1,19 @@ -name: Docs +name: "Documentation" on: + pull_request: + paths: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' push: - branches: [ '4.0' ] paths: - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' + +permissions: + contents: read jobs: docs: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set Node.js 18.x - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Setup and Generate - run: | - cd docs - npm install - npm run build - - - name: Authenticate to Google Cloud - uses: 'google-github-actions/auth@v0' - with: - credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' - - - name: Upload Folder - uses: 'google-github-actions/upload-cloud-storage@v0' - if: github.ref == 'refs/heads/4.0' - with: - path: 'docs/build/' - destination: 'cors-wolke-coreshop-docs/4.0.0' - parent: false + uses: coreshop/workflow-collection/.github/workflows/docs.yml@v1 \ No newline at end of file diff --git a/.github/workflows/gitsplit.yml b/.github/workflows/gitsplit.yml index 16e577107e..0d6d92d6cf 100644 --- a/.github/workflows/gitsplit.yml +++ b/.github/workflows/gitsplit.yml @@ -9,6 +9,10 @@ on: - 3.0 - 3.1 - 4.0 + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' release: types: [ published ] @@ -25,7 +29,7 @@ jobs: - name: Gitsplit Cache id: gitsplit-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: cache key: gitsplit-cache diff --git a/.github/workflows/packages_bundles.yml b/.github/workflows/packages_bundles.yml index bd636ea0fc..8d40ae9057 100644 --- a/.github/workflows/packages_bundles.yml +++ b/.github/workflows/packages_bundles.yml @@ -2,8 +2,16 @@ name: Packages Bundles on: push: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' pull_request: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' release: types: [ created ] schedule: @@ -15,7 +23,7 @@ jobs: name: "Create a list of packages" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "List Packages" id: create-list @@ -32,7 +40,7 @@ jobs: fail-fast: false matrix: php: [ 8.1, 8.2 ] - pimcore: [ ^11.0 ] + pimcore: [ ~11.1.0, ~11.2.0 ] dependencies: [ highest ] package: "${{ fromJson(needs.list.outputs.packages) }}" exclude: @@ -40,7 +48,7 @@ jobs: dependencies: lowest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -53,7 +61,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-php-${{ matrix.php }}-package-${{ matrix.package }}-composer-${{ hashFiles(format('src/CoreShop/{0}/composer.json', matrix.package)) }} diff --git a/.github/workflows/packages_components.yml b/.github/workflows/packages_components.yml index a9b04baa3e..4beadf5c21 100644 --- a/.github/workflows/packages_components.yml +++ b/.github/workflows/packages_components.yml @@ -2,8 +2,16 @@ name: Packages Components on: push: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' pull_request: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' release: types: [ created ] schedule: @@ -15,7 +23,7 @@ jobs: name: "Create a list of packages" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "List Packages" id: create-list @@ -32,7 +40,7 @@ jobs: fail-fast: false matrix: php: [ 8.1, 8.2 ] - pimcore: [ ^11.0 ] + pimcore: [ ~11.1.0, ~11.2.0 ] dependencies: [ highest ] package: "${{ fromJson(needs.list.outputs.packages) }}" exclude: @@ -40,7 +48,7 @@ jobs: dependencies: lowest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -53,7 +61,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-php-${{ matrix.php }}-package-${{ matrix.package }}-composer-${{ hashFiles(format('src/CoreShop/{0}/composer.json', matrix.package)) }} diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3cd82dfbe3..cb7644254d 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -2,8 +2,16 @@ name: Static Tests (Lint, Stan) on: push: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' pull_request: branches: [ '4.0' ] + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_next.yml' + - 'README.md' release: types: [ created ] schedule: @@ -19,7 +27,7 @@ jobs: strategy: matrix: php: [ 8.1, 8.2 ] - pimcore: [ ^11.0 ] + pimcore: [ ~11.1.0, ~11.2.0 ] dependencies: [ highest ] exclude: - php: 8.1 @@ -38,7 +46,7 @@ jobs: name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -55,7 +63,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.gitignore b/.gitignore index bb47951289..5cbb4724d5 100644 --- a/.gitignore +++ b/.gitignore @@ -56,9 +56,9 @@ public/bundles public/var drivers vendor/ -cache/ docs/generated-docs docs/build docs/node_modules docs/.docusaurus node_modules +docker-compose.override.yaml \ No newline at end of file diff --git a/CHANGELOG-3.1.x.md b/CHANGELOG-3.1.x.md index 547e0b51b3..cec45c45c9 100644 --- a/CHANGELOG-3.1.x.md +++ b/CHANGELOG-3.1.x.md @@ -1,3 +1,47 @@ +# 3.1.5 +* +* [ResourceBundle] remove request handler by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2443 +* fix unit solidifier paths by @solverat in https://github.com/coreshop/CoreShop/pull/2446 +* fix nested rule condition by @solverat in https://github.com/coreshop/CoreShop/pull/2447 +* [StorageListBundle] fix standalone SessionBasedListContext by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2448 +* [ResourceBundle] fix custom resource registration by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2454 +* [StorageListBundle] disable cache for StorageList and StorageListItem by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2449 +* [Messenger] fix tab panel layout by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2462 +* [Core] Cart Item Discount Percent Gross Values by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2464 +* Disable CartStockAvailability constraint in revise action by @solverat in https://github.com/coreshop/CoreShop/pull/2461 +* [Cache] don't overwrite the prepareCacheData by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2469 +* [Core] defaultUnitQuantity should never be null by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2470 +* [PimcoreBundle] add cache.system to ExpressionLanguage by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2468 +* [User] implement symfony "getUserIdentifier" by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2475 +* [StorageList] implement \Countable by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2476 +* [Composer] update bdi and add psr-4 autoload-dev for Pimcore Data Objects by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2477 +* [FrontendBundle] check for isSubmitted before calling isValid by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2480 +* allow pending payments in checkout workflow by @solverat in https://github.com/coreshop/CoreShop/pull/2481 + +# 3.1.4 + +* cast trackingCode as string by @solverat in https://github.com/coreshop/CoreShop/pull/2412 +* fix comment delete request by @solverat in https://github.com/coreshop/CoreShop/pull/2407 +* [Core] add unit to GiftProductAction by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2422 +* [Cart] fix wrong decoration of cart-context by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2432 +* Bugfix listing order by by @BlackbitDevs in https://github.com/coreshop/CoreShop/pull/2370 +* [Order expiration] Use orderDate for confirmed orders, not o_creationDate by @BlackbitDevs in + +# 3.1.3 + +* [Cart] fix using right context for performance increase by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2387 +* [Core] Optimize Category recursive and Product Variants Condition Checker by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2388 +* [ResourceBundle] fix cache marshalling issues with CoreShop Doctrine … by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2389 +* [Cache] cache improvements - decorate Pimcore CoreCacheHandler by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2398 +* [Messenger] fix menu in standalone mode by @jdreesen in https://github.com/coreshop/CoreShop/pull/2393 + +# 3.1.2 + +## Bugs + - [Cache] "apply CacheResourceMarshaller to doctrine_dbal adapter, add cache marshaller to MoneyCurrency (https://github.com/coreshop/CoreShop/pull/2373) + - [Core] re-add mainObjectId and objectId (https://github.com/coreshop/CoreShop/pull/2380) + - [Reports] fix reports to only select actual orders (https://github.com/coreshop/CoreShop/pull/2381) + # 3.1.1 ## Bugs diff --git a/CHANGELOG-3.2.x.md b/CHANGELOG-3.2.x.md new file mode 100644 index 0000000000..ef70ffb864 --- /dev/null +++ b/CHANGELOG-3.2.x.md @@ -0,0 +1,58 @@ +# 3.2.7 +* Fix store mail and store order mail collection entry type by @kkarkus in https://github.com/coreshop/CoreShop/pull/2586 +* [NoteService] implement deadlock retry strategy by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2588 +* always set default unit quantity in gift product action by @solverat in https://github.com/coreshop/CoreShop/pull/2590 +* [CoreBundle] fix PaymentWorkflow Listener to trigger state transition conditions by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2601 +* [CoreBundle] fix CartTextProcessor priority and CartManagers setParent for cart-item by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2602 + +# 3.2.6 +* [Tests] add test for stock tracked products in checkout by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2560 +* [Tests] test only latest pimcore with highest deps for 3.2 by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2559 +* Increase MessengerBundle Receivers combobox width by @NiklasBr in https://github.com/coreshop/CoreShop/pull/2567 +* Updated CachedStoreContext.php by @kamil-karkus in https://github.com/coreshop/CoreShop/pull/2565 +* [Core] fix price calculation with immutables and adjustments by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2573 + +# 3.2.5 +* [Migration] [Migration] fix Staticroute Migration for Pimcore 10 by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2550 + +# 3.2.4 +* [CoreBundle] fix priority of coreshop_payment_token route by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2542 +* [Frontend] create order-token if not yet exists by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2543 +* [ProductBundle] default return empty array instead of null in preGetData by @breakone in https://github.com/coreshop/CoreShop/pull/2544 + +# 3.2.3 +* [ProductBundle] fix ClearCachedPriceRulesListener - remove service definition + +# 3.2.2 +* [CartManager] create unique key for cart items by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2510 +* [Core] Use order tokens in payment capture by @yariksheptykin in https://github.com/coreshop/CoreShop/pull/2515 +* [Core] add caching for recursive variant checking by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2520 +* use null coalescing operator against maxUsagePerUser by @sovlerat in https://github.com/coreshop/CoreShop/pull/2524 + +# 3.2.1 +* [ClassDefinitionPatch] allow update of field-definitions instead of replace by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2494 +* [Product] assert range sort for qpr by @solverat in https://github.com/coreshop/CoreShop/pull/2498 +* [OrderEdit] allow 0 quantity by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2499 +* [ClassDefinitionPatch] Class patches array by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2496 + +# 3.2.0 + +* [Order] introduce feature to allow editing confirmed orders in backend by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2382 +* [Order] Backend Order Editing by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2397 +* [StorageListBundle] make restore cart after checkout configurable by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2428 +* [OrderEdit] don't allow cancelled orders to be editable by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2431 +* [Voucher] restrict voucher usage per customer by @Philip-Neusta in https://github.com/coreshop/CoreShop/pull/2451 +* [CoreBundle] introduce Product Price Rule that is not combinable with Cart Price Voucher Rule by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2458 +* [CoreBundle] fix migration to add immutable field to order by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2465 + +# 3.2.0-beta.1 + +* [StorageListBundle] make restore cart after checkout configurable by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2428 +* [OrderEdit] don't allow cancelled orders to be editable by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2431 + +# 3.2.0-beta.1 + +## Features + +- [Order] Backend Order Editing by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2397, https://github.com/coreshop/CoreShop/pull/2382 + diff --git a/CHANGELOG-4.0.x.md b/CHANGELOG-4.0.x.md index 76dec74c81..4749c57031 100644 --- a/CHANGELOG-4.0.x.md +++ b/CHANGELOG-4.0.x.md @@ -1,3 +1,62 @@ +# 4.0.5 + +* [Core] Pimcore 11.1 and 11.2 compatibility and psalm update by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2584 +* [NoteService] implement deadlock retry strategy by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2588 + +# 4.0.4 + +* [Docs] Improve resource bundle docs a bit by @jdreesen in https://github.com/coreshop/CoreShop/pull/2554 +* [OrderBundle] register OrderDocumentPrintController in controller.yml by @breakone in https://github.com/coreshop/CoreShop/pull/2557 +* [OrderBundle] cast return values for getWkHtmlToPdfBinary and getXvfb… by @breakone in https://github.com/coreshop/CoreShop/pull/2558 +* [Docs] improved installation instructions by @nehlsen in https://github.com/coreshop/CoreShop/pull/2569 + +# 4.0.3 + +* [Core] Fixes in DataObject Extensions and Subscribed Services by @solverat in https://github.com/coreshop/CoreShop/pull/2528 +* [MessengerBundle] make FailedMessageDetails and MessageDetails JsonSerializable by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2530 + +# 4.0.2 + +* [DataHub] only enable queries for selected entities by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2512 +* add address identifier repository to subscribed services by @solverat in https://github.com/coreshop/CoreShop/pull/2518 +* add guest condition by @breakone in https://github.com/coreshop/CoreShop/pull/2514 +* fix customer repository service link by @solverat in https://github.com/coreshop/CoreShop/pull/2523 + +# 4.0.1 + +* [Docs] Update docusaurus by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2490 +* [Resource] Update Select.php by @breakone in https://github.com/coreshop/CoreShop/pull/2489 +* [Product] use coreshop.form.factory in product unit definitions extension by @solverat in https://github.com/coreshop/CoreShop/pull/2501 + +# 4.0.0 + +* add missing subscribed services by @hethehe in https://github.com/coreshop/CoreShop/pull/2439 +* [Docs] update docs by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2455 +* fix workflow.registry service argument by @hethehe in https://github.com/coreshop/CoreShop/pull/2457 +* [StoreBundle] fix StoreCollector for backend by @codingioanniskrikos in https://github.com/coreshop/CoreShop/pull/2466 +* [Core] fix o_id usages by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2473 + +# 4.0.0-beta.4 + +* [Pimcore11] remove o_ column usages by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2413 +* [Pimcore11] fix return type for getChildCategories by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2414 +* can not save store shop settings by @sevarozh in https://github.com/coreshop/CoreShop/pull/2415 +* [Pimcore] require Pimcore 11.1 as minimum by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2423 +* Fix error in the filter functionality for multiselects by @hethehe in https://github.com/coreshop/CoreShop/pull/2426 + +# 4.0.0-beta.3 +- CoreShop 4.0.0 is the same as 3.2.0 will be, it contains all bug-fixes and feature from 3.1 and 3.2 + +## Bugs + - [ResourceBundle] fix CoreShopRelation and CoreShopRelations dynamic classes setter by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2396 + +## Features +### From 3.2 +- [Order] Backend Order Editing by @dpfaffenbauer in https://github.com/coreshop/CoreShop/pull/2397, https://github.com/coreshop/CoreShop/pull/2382 + +# 4.0.0-beta.2 + - CoreShop 4.0.0 is the same as 3.2.0 will be, it contains all bug-fixes and feature from 3.1 and 3.2 + # 4.0.0-beta.1 > CoreShop 4.0.0 is the same as 3.1.0, but with Pimcore 11 compatibility. Updating CoreShop therefore is quite easy. Since Symfony now doesn't have a full container anymore, we use Service Containers now for our Controllers. So your overwritten Controllers probably need changes. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ea0716fe6..1c20227947 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,101 @@ your PR (if one is not already open), and your approach to solving it (not neces * [Fork us!](https://help.github.com/articles/fork-a-repo/) Code! Follow the coding standards PSR-1 and PSR-2 * [Send a pull request](https://help.github.com/articles/using-pull-requests/) from your fork’s branch to our `master` branch. +## Set up local development environment +This guide outlines the steps to set up CoreShop for development on your local machine. +### Prerequisites: +* Docker Desktop: Ensure you have Docker Desktop installed and running on your system. You can find download and installation instructions for Windows, Mac and Linux here: https://docs.docker.com/desktop/ or +* OrbStack (macOS only): Ensure you have OrbStack installed on your system. You can find download and installation instructions here: https://orbstack.dev/ + +### Step 1: Build docker images +Navigate to the cloned CoreShop directory in your terminal, and run the following command to build the Docker images: + +```shell +docker compose build --build-arg uid=$(id -u) --pull +``` + +### Step 2: Full Install +Run the following command to install Pimcore and CoreShop: +```shell +docker compose run --rm php bin/install +```` + +#### Step 3: Handle permissions +```shell +docker compose run --rm php chown www-data:www-data public/var/* var/* +``` +For Linux Native systems we also need to execute: +```shell +sudo chown -R $(id -u):$(id -g) +``` + +### Manual Installation +Optionally you can run the single steps: + +#### Step 1: Install Dependencies +Navigate to the cloned CoreShop directory in your terminal. + +Run the following command to install all the required dependencies using Composer: +```shell +docker compose run --rm php composer install +``` + +#### Step 2: Install Pimcore +Run the following command to install Pimcore using the provided Docker image: +```shell +docker compose run --rm php vendor/bin/pimcore-install --no-interaction --ignore-existing-config +``` + +#### Step 3: Install CoreShop +Run the following command to install CoreShop: +```shell +docker compose run --rm php bin/console coreshop:install +``` + +#### Step 4: Install Demo Data (Optional) +CoreShop offers a demo dataset for testing purposes. To install the demo data, run the following command: +```shell +docker compose run --rm php bin/console coreshop:install:demo +``` + +## Running Code Analysis +CoreShop provides options for running code analysis tools like Psalm and PHPStan. These tools help identify potential errors and improve code quality. +Run the following command to execute Psalm within a Docker container: + +```shell +docker compose run --rm php vendor/bin/psalm +``` + +Run the following command to run PHPStan with specific configuration options: +```shell +docker compose run --env SYMFONY_ENV=test --rm php vendor/bin/phpstan analyse -c phpstan.neon src -l 3 --memory-limit=-1 +``` + +## Running Tests + +Setup the behat container first by building the image and installing the dependencies: + +```shell +docker compose build --build-arg behat +``` + +### BEHAT Domain + +Run the following command to execute the domain tests: + +```shell +docker compose run --rm behat vendor/bin/behat -c behat.yml.dist -p default +``` + +### BEHAT UI + +UI tests require a running coreshop instance and a browser. Use the following command to run the UI tests +in a container: + +```shell +docker compose run --rm behat +``` + ### Contributor License Agreement The following terms are used throughout this agreement: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..2853c06a54 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM pimcore/pimcore:php8.2-debug-latest as dev +RUN set -eux; \ + apt-get update; \ + apt-get install -y $PHPIZE_DEPS libxslt1-dev; \ + docker-php-ext-install xsl; \ + sync; \ + apt-get purge -y $PHPIZE_DEPS; \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* +ARG uid=1000 +RUN usermod -u $uid www-data && chown -R www-data:www-data /var/www + +FROM dev as behat +RUN apt update && \ + apt install -y chromium chromium-driver + +# Install Symfony, Pimcore and CoreShop inside Tests container +# RUN wget https://get.symfony.com/cli/installer -O - | bash +RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | bash +RUN apt install symfony-cli + +ENV PANTHER_NO_SANDBOX=1 +ENV PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage' +ENV CORESHOP_SKIP_DB_SETUP=1 +ENV PANTHER_NO_HEADLESS=0 +ENV APP_ENV="test" + diff --git a/README.md b/README.md index d234c6dbfb..e20604ebf2 100644 --- a/README.md +++ b/README.md @@ -1,103 +1,36 @@ -![CoreShop](etc/logo.png) - ---- - -**CoreShop - Pimcore eCommerce** +**CoreShop - Pimcore enhanced eCommerce** ![Static Tests (Lint, Stan)](https://github.com/coreshop/CoreShop/actions/workflows/static.yml/badge.svg) -![Behat UI Tests](https://github.com/coreshop/CoreShop/workflows/Behat%20UI/badge.svg) -![Behat Tests](https://github.com/coreshop/CoreShop/workflows/Behat/badge.svg) +[![Behat UI](https://github.com/coreshop/CoreShop/actions/workflows/behat_ui.yml/badge.svg)](https://github.com/coreshop/CoreShop/actions/workflows/behat_ui.yml) +[![Behat](https://github.com/coreshop/CoreShop/actions/workflows/behat.yml/badge.svg)](https://github.com/coreshop/CoreShop/actions/workflows/behat.yml) [![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat)](LICENSE.md) [![Latest Pre-Release](https://img.shields.io/packagist/vpre/coreshop/core-shop.svg)](https://www.packagist.org/packages/coreshop/core-shop) -[CoreShop](https://www.coreshop.org) is a eCommerce Platform for [Pimcore](http://www.pimcore.org). - -![CoreShop Interface](docs/img/screenshot5.png) +[![CoreShop](etc/illustration.png 'CoreShop')](https://www.coreshop.org) -# Requirements - - Pimcore `^11.0` - -# Installation - - Allow dev version to be installed: - ``` - composer config "minimum-stability" "dev" - composer config "prefer-stable" "true" - ``` - - Install with composer - ``` - composer require coreshop/core-shop:^4.0 - ``` - - Run enable Bundle command - ``` - php bin/console pimcore:bundle:enable CoreShopCoreBundle - ``` - - Run Install Command - ``` - php bin/console coreshop:install - ``` - - Optional: Install Demo Data - ``` - php bin/console coreshop:install:demo - ``` -## Messenger -CoreShop also uses Symfony Messenger for async tasks like sending E-Mails or Processing DataObjects for the Index. Please run these 2 transports to process the data -``` -bin/console messenger:consume coreshop_notification coreshop_index --time-limit=300 -``` +CoreShop harnesses Pimcore's advanced features for unmatched efficiency and customization in your online store. Dive +into a seamless blend of cutting-edge technology and user-friendly interfaces, crafting an eCommerce experience that +transcends ordinary transactions. # Further Information - - [Website](https://www.coreshop.org) - - [Documentation](https://docs.coreshop.org/latest) - - [Pimcore Forum](https://talk.pimcore.org) - -# Demo -You can see a running demo here [CoreShop 3.x Demo](https://demo3.coreshop.org) - -**Backend Credentials** - -``` -Admin: https://demo3.coreshop.org/admin -Username: admin -Password: coreshop -``` +- [Website](https://www.coreshop.org) +- [Documentation](https://docs.coreshop.org/latest) +- [Pimcore Github](https://github.com/pimcore/pimcore) -## Running Tests Locally -### Psalm -``` -vendor/bin/psalm -``` +# Requirements -### PHPStan -``` -SYMFONY_ENV=test vendor/bin/phpstan analyse -c phpstan.neon src -l 3 --memory-limit=-1 -``` +- Pimcore `^11.1` -### BEHAT Domain -``` -CORESHOP_SKIP_DB_SETUP=1 PIMCORE_TEST_DB_DSN=mysql://root:ROOT@coreshop-next/coreshop4___behat vendor/bin/behat -c behat.yml.dist -p default -``` +# Installation -### BEHAT UI -``` -vendor/bin/bdi detect drivers +Read our Documentation for the Installation Guide [here](https://docs.coreshop.org/CoreShop/Getting_Started/Installation) -# Install Pimcore and CoreShop in Test Env -APP_ENV=test PIMCORE_TEST_DB_DSN=mysql://root:ROOT@coreshop-next/coreshop4___behat PIMCORE_INSTALL_ADMIN_USERNAME=admin PIMCORE_INSTALL_ADMIN_PASSWORD=admin PIMCORE_INSTALL_MYSQL_HOST_SOCKET=coreshop-next PIMCORE_INSTALL_MYSQL_USERNAME=root PIMCORE_INSTALL_MYSQL_PASSWORD=ROOT PIMCORE_INSTALL_MYSQL_DATABASE=coreshop4___behat PIMCORE_INSTALL_MYSQL_PORT=3306 PIMCORE_KERNEL_CLASS=Kernel vendor/bin/pimcore-install --env=test --skip-database-config -APP_ENV=test PIMCORE_CLASS_DIRECTORY=var/tmp/behat/var/classes PIMCORE_TEST_DB_DSN=mysql://root:ROOT@coreshop-next/coreshop4___behat bin/console coreshop:install +# Demo -# OUTSIDE CONTAINER -# Run Symfony Server -APP_ENV=test PIMCORE_TEST_DB_DSN=mysql://root:ROOT@127.0.0.1:3306/coreshop4___behat symfony server:start --port=9080 --dir=public --no-tls +Discover the full potential of CoreShop through our interactive demos. Read more about this [here](https://docs.coreshop.org/CoreShop/Getting_Started/Demo) -# Run Behat -CORESHOP_SKIP_DB_SETUP=1 PANTHER_EXTERNAL_BASE_URI=http://127.0.0.1:9080/index_test.php PANTHER_NO_HEADLESS=0 PIMCORE_TEST_DB_DSN=mysql://root:ROOT@127.0.0.1:3306/coreshop4___behat php -d memory_limit=-1 vendor/bin/behat -c behat.yml.dist -p ui -vvv -``` +## Copyright and license -## Copyright and license Copyright: [CoreShop GmbH](https://www.coreshop.org) -For licensing details please visit [LICENSE.md](LICENSE.md) - -## Screenshots -![CoreShop Interface](docs/img/screenshot5-2.png) -![CoreShop Interface](docs/img/screenshot5-3.png) +For licensing details please visit [LICENSE.md](LICENSE.md) \ No newline at end of file diff --git a/behat-bootstrap.php b/behat-bootstrap.php index 5693c4c36a..dc04b68cfd 100755 --- a/behat-bootstrap.php +++ b/behat-bootstrap.php @@ -19,13 +19,6 @@ ); } -if (!defined('TESTS_PATH')) { - define('TESTS_PATH', __DIR__); -} - -define('PIMCORE_CLASS_DIRECTORY', __DIR__ . '/var/tmp/behat/var/classes'); -define('PIMCORE_TEST', true); - ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); diff --git a/bin/console b/bin/console index a87ce17b45..dbc8a166aa 100755 --- a/bin/console +++ b/bin/console @@ -11,34 +11,27 @@ * @license https://www.coreshop.org/license GPLv3 and CCL */ -ob_get_clean(); - -if (file_exists($a = getcwd() . '/vendor/autoload.php')) { - include $a; -} elseif (file_exists($a = __DIR__ . '/../../../../vendor/autoload.php')) { - include $a; -} elseif (file_exists($a = __DIR__ . '/../vendor/autoload.php')) { - include $a; +use Pimcore\Bootstrap; +use Pimcore\Console\Application; + +if (file_exists($a = getcwd() . '/vendor/autoload_runtime.php')) { + require_once $a; +} elseif (file_exists($a = __DIR__ . '/../vendor/autoload_runtime.php')) { + require_once $a; +} elseif (file_exists($a = __DIR__ . '/../../../../vendor/autoload_runtime.php')) { + require_once $a; +} elseif (file_exists($a = __DIR__ . '/../autoload_runtime.php')) { + require_once $a; } else { - fwrite(STDERR, 'Cannot locate autoloader; please run "composer install"' . PHP_EOL); - exit(1); + throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); } -\Pimcore\Bootstrap::setProjectRoot(); - define('PIMCORE_CONSOLE', true); +Bootstrap::setProjectRoot(); -$input = new \Symfony\Component\Console\Input\ArgvInput(); -if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) { - putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); -} - -if ($input->hasParameterOption('--no-debug', true)) { - putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); -} +return static function (array $context) { + $kernel = Bootstrap::startupCli(); -/** @var \Pimcore\Kernel $kernel */ -$kernel = \Pimcore\Bootstrap::startupCli(); -$application = new \Pimcore\Console\Application($kernel); -$application->run(); + return new Application($kernel); +}; \ No newline at end of file diff --git a/bin/install b/bin/install new file mode 100755 index 0000000000..70ba9dc971 --- /dev/null +++ b/bin/install @@ -0,0 +1,6 @@ +#!/bin/bash + +composer install +vendor/bin/pimcore-install --no-interaction +bin/console coreshop:install +bin/console coreshop:install:demo \ No newline at end of file diff --git a/composer.json b/composer.json index 2c1fd711cd..3cebc0194f 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ "require": { "php": "^8.0", "ext-json": "*", - "dachcom-digital/emailizr": "^2.0.0", + "dachcom-digital/emailizr": "^3.0", "doctrine/data-fixtures": "^1.5", "doctrine/doctrine-bundle": "^2.4", "doctrine/doctrine-fixtures-bundle": "^3.4", @@ -101,12 +101,12 @@ "payum/payum-bundle": "^2.5", "php-http/guzzle7-adapter": "^1.0", "php-http/message-factory": "^1.1", - "pimcore/admin-ui-classic-bundle": "^1.0", + "pimcore/admin-ui-classic-bundle": "^1.2", "pimcore/google-marketing-bundle": "^1.0", "pimcore/newsletter-bundle": "^1.0", - "pimcore/pimcore": "^11.0", + "pimcore/pimcore": "^11.1", "rinvex/countries": "^7.3", - "sebastian/diff": "^4.0 | ^5.0", + "sebastian/diff": "^4.0 | ^5.0 | ^6.0", "stof/doctrine-extensions-bundle": "^1.6", "sylius/theme-bundle": "^2.2", "symfony/dotenv": "^6.3", @@ -130,15 +130,16 @@ "phpstan/phpstan-doctrine": "^1.3.40", "phpstan/phpstan-symfony": "^1.3.2", "phpstan/phpstan-webmozart-assert": "^1.2.4", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^10.0", "robertfausk/behat-panther-extension": "^1.0", "symfony/panther": "^2.0", + "symfony/runtime": "^6.3", "symplify/easy-coding-standard": "^11.1", - "vimeo/psalm": "^4.10" + "vimeo/psalm": "^5.23" }, "conflict": { "jms/serializer-bundle": "4.1.0", - "league/csv": ">= 9.11" + "twig/twig": "^3.9.0" }, "suggest": { "dpfaffenbauer/process-manager": "Allows to start Processes from within Pimcore UI and also tracks the status." @@ -180,7 +181,8 @@ "config": { "sort-packages": true, "allow-plugins": { - "phpstan/extension-installer": false + "phpstan/extension-installer": false, + "symfony/runtime": true } } } diff --git a/docker-compose.yaml b/docker-compose.yaml index 686bb48288..d7e8b87aa6 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,76 +1,99 @@ -version: '3.4' +name: 'coreshop-4' -networks: - cors_dev: - external: true - coreshop_4: - external: false +x-php: &php + volumes: + - .:/var/www/html + # Reset xdebug configuration to default + - /dev/null:/usr/local/etc/php/conf.d/20-xdebug.ini:ro + environment: + PHP_IDE_CONFIG: serverName=localhost + # Enable step debugging and development helpers by default. + # `debug`-mode in conjuction with `trigger` (default) in `xdebug.start_with_request` enables step-debugging + # only if a "trigger" (i.e. `XDEBUG_TRIGGER`) is present. Refer to + # [start_with_request](https://xdebug.org/docs/all_settings#start_with_request) documentation of how to trigger + # step debugging with `trigger`. + # To configure PhpStorm for step-debugging with xdebug see: https://www.jetbrains.com/help/phpstorm/2021.3/zero-configuration-debugging.html#start-debugging-session + # See: https://xdebug.org/docs/all_settings#mode + XDEBUG_MODE: debug + # This forces xdebug to always connect to the debug client running on docker host (host.docker.internal). + # It will work without further configuration with [Docker Desktop](https://www.docker.com/products/docker-desktop). + # See: https://xdebug.org/docs/all_settings#client_host + XDEBUG_CONFIG: client_host=host.docker.internal + COMPOSER_HOME: /var/www/html + PIMCORE_DB_DSN: "mysql://pimcore:pimcore@db:3306/pimcore" + PIMCORE_INSTALL_ADMIN_USERNAME: "admin" + PIMCORE_INSTALL_ADMIN_PASSWORD: "admin" + PIMCORE_INSTALL_MYSQL_HOST_SOCKET: "db" + PIMCORE_INSTALL_MYSQL_USERNAME: "pimcore" + PIMCORE_INSTALL_MYSQL_PASSWORD: "pimcore" + PIMCORE_INSTALL_MYSQL_DATABASE: "pimcore" + PIMCORE_INSTALL_MYSQL_PORT: "3306" + PIMCORE_INSTALL_INSTALL_BUNDLES: "PimcoreApplicationLoggerBundle,PimcoreCustomReportsBundle,PimcoreGlossaryBundle,PimcoreSeoBundle,PimcoreSimpleBackendSearchBundle,PimcoreStaticRoutesBundle,PimcoreTinymceBundle,PimcoreUuidBundle,PimcoreWordExportBundle,PimcoreXliffBundle" + extra_hosts: + - "host.docker.internal:host-gateway" services: db: - image: mysql:8 - container_name: coreshop-4 - networks: - - cors_dev - - coreshop_4 + container_name: coreshop4-db + image: mariadb:10.5 working_dir: /application - command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_general_ci] - ports: - - "3306:3306" + command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_general_ci ] volumes: - - coreshop-4:/var/lib/mysql + - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=ROOT - MYSQL_DATABASE=pimcore - MYSQL_USER=pimcore - MYSQL_PASSWORD=pimcore + expose: + - "3306" nginx: + container_name: coreshop4-nginx image: nginx:stable-alpine - container_name: coreshop-4-nginx volumes: - - .:/var/www/html:cached - - ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro + - .:/var/www/html + - ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - php - - php-debug - networks: - - cors_dev - - coreshop_4 - labels: - - traefik.enable=true - - traefik.http.routers.coreshop_4.rule=Host(`coreshop-4.localhost`) - - traefik.http.routers.coreshop_4.entrypoints=cors_dev - - traefik.http.routers.coreshop_4.tls=true - - traefik.http.services.coreshop_4.loadbalancer.server.port=80 - - traefik.docker.network=cors_dev + ports: + - "80:80" php: - image: pimcore/pimcore:php8.2-latest - container_name: coreshop-4-php - networks: - - coreshop_4 - environment: - COMPOSER_HOME: /var/www/html + <<: *php + container_name: coreshop4-php + image: coreshop/coreshop:PHP8.1-fpm-debug + build: + target: dev + args: + uid: ${USER_ID:-1000} depends_on: - db - volumes: - - .:/var/www/html:cached - php-debug: - image: pimcore/pimcore:php8.2-debug-latest - container_name: coreshop-4-php-debug - networks: - - coreshop_4 + behat: + <<: *php + container_name: coreshop4-behat + image: coreshop/coreshop:PHP8.1-fpm-debug-behat + build: + target: behat + args: + uid: ${USER_ID:-1000} + profiles: + - behat depends_on: - db - volumes: - - .:/var/www/html:cached environment: - PHP_IDE_CONFIG: serverName=localhost - XDEBUG_TRIGGER: PHPSTORM - COMPOSER_HOME: /var/www/html - XDEBUG_HOST: 198.19.248.254 + PIMCORE_TEST_DB_DSN: "mysql://pimcore:pimcore@db:3306/pimcore" + PIMCORE_KERNEL_CLASS: 'Kernel' + PIMCORE_CLASS_DIRECTORY: 'var/tmp/behat/var/classes' + command: + - bash + - -c + - | + set -e; + vendor/bin/bdi detect drivers; + symfony server:start --port=9080 --dir=public --no-tls -d; + CORESHOP_SKIP_DB_SETUP=1 PANTHER_EXTERNAL_BASE_URI=http://127.0.0.1:9080/index_test.php PANTHER_NO_HEADLESS=0 php -d memory_limit=-1 vendor/bin/behat -c behat.yml.dist -p ui volumes: - coreshop-4: + db: diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index b2d6de3062..0000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# Dependencies -/node_modules - -# Production -/build - -# Generated files -.docusaurus -.cache-loader - -# Misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/docs/00_Introduction.md b/docs/00_Introduction.md new file mode 100644 index 0000000000..6c28b7aaae --- /dev/null +++ b/docs/00_Introduction.md @@ -0,0 +1,31 @@ +--- +slug: / +title: Introduction +--- + +# Introduction to CoreShop - Pimcore eCommerce Framework + +Welcome to the CoreShop documentation. This section is designed for developers and provides comprehensive information on +utilizing CoreShop within Pimcore, a powerful and flexible eCommerce solution. + +![illustration.png](img%2Fillustration.png) + +## Quick Navigation Guide + +Our documentation is organized into easy-to-navigate sections, each tailored to different aspects of CoreShop: + +- **Getting Started**: Visit the [Getting Started](./01_Getting_Started/index.md) section for an introduction to + CoreShop, including installation instructions. +- **Bundles Overview**: Explore the [Bundles](./03_Bundles/index.md) section to understand the various CoreShop Bundles + and their functionalities. +- **User Documentation**: For configuration details and user-oriented instructions, see + the [User Documentation](./02_User_Documentation/index.md). +- **Developer Guide**: If you're looking to develop with CoreShop, check out + our [Development](./03_Development/index.md) section for in-depth technical information. + +## Explore CoreShop in Action + +- **Live Demo**: Experience CoreShop firsthand and use our [CoreShop Demo](https://demo4.coreshop.org) as a blueprint + for your implementations. + +For more information about Pimcore itself, visit [pimcore.com](https://pimcore.com). diff --git a/docs/01_Getting_Started/00_Installation.md b/docs/01_Getting_Started/00_Installation.md new file mode 100644 index 0000000000..963f160ef4 --- /dev/null +++ b/docs/01_Getting_Started/00_Installation.md @@ -0,0 +1,91 @@ +# Installation + +To install CoreShop, ensure you have a running instance of Pimcore on your system. Follow these steps to set up +CoreShop: + +## Initial Setup + +1. Install with composer: `composer require coreshop/core-shop ^4.0` +2. Enable the bundle in `config/bundles.php` and the `CoreShopCoreBundle` to the list of Bundles to load: + ```php + ['all' => true], + ]; + ``` +3. To configure the CoreShop Password Hasher, create or update the `config/packages/pimcore.yaml` and add: + ```yaml + pimcore: + security: + password_hasher_factories: + Pimcore\Model\DataObject\CoreShopUser: coreshop.security.user.password_hasher_factories + ``` +4. Update `config/packages/security.yaml` to allow access to the CoreShop Backend. + - Add the CoreShop Frontend parameter at the very top of your `security.yaml` (before `security`): + ```yaml + parameters: + coreshop.security.frontend_regex: "^/(?!admin)[^/]*" + + security: + ... + ``` + - Add the Authentication Provider. Find your existing `providers` entry and add the `coreshop_user` entry after the other(s): + ```yaml + providers: + ... + coreshop_user: + id: CoreShop\Bundle\CoreBundle\Security\ObjectUserProvider + ``` + - Add the Firewall Config. Find your existing `firewalls` entry and add the `coreshop_frontend` entry after the other entries: + ```yaml + firewalls: + coreshop_frontend: + provider: coreshop_user + pattern: '%coreshop.security.frontend_regex%' + context: shop + form_login: + login_path: coreshop_login + check_path: coreshop_login_check + provider: coreshop_user + failure_path: coreshop_login + default_target_path: coreshop_index + use_forward: false + use_referer: true + remember_me: + secret: "%secret%" + name: APP_CORESHOP_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: coreshop_logout + target: coreshop_login + invalidate_session: false + ``` + - Add Access Control. Find your existing `access_control` entry and add the following lines after the existing ones: + ```yaml + access_control: + - { path: "%coreshop.security.frontend_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] } + - { path: "%coreshop.security.frontend_regex%/_partial", role: ROLE_NO_ACCESS } + ``` +5. Run Install Command `php bin/console coreshop:install` +6. Optional: Install Demo Data `php bin/console coreshop:install:demo` + +## Messenger + +CoreShop also uses Symfony Messenger for async tasks like sending E-Mails or Processing DataObjects for the Index. +Please run these 2 transports to process the data + +```yaml +bin/console messenger:consume coreshop_notification coreshop_index --time-limit=300 +``` + +## Payment + +CoreShop uses Payum for Payment. Checkout Payum's Documentation on how to add payment providers. + +Payment providers are implemented as Pimcore Plugin. They can be installed using composer. Here you can find all +available payment modules via composer + +[Payum Documentation](https://github.com/Payum/Payum/blob/master/docs/index.md#symfony-payum-bundle) diff --git a/docs/01_Getting_Started/01_Architecture_Overview.md b/docs/01_Getting_Started/01_Architecture_Overview.md new file mode 100644 index 0000000000..95231eeb6c --- /dev/null +++ b/docs/01_Getting_Started/01_Architecture_Overview.md @@ -0,0 +1,52 @@ +# Architecture + +CoreShop is an open-source (GPL license) eCommerce solution, maintained and financed by CoreShop GmbH. It benefits from +a diverse community of developers and companies contributing to its development. + +## Core Values and Distinctions + +CoreShop stands out for its: + +- **Components-Based Approach**: Offering modularity and flexibility. +- **Unlimited Flexibility and Customization**: Easily tailored to specific needs. +- **Developer-Friendly**: Incorporates the latest technologies. +- **High-Quality Code**: Focus on robust and reliable coding practices. + +# The Three Natures of CoreShop + +CoreShop combines three distinct elements: + +1. **Decoupled eCommerce Components**: Written in PHP for flexibility. +2. **Symfony Bundles**: Integrating components into the full-stack Symfony framework. +3. **Complete eCommerce Suite**: A cohesive solution crafted from these building blocks. + +CoreShop can be utilized in various ways: as standalone components in any framework, as bundles in a new or existing +Pimcore application, or as a full-stack suite. + +# CoreShop Suite + +This documentation focuses on the CoreShop full-stack eCommerce suite. As a standard Pimcore Bundle, it provides the +foundation for common webshop functionality and custom systems. + +# Leveraging Symfony Bundles + +For custom systems built from scratch, CoreShop's standalone Symfony bundles can be integrated into your project. +Installation instructions are available in each bundle's documentation. + +## Difference to the Official Pimcore eCommerce Framework + +While the Pimcore eCommerce Framework offers a basic toolset for eCommerce development, CoreShop extends this with a +feature-rich set of tools for complex and rich eCommerce solutions. + +> **Example I:** The Framework does not fully support complex shipping price calculations. This requires custom coding. +> CoreShop, however, includes Carriers and Shipping Rules for such functionality. + +CoreShop's bundles are designed for individual use, with the CoreBundle combining all features for a comprehensive +solution. + +# Architecture Overview + +CoreShop Suite is built upon CoreShop Components and Bundles. The CoreBundle and CoreComponent unify these elements into +a cohesive eCommerce Suite for both B2B and B2C solutions. + +![Architecture](img/architecture.png) diff --git a/docs/01_Getting_Started/02_Upgrade_Notes.md b/docs/01_Getting_Started/02_Upgrade_Notes.md new file mode 100644 index 0000000000..0adcb21f2c --- /dev/null +++ b/docs/01_Getting_Started/02_Upgrade_Notes.md @@ -0,0 +1,1527 @@ +# Upgrade Notes + +Always check this page for some important upgrade notes before updating to the latest coreshop build. + +# 4.0.0-beta.1 + +> CoreShop 4.0.0 is the same as 3.1.0, but with Pimcore 11 compatibility. Updating CoreShop therefore is quite easy. +> Since Symfony now doesn't have a full container anymore, we use Service Containers now for our Controllers. So your +> overwritten Controllers probably need changes. + +- Pimcore 11 + Compatibility (https://github.com/coreshop/CoreShop/pull/2252, https://github.com/coreshop/CoreShop/pull/2340, https://github.com/coreshop/CoreShop/pull/2345, https://github.com/coreshop/CoreShop/pull/2352, https://github.com/coreshop/CoreShop/pull/2321, https://github.com/coreshop/CoreShop/pull/2347) + +## Pimcore 10.6 + +If you update to Pimcore 10.6 and you get following +error: ```"You have requested a non-existent parameter "coreshop.model.user.class"``` then check if you have this config +in your `security.yaml`: + +```yaml +pimcore: + security: + encoder_factories: + ‘%coreshop.model.user.class%’: coreshop.security.user.password_encoder_factory +``` + +If you have that, remove that entry. CoreShop internally sets that anyway. + +Also check the priority of which the `CoreShopCoreBundle` gets loaded. It has to be loaded before Pimcore, so set the +priority to '1000': + +```php +addBundle(new \CoreShop\Bundle\CoreBundle\CoreShopCoreBundle(), 1000); + } +} +``` + +## 3.0.x + +### 3.0.4 + +#### Bugs + +- [PimcoreBundle] fix SluggableLinkGenerator DI Config (https://github.com/coreshop/CoreShop/pull/2218) +- [CoreBundle] Fix Grid Column Config (https://github.com/coreshop/CoreShop/pull/2215) +- [CoreBundle] Improve payment detail rendering (https://github.com/coreshop/CoreShop/pull/2207) +- [CoreBundle] Move Cart Subtotal Calculation To Dedicated Cart + Processor (https://github.com/coreshop/CoreShop/pull/2205) +- [FrontendBundle] fix only showing customer orders and not cars too (https://github.com/coreshop/CoreShop/pull/2201) +- [IndexBundle] check recursively child elements (https://github.com/coreshop/CoreShop/pull/2200) +- [CoreBundle] set corret store value attributes (https://github.com/coreshop/CoreShop/pull/2197) +- [Core] allow decoration of StackRepository (https://github.com/coreshop/CoreShop/pull/2196) +- [CoreBundle] surcharge is possible to be more than item value (https://github.com/coreshop/CoreShop/pull/2192) +- [ShippingBundle] allow min.amount from to be 0 (https://github.com/coreshop/CoreShop/pull/2195) +- [Payum] don't use dev version (https://github.com/coreshop/CoreShop/pull/2193) + +### 3.0.3 + +- Feature + - [StorageList] allow for shareable StorageLists (eg. wishlist) (https://github.com/coreshop/CoreShop/pull/2150) + +- Bugs + - [StorageListItem] add definitive StorageList (Order/Wishlist) field to + Item (https://github.com/coreshop/CoreShop/pull/2117) + - [FrontendBundle] keep a reference to the just-removed Product (https://github.com/coreshop/CoreShop/pull/2125) + - [MessengerBundle] only allow to list ListableReceiverInterface (https://github.com/coreshop/CoreShop/pull/2127) + - [MessengerBundle] standalone fixes (https://github.com/coreshop/CoreShop/pull/2130) + - [Slug] improve slug generation and don't store slugs for every site if the + same (https://github.com/coreshop/CoreShop/pull/2131) + - [MoneyBundle] fix issue with not-nullable types and null values (https://github.com/coreshop/CoreShop/pull/2138) + - [Resource] add return types for BigIntIntegerType (https://github.com/coreshop/CoreShop/pull/2140) + - [LinkGeneration] introduce possibility to disable slugs and use fallback + routes (https://github.com/coreshop/CoreShop/pull/2143) + - [Payum] use stable payum release (https://github.com/coreshop/CoreShop/pull/2141) + - [FrontendBundle] use asset() helper for logo image (https://github.com/coreshop/CoreShop/pull/2137) + - [CoreBundle] Fix migration for price_rules in OrderItem class (https://github.com/coreshop/CoreShop/pull/2145) + - [CoreBundle] Add layout price_rules only once to OrderItem (https://github.com/coreshop/CoreShop/pull/2148) + - [StorageList & Slug] fixes for shared wishlist & slugs (https://github.com/coreshop/CoreShop/pull/2151) + - [CoreBundle] Use valid key in user migration (https://github.com/coreshop/CoreShop/pull/2159) + - [CoreBundle] fix price_rule migration section (https://github.com/coreshop/CoreShop/pull/2160) + - [StorageList] Fix SessionStorageManager (https://github.com/coreshop/CoreShop/pull/2165) + - [IndexBundle] check if index value is null before exploding (https://github.com/coreshop/CoreShop/pull/2163) + - [IndexBundle] process children within same Handler (https://github.com/coreshop/CoreShop/pull/2171) + +### 3.0.2 + +> Please make sure you also start the messenger worker for the CoreShop Tasks +> ```bin/console messenger:consume coreshop_notification coreshop_index --time-limit=300``` + +- Features + - [Messenger] introduce Messenger + Bundle (https://github.com/coreshop/CoreShop/pull/2105, https://github.com/coreshop/CoreShop/pull/2114, https://github.com/coreshop/CoreShop/pull/2112, https://github.com/coreshop/CoreShop/pull/2106) + +- Bugs + - [CartPiceRules] fix OrderItem not finding Order with + CartItemPriceRules (https://github.com/coreshop/CoreShop/pull/2116) + - [StorageList] fix storage-list priority (https://github.com/coreshop/CoreShop/pull/2113) + - [ResourceBundle] class names with lower-case names (https://github.com/coreshop/CoreShop/pull/2097) + - [Checkout] introduce Payment Provider Validator to check if the selected one is still + valid (https://github.com/coreshop/CoreShop/pull/2111) + - [Unit] fix issues with unit selection in ui (https://github.com/coreshop/CoreShop/pull/2104) + - [CustomerAssignment] Fix typo when passing the company ID to the + router (https://github.com/coreshop/CoreShop/pull/2102) + - [CoreBundle] fix cart-item-rule discount action form (https://github.com/coreshop/CoreShop/pull/2101) + - [IndexBundle] fix: index table o_classId type fix (https://github.com/coreshop/CoreShop/pull/2095) + - [Menu] Use correct permission definition for product unit menu + item (https://github.com/coreshop/CoreShop/pull/2094) + +## 3.0.1 + +- Bugs + - [Translations] fix order object translations (https://github.com/coreshop/CoreShop/pull/2091) + - [Psalm] fixes (https://github.com/coreshop/CoreShop/pull/2089) + - [CustomerTransformHelper] Use company's name initial as parent folder for + companies (https://github.com/coreshop/CoreShop/pull/2082) + - [StorageListBundle] PimcoreStorageListRepository: Comply to PSR-4 autoloading + standards (https://github.com/coreshop/CoreShop/pull/2081) + - [ProductVariantTrait] Prevent MySQL syntax error (https://github.com/coreshop/CoreShop/pull/2086) + - [Wishlist] add tests and fix routing (https://github.com/coreshop/CoreShop/pull/2084) + +## 3.0.0 + +CoreShop is now Licenced under CCL and GPLv3! (https://github.com/coreshop/CoreShop/pull/2061) + +- Feature + - [IndexBundle] clone index, change default name of cloned item (https://github.com/coreshop/CoreShop/pull/2056) + - [CartPriceRules] introduce feature to allow cart-price rules based on + cart-items (https://github.com/coreshop/CoreShop/pull/2057, https://github.com/coreshop/CoreShop/pull/2060) + - [Wishlist] Introduce a persisted wishlist - StorageListBundle now works as a base for Order and + Wishlist (https://github.com/coreshop/CoreShop/pull/2030, https://github.com/coreshop/CoreShop/pull/2066) + - [Reports] Support filtering for order type (https://github.com/coreshop/CoreShop/pull/2055) + - [Symfony] fix Injecting @session is deprecated with Symfony (https://github.com/coreshop/CoreShop/pull/2035) + - [AccessManagement] prepare CoreShop for advanced + access-management (https://github.com/coreshop/CoreShop/pull/2063) + - [Pimcore] 10.5 as min requirement (https://github.com/coreshop/CoreShop/pull/2067) + +- Bugs + - [VariantBundle] Serializer: Allow `$innerObject` to be + null (https://github.com/coreshop/CoreShop/pull/2058, https://github.com/coreshop/CoreShop/pull/2069) + - [DataHub] Fix non unique typename (https://github.com/coreshop/CoreShop/pull/2004) + - [Translations] Update admin-translations.yml (https://github.com/coreshop/CoreShop/pull/2064) + - [Pimcore UI] Make default Product Unit unselectable (https://github.com/coreshop/CoreShop/pull/2065) + - [Variant] allow recursive attributes and variants (https://github.com/coreshop/CoreShop/pull/2068) + +### 3.0.0-beta.5 + +> This will be the last BETA for the final release. + +- Bugs + - [Frontend] fix controller overwriting (https://github.com/coreshop/CoreShop/pull/2017) + - Replaced old Registration Service with Customer Manager (https://github.com/coreshop/CoreShop/pull/2020) + - Update install guide while it is in beta (https://github.com/coreshop/CoreShop/pull/2019) + - [Frontend] fix getQuantityModifier return type (https://github.com/coreshop/CoreShop/pull/2024) + - Fix TagManagerEnhancedEcommerce (https://github.com/coreshop/CoreShop/pull/2027) + - [ProductBundle] fix saving of Price Rule Conditions and Actions when + creating (https://github.com/coreshop/CoreShop/pull/2029) + - [FrontendBundle] Consider UrlSlugs in the locale switcher (https://github.com/coreshop/CoreShop/pull/2032) + - [DB] Remove Migrate and ClassUpdate rename and fix psalm issues (https://github.com/coreshop/CoreShop/pull/2034) + - fix: property must not be accessed before initialization (https://github.com/coreshop/CoreShop/pull/2036) + - [MoneyBundle] bugfix unmarshalVersion for coreShopMoney (https://github.com/coreshop/CoreShop/pull/2037) + - [ThemeBundle] add document pre_renderer listener to resolve theme (https://github.com/coreshop/CoreShop/pull/2041) + - [OrderBundle] fix "coreshop_admin_order_find" route (https://github.com/coreshop/CoreShop/pull/2045) + - [Pimcore] add tests for ^10.5 (https://github.com/coreshop/CoreShop/pull/2043) + - [Events] fix pimcore events BC break (https://github.com/coreshop/CoreShop/pull/2046) + - [Tests] test against pimcore ^11.0 (https://github.com/coreshop/CoreShop/pull/2047) + - [CoreBundle] add typecasts for MoneyFormatter in Reports, bugfix + SQL (https://github.com/coreshop/CoreShop/pull/2048) + - [MoneyBundle] bugfix marshalVersion for coreShopMoney (https://github.com/coreshop/CoreShop/pull/2051) + - [MoneyBundle] bugfix setter code for FieldCollection (https://github.com/coreshop/CoreShop/pull/2052) + - [CoreBundle] check for null value in + CartStockAvailabilityValidator (https://github.com/coreshop/CoreShop/pull/2053) + +### 3.0.0-beta.4 + +- Feature + - [Variants] introduce Variant Bundle (https://github.com/coreshop/CoreShop/pull/1990) @breakone + - [Pimcore] require min 10.4 (https://github.com/coreshop/CoreShop/pull/2013) + +- Bugs + - [Store] add Store Resolver for document save from Pimcore Admin (https://github.com/coreshop/CoreShop/pull/1962) + - [ResourceBundle] add feature to clone resources (https://github.com/coreshop/CoreShop/pull/1965) + - [CartPriceRules] fix cart-price-rules with over 100% discount (https://github.com/coreshop/CoreShop/pull/1966) + - [Tests] re-enable cart tests (https://github.com/coreshop/CoreShop/pull/1970) + - [FrontendBundle] fix: paginator.html.twig prepends four spaces to + URLs (https://github.com/coreshop/CoreShop/pull/1968) + - [IndexBundle] fix Argument #2 (`$values`) must be of type array, string + given (https://github.com/coreshop/CoreShop/pull/1967) + - [CoreBundle] use themeHelper to resolve template in + StoreMailActionProcessor (https://github.com/coreshop/CoreShop/pull/1973) + - [Condition] fix rules being active even if inactive when having no + conditions (https://github.com/coreshop/CoreShop/pull/1977) + - [CoreBundle] Handle null addresses when persisting customers (https://github.com/coreshop/CoreShop/pull/1979) + - [ResourceBundle] fix ResourceSettingsController getConfigAction (https://github.com/coreshop/CoreShop/pull/1981) + - [CoreBundle] fix registered user validator (https://github.com/coreshop/CoreShop/pull/1980) + - [CustomerBundle] fix: wiring non-existing User classes which were migrated to + CustomerBundle (https://github.com/coreshop/CoreShop/pull/1984) + - [CoreBundle] Remove duplicate assignment (https://github.com/coreshop/CoreShop/pull/1985) + - [CoreBundle] Fix Typo in notifcation.yml (https://github.com/coreshop/CoreShop/pull/1988) + - [ResourceBundle] Fix grid view for orders/quotes/carts in admin (https://github.com/coreshop/CoreShop/pull/1989) + - [OrderBundle] Fix for order grid configs (https://github.com/coreshop/CoreShop/pull/1992) + - [Taxation] pass context into TaxCalculatorFactory (https://github.com/coreshop/CoreShop/pull/1978) + - [CoreBundle] use TaxationDisplayProvider in CarrierChoiceType (https://github.com/coreshop/CoreShop/pull/1994) + - [CoreBundle] Fix newsletter double opt in mail not sending (https://github.com/coreshop/CoreShop/pull/1993) + - [CoreBundle] added newline before phoneNumber in CountryFixture (https://github.com/coreshop/CoreShop/pull/1995) + - [CoreBundle] fix variant js, added variant select template (https://github.com/coreshop/CoreShop/pull/1997) + - [Checkout] change thank-you to work with token and fix strict samesite + cookies (https://github.com/coreshop/CoreShop/pull/1999) + - [Variant] add concrete return type to ui configuration (https://github.com/coreshop/CoreShop/pull/1996) + - [CoreBundle] fix event listeners for variants (https://github.com/coreshop/CoreShop/pull/2000) + - [Rule] use tags for TraceableRuleConditionsValidationProcessor (https://github.com/coreshop/CoreShop/pull/2002) + - [Guest] improve guest checkout to change address or use different one for + shipping (https://github.com/coreshop/CoreShop/pull/2003) + - [CoreBundle] use the index for categories to allow fine tuning the + menus (https://github.com/coreshop/CoreShop/pull/1915) + - [Pimcore] add dirname() and basename() to expression function + provider (https://github.com/coreshop/CoreShop/pull/2007) + - [Product Model] Allow getIndexableName() to return null (https://github.com/coreshop/CoreShop/pull/2009) + - [Doctrine] Use doctrine-extension 3.6.0 (https://github.com/coreshop/CoreShop/pull/2012) + +### 3.0.0-beta.3 + +- [IndexBundle] fix: generate the correct menu route (https://github.com/coreshop/CoreShop/pull/1815) +- [All] rename document coreshop editables (https://github.com/coreshop/CoreShop/pull/1822) +- [CoreBundle] Fix fetch of checkout_finisher url from request (https://github.com/coreshop/CoreShop/pull/1814) +- [FrontendBundle] Fix "Invoice Address is Shipping Address" in checkout address + step (https://github.com/coreshop/CoreShop/pull/1823) +- [CoreBundle] Add address parent check (https://github.com/coreshop/CoreShop/pull/1825) +- [Core] add is_null in isNewEntity for Customer (https://github.com/coreshop/CoreShop/pull/1830) +- [IndexBundle] add boolean filter condition (https://github.com/coreshop/CoreShop/pull/1834) +- [IndexBundle] add clear button for filter preSelect combos (https://github.com/coreshop/CoreShop/pull/1833) +- [OrderBundle] fix session cart subscriber when no session is + available (https://github.com/coreshop/CoreShop/pull/1836) +- [OrderBundle] cart context returns latest cart even if multiple found (https://github.com/coreshop/CoreShop/pull/1800) +- [ResourceBundle] fix resource list calling Pimcore Event and CoreShop Event to open + object (https://github.com/coreshop/CoreShop/pull/1838) +- [CoreBundle] Fix doctrine type in migration (followup of #1839) (https://github.com/coreshop/CoreShop/pull/1840) +- [List] fix open CoreShop Entry and Pimcore DataObject (https://github.com/coreshop/CoreShop/pull/1845) +- [Cache] optimize Pimcore cache with doctrine entities (https://github.com/coreshop/CoreShop/pull/1843) +- [FrontendBundle] fix: Since symfony/http-kernel 5.1: Referencing controllers with a single colon is + deprecated (https://github.com/coreshop/CoreShop/pull/1848/commits) +- [IndexBundle] Migrate to SettingsStoreAwareInstaller (https://github.com/coreshop/CoreShop/pull/1847) +- [FrontendBundle] Make category sort options configurable (https://github.com/coreshop/CoreShop/pull/1850) +- [Theme] fallback to SettableThemeContext (https://github.com/coreshop/CoreShop/pull/1851) +- [PimcoreBundle] added SluggableSlugger for SluggableListener (https://github.com/coreshop/CoreShop/pull/1857) +- [Pimcore] Definition Updater: check if we should use 'childs' or ' + children' (https://github.com/coreshop/CoreShop/pull/1858) +- [Core] address assignment manager should check for null (https://github.com/coreshop/CoreShop/pull/1863) +- [IndexBundle] decimal should be 10,2 (https://github.com/coreshop/CoreShop/pull/1862) +- [IndexBundle] QuantityValue ID's are strings (https://github.com/coreshop/CoreShop/pull/1861) +- [IndexBundle] Add pimcore.dataobject.postAdd event to index + DataObjects (https://github.com/coreshop/CoreShop/pull/1866) +- [PaymentBundle] Added payum payment model fields to coreshop payment + model (https://github.com/coreshop/CoreShop/pull/1854) +- [Taxation] add taxRate to TaxItemInterface (https://github.com/coreshop/CoreShop/pull/1867) +- [CoreBundle] fix quote notification sending (https://github.com/coreshop/CoreShop/pull/1868) +- [CoreBundle] fix quote notification sending 3.x (https://github.com/coreshop/CoreShop/pull/1869) +- [FrontendBundle] fix createQuoteAction (https://github.com/coreshop/CoreShop/pull/1870) +- [IndexBundle] FIX:double click on field group adds them to indices (https://github.com/coreshop/CoreShop/pull/1871) +- [CoreBundle] fix user-reset password notification sending (https://github.com/coreshop/CoreShop/pull/1877) +- [IndexBundle] FIX: localized fields from brick and fieldcollections can be added to + index (https://github.com/coreshop/CoreShop/pull/1872) +- [CurrencyBundle] fix exchange rate saving/deleting (https://github.com/coreshop/CoreShop/pull/1879) +- [PaymentBundle] FIX: coreshop_payment_provider editable select, wrong property + name (https://github.com/coreshop/CoreShop/pull/1883) +- [ResourceBundle] Make stack of classes not extended in CoreBundle + working (https://github.com/coreshop/CoreShop/pull/1882) +- [IndexBundle] FIX: select from multiselect throws error if no value is + pre-selected (https://github.com/coreshop/CoreShop/pull/1880) +- [ThemeBundle] improve loading theme when document cannot be loaded (https://github.com/coreshop/CoreShop/pull/1884) +- [ResourceBundle] fix entity-merger to delete collection entries (https://github.com/coreshop/CoreShop/pull/1887) +- [ProductBundle] fix translations (https://github.com/coreshop/CoreShop/pull/1888) +- [IndexBundle] fixed issue 1891, fix totalCount for pagination (https://github.com/coreshop/CoreShop/pull/1892) +- [UserBundle] Email field required on request reset password form (https://github.com/coreshop/CoreShop/pull/1893) +- [FrontendBundle] Category select template fix (https://github.com/coreshop/CoreShop/pull/1890) +- [IndexBundle] category multiselect (https://github.com/coreshop/CoreShop/pull/1899) +- [IndexBundle] extending condition proccesor adds empty tag (https://github.com/coreshop/CoreShop/pull/1900) +- [OrderBundle] Error during serialization of OrderInvoice (https://github.com/coreshop/CoreShop/pull/1903) +- [CoreBundle] don't load settings if user has no permission (https://github.com/coreshop/CoreShop/pull/1902) +- [NotificationBundle] Fixed invoice, payment, shipment state condition in + notifications (https://github.com/coreshop/CoreShop/pull/1905) +- [CoreBundle] Order mail note fix (https://github.com/coreshop/CoreShop/pull/1906) +- [ShippingBundle] Removed free shipping checkbog from carrier (https://github.com/coreshop/CoreShop/pull/1910) +- [FrontendBundle] logo in _header.html.twig no longer hardcoded (https://github.com/coreshop/CoreShop/pull/1908) +- [ProductBundle] duplicated unit definition title in product view in + admin (https://github.com/coreshop/CoreShop/pull/1894/files) +- [OrderBundle] Fix xvfb error (https://github.com/coreshop/CoreShop/pull/1911) +- [FrontendBundle] fix: paginator prev/next links point to first/last + page (https://github.com/coreshop/CoreShop/pull/1923) +- [CoreBundle] fix currency conversion (https://github.com/coreshop/CoreShop/pull/1889) +- [FrontendBundle] fix: use only first-level categories in CategoryController:: + menuAction (https://github.com/coreshop/CoreShop/pull/1914) +- [FrontendBundle] fix configuration for controller names (https://github.com/coreshop/CoreShop/pull/1919) +- [IndexBundle] don't lower-case interpreter types (https://github.com/coreshop/CoreShop/pull/1925) +- [IndexBundle] Category multiselect filter condition (https://github.com/coreshop/CoreShop/pull/1909) +- [PimcoreBundle] make command "coreshop:app:migration:generate" not + hidden (https://github.com/coreshop/CoreShop/pull/1927) +- [Installer] mark migrations as migrated in the installer (https://github.com/coreshop/CoreShop/pull/1928) +- [IndexBundle] fix saving quantity values for index conditions ([IndexBundle] fix saving quantity values for index + conditions) +- [IndexBundle] Search filter (https://github.com/coreshop/CoreShop/pull/1924) +- [NotificationBundle] fix reloading of Notification Conditions/Actions (https://github.com/coreshop/CoreShop/pull/1930) +- [Slug] fallback to ID if nameForSlug is null (https://github.com/coreshop/CoreShop/pull/1932) +- [ResourceBundle] fix creating static routes (https://github.com/coreshop/CoreShop/pull/1934) +- [FrontendBundle] Cart update and checkout validation for cart (https://github.com/coreshop/CoreShop/pull/1920) +- [FrontendBundle] fix styling of reset-password-request submit button (https://github.com/coreshop/CoreShop/pull/1935) +- [ProductBundle] fix ProductUnitDefinition unmarshal (https://github.com/coreshop/CoreShop/pull/1936) +- [Routing] fix route name coreshop_cart_create_quote (https://github.com/coreshop/CoreShop/pull/1937) +- [IndexBundle] Search filter dynamic name (https://github.com/coreshop/CoreShop/pull/1938) +- [IndexBundle] Fixed wrong categories returned when concatenator is + AND (https://github.com/coreshop/CoreShop/pull/1939) +- [CoreBundle] Profiler fix (https://github.com/coreshop/CoreShop/pull/1941) +- [FrontendBundle] Fix redirect to profile if customer is present (https://github.com/coreshop/CoreShop/pull/1942/files) +- [MoneyBundle] allow Money to be nullable (https://github.com/coreshop/CoreShop/pull/1949) +- [Pimcore] use min Pimcore 10.3 and fix tests ([Pimcore] use min Pimcore 10.3 and fix tests) +- [Quotes] introduce simple state machine (https://github.com/coreshop/CoreShop/pull/1948) +- [FrontendBundle] Add submit buttons for voucher submit and form update in cart + form (https://github.com/coreshop/CoreShop/pull/1950) +- [NotificationBundle] fix saving multiple emails (https://github.com/coreshop/CoreShop/pull/1954) +- + +### 3.0.0-beta.2 + +- [Order] remove unused CartRepository (https://github.com/coreshop/CoreShop/pull/1801) +- [PimcoreBundle] add coreshop:migration:migrate and coreshop:migration: + generate (https://github.com/coreshop/CoreShop/pull/1802) +- [FrontendBundle] fix new form namespace (https://github.com/coreshop/CoreShop/pull/1807) +- [Index] make ListingInterface a Pimcore PaginateListingInterface (https://github.com/coreshop/CoreShop/pull/1790) +- [Cart] fix existing cart initialization on customer login (https://github.com/coreshop/CoreShop/pull/1779) +- [CoreBundle] fix saving stores in PaymentProvider (https://github.com/coreshop/CoreShop/pull/1783) +- [Index] make IndexProcess compatible with the interface (https://github.com/coreshop/CoreShop/pull/1782) +- [User] remove md5 password and use password_hash (https://github.com/coreshop/CoreShop/pull/1780) +- [ThemeBundle] refactor theme-context to work with area-bricks (https://github.com/coreshop/CoreShop/pull/1778) +- [ThemeBundle] remove sylius theme-aware-translator, that doesn't work well with + Pimcore (https://github.com/coreshop/CoreShop/pull/1777) +- [ResourceBundle] allow easier custom resources (https://github.com/coreshop/CoreShop/pull/1776) +- [Index] remove dbal connection in AbstractListing (https://github.com/coreshop/CoreShop/pull/1769) +- [Store select / multiselect] Support getOptions() via option provider (https://github.com/coreshop/CoreShop/pull/1773) +- [CoreExtensions] refactor how Doctrine Entities are cloned (https://github.com/coreshop/CoreShop/pull/1770) +- [Faker] use fakerphp/faker (https://github.com/coreshop/CoreShop/pull/1768) +- [CoreBundle] remove duplicate paymentTotal and convertedPaymentTotal from class + definition (https://github.com/coreshop/CoreShop/pull/1766) +- [OrderBundle] fix admin en translations (https://github.com/coreshop/CoreShop/pull/1764) +- [All] remove installed translations and use symfony translations + instead (https://github.com/coreshop/CoreShop/pull/1762) + +### 3.0.0-beta.1 + +- PHP8.0 Return Types (https://github.com/coreshop/CoreShop/pull/1288, https://github.com/coreshop/CoreShop/pull/1666) +- Cart eq Order eq Quote - one Object to rule them all (https://github.com/coreshop/CoreShop/pull/1289) +- Strict Types (https://github.com/coreshop/CoreShop/pull/1294) +- make service-aliases deprecated and change all internal uses of it (https://github.com/coreshop/CoreShop/pull/1320) +- change IndexableInterface and pass IndexInterface (https://github.com/coreshop/CoreShop/pull/1326) +- remove php template helpers (https://github.com/coreshop/CoreShop/pull/1323) +- [Panther] Implement + ui-tests (https://github.com/coreshop/CoreShop/pull/1335, https://github.com/coreshop/CoreShop/pull/1347) +- introduce class translations (https://github.com/coreshop/CoreShop/pull/1349) +- change cart/order base-currency conversion (https://github.com/coreshop/CoreShop/pull/1324) +- Allow to create a new Customer within the order-creation Process (https://github.com/coreshop/CoreShop/pull/1236) +- introduce currency fraction display provider service (https://github.com/coreshop/CoreShop/pull/1394) +- introduce tax-display service (https://github.com/coreshop/CoreShop/pull/1393) +- integration to dachcom-digital/pimcore-seo (https://github.com/coreshop/CoreShop/pull/1399) +- remove usage of ItemKeyTransformer Service and use DataObject\Service + directly (https://github.com/coreshop/CoreShop/pull/1411) +- create default address if customer doesn't have one (https://github.com/coreshop/CoreShop/pull/1435) +- apply confirm and pay transition for orders with value of 0 (https://github.com/coreshop/CoreShop/pull/1434) +- resolve theme only if not in admin (https://github.com/coreshop/CoreShop/pull/1505) +- Pimcore X + Compatibility (https://github.com/coreshop/CoreShop/pull/1511, https://github.com/coreshop/CoreShop/pull/1574, https://github.com/coreshop/CoreShop/pull/1599, https://github.com/coreshop/CoreShop/pull/1621) +- migrate to sylius/theme-bundle (https://github.com/coreshop/CoreShop/pull/1513) +- implement new JS Routing and start with first backend tests (https://github.com/coreshop/CoreShop/pull/1420) +- some JMS fixes and payum concurrency test (https://github.com/coreshop/CoreShop/pull/1550) +- cleanup proposal stuff and fix serialization of Doctrine collections (https://github.com/coreshop/CoreShop/pull/1641) +- migrate migrations to Doctrine Migrations Bundle (https://github.com/coreshop/CoreShop/pull/1635) +- Feature/customer list (https://github.com/coreshop/CoreShop/pull/1667) +- Fix merge for index-conditions (https://github.com/coreshop/CoreShop/pull/1673) +- fix voucher modifier with empty voucher code (https://github.com/coreshop/CoreShop/pull/1672) +- [ResourceBundle] fix unserialization of CoreShop entities saved by pimcore auto + save (https://github.com/coreshop/CoreShop/pull/1674) +- split customer and user into seperate entities (https://github.com/coreshop/CoreShop/pull/1669) +- add proper events for cart-item add and remove (https://github.com/coreshop/CoreShop/pull/1676) +- Introduce a folder creation service which loads the paths directly from the + metadata (https://github.com/coreshop/CoreShop/pull/1677) +- Introduce payum payment bundle (https://github.com/coreshop/CoreShop/pull/1675) +- [Slug] default generate slugs and use instead of static routes for product and + category (https://github.com/coreshop/CoreShop/pull/1678, https://github.com/coreshop/CoreShop/pull/1701) +- [FrontendBundle] Macro "price" is not defined in template (https://github.com/coreshop/CoreShop/pull/1684) +- [SEO - ImageExtractor] Add thumbnail definition coreshop_seo (https://github.com/coreshop/CoreShop/pull/1688) +- [Shipping] Ability to hide carrier from checkout (https://github.com/coreshop/CoreShop/pull/1693) +- [Psalm] Introduce Psaml Tests for Components (https://github.com/coreshop/CoreShop/pull/1727) +- Removed security.yaml, since Pimcore 10, you have to define the security config yourself, just copy following to + config/packages/security.yaml (https://github.com/coreshop/CoreShop/pull/1599) + +```yaml +parameters: + coreshop.security.frontend_regex: "^/(?!admin)[^/]++" + +security: + providers: + coreshop_customer: + id: CoreShop\Bundle\CoreBundle\Security\ObjectUserProvider + firewalls: + coreshop_frontend: + anonymous: ~ + provider: coreshop_customer + pattern: '%coreshop.security.frontend_regex%' + context: shop + form_login: + login_path: coreshop_login + check_path: coreshop_login_check + provider: coreshop_customer + failure_path: coreshop_login + default_target_path: coreshop_index + use_forward: false + use_referer: true + remember_me: + secret: "%secret%" + name: APP_CORESHOP_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: coreshop_logout + target: coreshop_login + invalidate_session: false + success_handler: CoreShop\Bundle\CoreBundle\EventListener\ShopUserLogoutHandler + + access_control: + - { path: "%coreshop.security.frontend_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] } + - { path: "%coreshop.security.frontend_regex%/_partial", role: ROLE_NO_ACCESS } + +``` + +## 2.2.x + +### 2.2.14 + +- Bugs: + - [ProductQuantityPriceRules] remove variable variables sign (https://github.com/coreshop/CoreShop/pull/1991) + +### 2.2.13 + +- Bugs: + - [ResourceBundle] fix ResourceSettingsController getConfigAction (https://github.com/coreshop/CoreShop/pull/1981) + +### 2.2.12 + +- Bugs: + - [FrontendBundle] Fix "Invoice Address is Shipping Address" in checkout address + step (https://github.com/coreshop/CoreShop/pull/1823) + - [OrderBundle] cart context returns latest cart even if multiple + found (https://github.com/coreshop/CoreShop/pull/1837) + - [FrontendBundle] Password reset: Clearer form labels (https://github.com/coreshop/CoreShop/pull/1855) + - [ResourceBundle] Fatal error when saving object with product-specific prices -> EntityMerger got object of wrong + class (https://github.com/coreshop/CoreShop/pull/1864) + - [ProductBundle] Add isEqual() for product-specific price (https://github.com/coreshop/CoreShop/pull/1844) + - [Pimcore] Fix delete icons in Pimcore backend (https://github.com/coreshop/CoreShop/pull/1885) + +### 2.2.11 + +- Bugs: + - [CoreExtensions] refactor how Doctrine Entities are cloned (https://github.com/coreshop/CoreShop/pull/1770) + - [Frontend] After renaming formtypes with coreshop[], form elements where not + found (https://github.com/coreshop/CoreShop/pull/1791) + - [Checkout] fix new form namespace (https://github.com/coreshop/CoreShop/pull/1807) + +### 2.2.10 + +- Bugs: + - [Shipping] make shipping calculation more independent from cart (https://github.com/coreshop/CoreShop/pull/1562) + - [PaymentBundle] Add PaymentProvider Multiselect CoreExtension (https://github.com/coreshop/CoreShop/pull/1585) + - [Address] prevent empty lines in address formatter (https://github.com/coreshop/CoreShop/pull/1587/files) + - [Core] remove country-aware currency context as it messes with the Storage Based Currency + Context (https://github.com/coreshop/CoreShop/pull/1588) + - [DoctrineCache] remove doctrine cache and all usages of useQueryCache and + useResultCache (https://github.com/coreshop/CoreShop/pull/1596) + - [FrontendBundle] use named forms where applicable (https://github.com/coreshop/CoreShop/pull/1597) + - [All] Add italian translations for validators (https://github.com/coreshop/CoreShop/pull/1595) + - [PaymentBundle] Fix provider multiselect (https://github.com/coreshop/CoreShop/pull/1601) + - [IndexBundle] Fix range filter to work if min/max value = 0 (https://github.com/coreshop/CoreShop/pull/1606) + - [Docs] Fixed typo (https://github.com/coreshop/CoreShop/pull/1608) + - [FrontendBundle] clear password reset hash after reset (https://github.com/coreshop/CoreShop/pull/1631) + - [ShippingBundle] fix configuration (https://github.com/coreshop/CoreShop/pull/1632) + - [PimcoreBundle] fix missing Multiselect (https://github.com/coreshop/CoreShop/pull/1614) + - [Fixtures] fix region_short for address format (https://github.com/coreshop/CoreShop/pull/1636) + - [Docs] Add missing process conditions in docs (https://github.com/coreshop/CoreShop/pull/1643) + - [FrontendBundle] fix having unique form-ids for cart add (https://github.com/coreshop/CoreShop/pull/1648) + - [Core] fix cloning and serializing (with DeepCopy) of + UnitDefinitions (https://github.com/coreshop/CoreShop/pull/1649) + - [Tracking] enable auto-configuration and auto-wiring with + configuration (https://github.com/coreshop/CoreShop/pull/1656) + - [Rule] refactor Rule conditions and actions persistence (https://github.com/coreshop/CoreShop/pull/1657) + - [OrderBundle] fix pagination in voucher codes and add pagination for csv + export (https://github.com/coreshop/CoreShop/pull/1662) + - [CoreBundle] remove zones from shipping rules installer (https://github.com/coreshop/CoreShop/pull/1664) + - [IndexBundle] add feature to rename tables when index get's + renamed (https://github.com/coreshop/CoreShop/pull/1663) + - [FrontendBundle] Print cart price rule label instead name if + available (https://github.com/coreshop/CoreShop/pull/1668) + - [Tests] Add Pimcore ~6.9.0 in behat test matrix (https://github.com/coreshop/CoreShop/pull/1670) + - [CoreBundle] Use right permission for tax rate (https://github.com/coreshop/CoreShop/pull/1681) + - [SEO] Add thumbnail definition coreshop_seo (https://github.com/coreshop/CoreShop/pull/1688) + - [Core] Fix: ProductRepository: Added missing placeholder (https://github.com/coreshop/CoreShop/pull/1708) + - [Docs] Quantity Price Rules (https://github.com/coreshop/CoreShop/pull/1716) + - [PimcoreBundle] super-select box readonly (https://github.com/coreshop/CoreShop/pull/1739) + +- Feature: + - [ProductQuantityPriceRules] add interface for QuantityPriceFetcher and + QuantityRuleFetcher (https://github.com/coreshop/CoreShop/pull/1628) + - [Payment] make payment description translatable (https://github.com/coreshop/CoreShop/pull/1633) + +### 2.2.9 + +- Bugs: + - [ResourceBundle] fix compatibility with Doctrine EventSubscriber (https://github.com/coreshop/CoreShop/pull/1580) + - [All] replace all usages of href with manyToOneRelation and multihref with + manyToManyRelation (https://github.com/coreshop/CoreShop/pull/1576) + - [OptimisticEntityLockBundle] fix version for Pimcore Extensions + UI (https://github.com/coreshop/CoreShop/pull/1577) + - [Models] strict defining of model trait methods (https://github.com/coreshop/CoreShop/pull/1578) + - [ProductBundle] use full unit definition label in choice field (https://github.com/coreshop/CoreShop/pull/1569) + - [ResourceBundle] check if instance is null before calling + class_implements (https://github.com/coreshop/CoreShop/pull/1566) + - [Admin] use form.Panel instead of form.FieldSet (panel supports + isDirty) (https://github.com/coreshop/CoreShop/pull/1561) + - [Resource] Provide Pimcore driver for Stack Repository (https://github.com/coreshop/CoreShop/pull/1567) + - [StoreBundle] fix cached store context decoration (https://github.com/coreshop/CoreShop/pull/1565) + - [Mailer] remove usages of PimcoreBundle\MailerInterface and fix interface + deprecation (https://github.com/coreshop/CoreShop/pull/1568) + +### 2.2.8 + +- Bugs: + - [OptimisticEntityLockBundle] fix Version loading with Composer v3 (https://github.com/coreshop/CoreShop/pull/1558) + +### 2.2.7 + +- Features: + - [OptimisticLock] allow to optimistically lock Pimcore DataObjects (https://github.com/coreshop/CoreShop/pull/1537) + - [Pimcore] introduce DataObjectBatchListing (https://github.com/coreshop/CoreShop/pull/1519) + +- Bugs: + - [Payment] Concurrency + issues (https://github.com/coreshop/CoreShop/issues/1536, https://github.com/coreshop/CoreShop/pull/1549) + - [Frontend] fix addressAccessType check and improve view (https://github.com/coreshop/CoreShop/pull/1544) + - [Payment] Payment Details can be null (https://github.com/coreshop/CoreShop/issues/1545) + - [ProductBundle] fix UnitDefinition without id (https://github.com/coreshop/CoreShop/pull/1547) + - [Order] fix payment provider (https://github.com/coreshop/CoreShop/pull/1548) + - [Payment] ignore failed payments in total amount check (https://github.com/coreshop/CoreShop/pull/1543) + - [Checkout] Fix checkout with addressAccessType COMPANY_ONLY (https://github.com/coreshop/CoreShop/pull/1526) + - [CompilerPass] rework compiler passes (simplify) (https://github.com/coreshop/CoreShop/pull/1535) + - [Admin Order detail] Carrier name not shown with legacy serialization of + Orders (https://github.com/coreshop/CoreShop/issues/1540) + - [composer2] make getVersion compatible (https://github.com/coreshop/CoreShop/pull/1539) + - [DynmicDropdown] support class override and fix order by id (https://github.com/coreshop/CoreShop/pull/1538) + - [DeepCopy] Order details are no longer + working (https://github.com/coreshop/CoreShop/issues/1507, https://github.com/coreshop/CoreShop/pull/1534) + - [OrderBundle] fix voucher code export (https://github.com/coreshop/CoreShop/pull/1530) + - [Resources] Reset Id on __ + clone (https://github.com/coreshop/CoreShop/issues/1501, https://github.com/coreshop/CoreShop/pull/1502) + - [Document] Document saving + failed (https://github.com/coreshop/CoreShop/issues/1498, https://github.com/coreshop/CoreShop/pull/1518) + - [Admin] fix payment details in backend order view (https://github.com/coreshop/CoreShop/pull/1525) + - [Notification] fix return of store on notification rule (https://github.com/coreshop/CoreShop/pull/1520) + - [Locale] Fix PSR-4 namespace (https://github.com/coreshop/CoreShop/pull/1509) + +- Docs: + - [Docs] add docu for product units (https://github.com/coreshop/CoreShop/pull/1551) + +- Tests: + - [Actions] add tests for packages (https://github.com/coreshop/CoreShop/pull/1542) + +### 2.2.6 + +- Bugs: + - [Product] fix cloning of ProductUnitDefinitions and add test for + it. (https://github.com/coreshop/CoreShop/pull/1502) + - [CoreBundle] interactive login: cart might not be available for several reasons, ignore exception and don't assign + a cart (https://github.com/coreshop/CoreShop/pull/1500) + +### 2.2.5 + +- Bugs: + - [OrderBundle] fix permission keys for order-creation (https://github.com/coreshop/CoreShop/pull/1474) + - [ProductBundle] fix persistance of spefiic-product-price-rule + label (https://github.com/coreshop/CoreShop/pull/1472) + - [OrderBundle] remove 'applyOn' from DiscountPercent and + SurchagePercent (https://github.com/coreshop/CoreShop/pull/1479) + - [QPR] Wrong Pseudo-Price in Grid-View (https://github.com/coreshop/CoreShop/issues/1488) + - [Pimcore] fix hasDefinition with + pimcore.implementation_loader.document.tag (https://github.com/coreshop/CoreShop/pull/1490) + - [OrderBundle, LocaleBundle] fix backend order-creation localeCode + selection (https://github.com/coreshop/CoreShop/pull/1481) + - [CoreBundle] fix setting price-values for inherited store-values (https://github.com/coreshop/CoreShop/pull/1491) + - [CoreBundle] don't set product for store-values on pre-get-data (https://github.com/coreshop/CoreShop/pull/1492) + +- Features: + - [Core] pass cart-item to price calculation context (https://github.com/coreshop/CoreShop/pull/1482) + - [Index] allow to define column config with index-extensions (https://github.com/coreshop/CoreShop/pull/1494) + +### 2.2.4 + +- Bugs: + - [CoreBundle] Don't validate maximum or minimum order quantity when value is + 0 (https://github.com/coreshop/CoreShop/issues/1467, https://github.com/coreshop/CoreShop/pull/1468) + - [Specific Price Rule] Unable to edit saved + rule (https://github.com/coreshop/CoreShop/issues/1437, https://github.com/coreshop/CoreShop/pull/1452) + - [Pimcore] Fix Ext Item Selector (https://github.com/coreshop/CoreShop/pull/1465) + - [Core, Order] fix surchage amount processor and remove apply-on (https://github.com/coreshop/CoreShop/pull/1462) + - [All] fix for copying data-objects with complex doctrine entities (https://github.com/coreshop/CoreShop/pull/1404) + - [CoreBundle] fix installation of address + format (https://github.com/coreshop/CoreShop/pull/1455, https://github.com/coreshop/CoreShop/issues/1432) + - [Orders] Unable to edit grid options to add/remove + fields (https://github.com/coreshop/CoreShop/issues/1438, https://github.com/coreshop/CoreShop/pull/1454) + - [Voucher] Voucher code generator returns always the same + code (https://github.com/coreshop/CoreShop/issues/1448, https://github.com/coreshop/CoreShop/pull/1451) + - [ProductBundle] fix serialization of translation labels in product-price + rules (https://github.com/coreshop/CoreShop/pull/1447) + +- Features: + - [OrderBundle] check if generation of a certain amount of codes is possible before actually generating + them (https://github.com/coreshop/CoreShop/pull/1456, https://github.com/coreshop/CoreShop/issues/1453) + +### 2.2.3 + +- Bugs: + - [FrontendBundle] apply confirm and pay transition for orders with value of + 0 (https://github.com/coreshop/CoreShop/pull/1442) + - [Core] create default address if customer doesn't have one (https://github.com/coreshop/CoreShop/pull/1444) + - [OrderBundle] Values should be zero, if amount should not be + defined (https://github.com/coreshop/CoreShop/pull/1443) + - [OrderBundle] Voucher Credit and Tax rounding issue (https://github.com/coreshop/CoreShop/pull/1441) + - [OrderBundle] Add currency property (https://github.com/coreshop/CoreShop/pull/1436) + - [Docs] Fix typo in the docs (https://github.com/coreshop/CoreShop/pull/1426) + - [CoreBundle] assert default address + type (https://github.com/coreshop/CoreShop/pull/1440, https://github.com/coreshop/CoreShop/issues/1257) + +- Features: + - [OrderBundle] Voucher Credit and Tax rounding issue (https://github.com/coreshop/CoreShop/pull/1441) + +### 2.2.2 + +- Bugs: + - [IndexBundle] fix range filter + condition (https://github.com/coreshop/CoreShop/pull/1416, https://github.com/coreshop/CoreShop/issues/1387) + - [OrderBundle] Fix currency formatting in sale detail related + components (https://github.com/coreshop/CoreShop/pull/1421) + - [OrderBundle] Fix order expire command (https://github.com/coreshop/CoreShop/pull/1422) + - [Product] re-add id reset on entity clone (https://github.com/coreshop/CoreShop/pull/1419) + - [ProductBundle] fix quantity price rule condition (https://github.com/coreshop/CoreShop/pull/1412) + - [Installer] fix output of thumbnail installer (https://github.com/coreshop/CoreShop/pull/1413) + - [IndexBundle] fix saving of nested + filters (https://github.com/coreshop/CoreShop/pull/1415, https://github.com/coreshop/CoreShop/issues/1414) + - [CoreBundle] fix typo in query condition to fetch product + variants (https://github.com/coreshop/CoreShop/pull/1418) + - [FrontendBundle] Fixed issue with saving address changes (https://github.com/coreshop/CoreShop/pull/1408) + - [RuleBundle] improve dirty detection (https://github.com/coreshop/CoreShop/pull/1410) + - [CurrencyBundle] fix cache issue with money-currency type (https://github.com/coreshop/CoreShop/pull/1406) + - [QuantityPriceRules] fix decimal precision + display (https://github.com/coreshop/CoreShop/pull/1398, https://github.com/coreshop/CoreShop/issues/1395) + +- Features: + - [FrontendBundle] add italian translations (https://github.com/coreshop/CoreShop/pull/1417) big thanks to + @ramundomario + +### 2.2.1 + +- Bugs: + - [CoreBundle] fix registration service (https://github.com/coreshop/CoreShop/pull/1391) + - [CoreBundle] fix validation groups (https://github.com/coreshop/CoreShop/pull/1390) + - [PimcoreBundle] Dynamic Dropdowns + Issues (https://github.com/coreshop/CoreShop/issues/1380, https://github.com/coreshop/CoreShop/pull/1382) + - [FrontendBundle] revert url-forward, doesn't work for all + cases (https://github.com/coreshop/CoreShop/pull/1386, https://github.com/coreshop/CoreShop/issues/1383) + +### 2.2.0 + +- Features: + - [Order] don't allow order-revise when completed payment has been + made (https://github.com/coreshop/CoreShop/pull/1334) + - [Order] persist internal cancellation reasons (https://github.com/coreshop/CoreShop/pull/1333) + - [Pimcore] require min 6.6 (https://github.com/coreshop/CoreShop/pull/1338) + - [GithubAction] add stan test (https://github.com/coreshop/CoreShop/pull/1341) + - [OrderBundle] show price rules without tax in backend (https://github.com/coreshop/CoreShop/pull/1346) + - [ThemeBundle] introduce theme + inheritance (https://github.com/coreshop/CoreShop/pull/1353, https://github.com/coreshop/CoreShop/pull/1359) + - [Order] introduce paymentTotal Property to store the rounded payment value with a precision of + 2 (https://github.com/coreshop/CoreShop/pull/1360) + - [Order] use Javascript intl for currency format (https://github.com/coreshop/CoreShop/pull/1366) + - [FrontendBundle] allow preview from admin-mode and redirect to right URL if + wrong (https://github.com/coreshop/CoreShop/pull/1367) + +- Bugs: + - [SecurityValidator] only trigger when Pimcore Frontend request (https://github.com/coreshop/CoreShop/pull/1339) + - [PimcoreBundle] Fix loading dynamic dropdown options (https://github.com/coreshop/CoreShop/pull/1340) + - [PimcoreBundle] fix dynamic dropdown extensions (https://github.com/coreshop/CoreShop/pull/1337) + - [PimcoreBundle] Fix data persistence for class definition and + database (https://github.com/coreshop/CoreShop/pull/1343) + - [PimcoreBundle] add dependency resolving (https://github.com/coreshop/CoreShop/pull/1348) + - [CoreBundle] add missing alias for taxed product price calculator (https://github.com/coreshop/CoreShop/pull/1355) + - [Migration] move migration before other migration in order to avoid missing db + columns (https://github.com/coreshop/CoreShop/pull/1356) + - [Payment] Revert "decouple Payment from Payum and consider decimal + factor" (https://github.com/coreshop/CoreShop/pull/1358) + - [Pimcore] fix getDataForEditmode (https://github.com/coreshop/CoreShop/pull/1361) + - [ThemeBundle] fix pimcore bc-break (https://github.com/coreshop/CoreShop/pull/1363) + - [Product] serialize stopPropogation property (https://github.com/coreshop/CoreShop/pull/1365) + - [Product] fix null value for pricing (https://github.com/coreshop/CoreShop/pull/1370) + - [ResourceBundle] ignore length for name of CoreShop doctrine assets (also fixes the error on + cancel) (https://github.com/coreshop/CoreShop/pull/1369) + - [CoreBundle] only show restore-inheritance when actually + inheritable (https://github.com/coreshop/CoreShop/pull/1368) + +### 2.2.0-RC.2 + +- Features: + - [IndexBundle] allow configuring if versions should be indexed or + not (https://github.com/coreshop/CoreShop/pull/1303) + - [IndexBundle] add possibility to store extra information into relational + table (https://github.com/coreshop/CoreShop/pull/1306) + - [Pimcore] Compatibility with Pimcore 6.5.3 (https://github.com/coreshop/CoreShop/pull/1310) + - [Shipping] Calculate shipping tax using cart items (https://github.com/coreshop/CoreShop/pull/1283) + - [Doctrine] remove usage of deprecated merge (https://github.com/coreshop/CoreShop/pull/1314) + - [Docs] Add Documentation for Unit Definitions (https://github.com/coreshop/CoreShop/pull/1312) + - [Payment] decouple Payment from Payum and consider decimal factor (https://github.com/coreshop/CoreShop/pull/1021) + - [Installer] change installer colors (https://github.com/coreshop/CoreShop/pull/1325) + - [Github Actions] introduce testing with Github Actions (https://github.com/coreshop/CoreShop/pull/1329) + +- Bugs: + - [CoreBundle] fix typo in validation groups and fix guest-registration + type (https://github.com/coreshop/CoreShop/pull/1304) + - [Frontend] Fixes the category items-per-page dropdown in the + frontend (https://github.com/coreshop/CoreShop/pull/1313) + - [Customer] fix missing username field (https://github.com/coreshop/CoreShop/pull/1315) + - [FrontendBundle/CoreBundle] prevent _fragment calls by using + ACL's (https://github.com/coreshop/CoreShop/pull/1309) + - [Reports] fix export params (https://github.com/coreshop/CoreShop/pull/1328) + +### 2.2.0 + +- Features: + - [Core] Implement Username/Email Login Identifier + @solverat (https://github.com/coreshop/CoreShop/issues/1290, https://github.com/coreshop/CoreShop/pull/1291) + - [Pimcore] require min Pimcore 6.5 (https://github.com/coreshop/CoreShop/pull/1286) + - [Core] Company - Customer Workflow + @solverat (https://github.com/coreshop/CoreShop/issues/1266, https://github.com/coreshop/CoreShop/pull/1284) + - [Scrutinizer] remove unused-code (https://github.com/coreshop/CoreShop/pull/1226) + - [STAN] fixes (https://github.com/coreshop/CoreShop/pull/1239) + - [PHPStan] level-3 (https://github.com/coreshop/CoreShop/pull/1220) + - [Pimcore] remove pimcore bc layers (https://github.com/coreshop/CoreShop/pull/1221) + - [CoreBundle] support version marshall und unmarshall to merge with existing + data (https://github.com/coreshop/CoreShop/pull/1145) +- Bugs: + - [CoreExtensions] fix issue with CoreShop CoreExtensions Recycle + Bin (https://github.com/coreshop/CoreShop/pull/1254) + +## 2.1.x + +### 2.1.9 + +- Bugs: + - [OrderBundle] fix usage of inherited values in backend-cart/order + controllers (https://github.com/coreshop/CoreShop/pull/1461, https://github.com/coreshop/CoreShop/issues/1459) + +### 2.1.8 + +- Bugs: + - [ResourceBundle] Fix unique entity validator (https://github.com/coreshop/CoreShop/pull/1385) + - [DataHub] fix integration (https://github.com/coreshop/CoreShop/pull/1389) + +- Features: + - [WorkflowBundle] Add enabled option to workflow callbacks (https://github.com/coreshop/CoreShop/pull/1392) + +### 2.1.7 + +- Bugs: + - [Pimcore] fix + getDataForEditmode (https://github.com/coreshop/CoreShop/pull/1372, https://github.com/coreshop/CoreShop/pull/1361) + +### 2.1.6 + +- Bugs: + - [CoreBundle][2.1] Fix name of country combo (https://github.com/coreshop/CoreShop/pull/1350) + +### 2.1.5 + +- Bugs: + - [Translations] fix: add missing translation (https://github.com/coreshop/CoreShop/pull/1308) + - [IndexBundle] index ui improvements (https://github.com/coreshop/CoreShop/pull/1300) + - [ThemeBundle] fix configuration for default resolvers (https://github.com/coreshop/CoreShop/pull/1301) + - [AddressBundle] introduce filter-active action and filter store-base countries by + those (https://github.com/coreshop/CoreShop/pull/1302) + +### 2.1.4 + +- Feature: + - [CoreBundle] allow store-values to be reset and inherit again (https://github.com/coreshop/CoreShop/pull/1273) +- Bugs: + - [IndexBundle] Change return type of WorkerInterface::getList (https://github.com/coreshop/CoreShop/pull/1280) + - [ThemeBundle] fix default theme-resolvers (https://github.com/coreshop/CoreShop/pull/1281) + - [Pimcore] make compatible with Pimcore 6.5 (https://github.com/coreshop/CoreShop/pull/1285) + - [Core] fix bug where we calculated item-discount and + item-discount-prices (https://github.com/coreshop/CoreShop/pull/1293) + +### 2.1.3 + +- Bugs: + - [Address, Order, Core] fix release (https://github.com/coreshop/CoreShop/pull/1269) + +### 2.1.2 + +- Features: + - [FrontendBundle] Change function from private to protected (https://github.com/coreshop/CoreShop/pull/1248) + - [Installer] update logo (https://github.com/coreshop/CoreShop/pull/1264) + - [Cart] introduce cart-context resolver to allow better extendability of the context used for the + cart (https://github.com/coreshop/CoreShop/pull/1267) + +- Bugs: + - [ThemeBundle] fix Undefined index: default_resolvers (https://github.com/coreshop/CoreShop/pull/1235) + - [IndexBundle] `$indexIds` is always an array, hence the condition is now + empty (https://github.com/coreshop/CoreShop/pull/1241) + - [Stan] fixes for 2.1 (https://github.com/coreshop/CoreShop/pull/1244) + - [CurrencyBundle] fix money-currency type is rounding prices wrong (https://github.com/coreshop/CoreShop/pull/1238) + - [CoreBundle] Change repository so that unit definition deletion works with multiple product + models (https://github.com/coreshop/CoreShop/pull/1252) + - [Order] fix throwing/catching right exceptions in purchasable + calculalator (https://github.com/coreshop/CoreShop/pull/1250) + - [Core] allow non QuantityPriceRangeAware Products in + cart-processor (https://github.com/coreshop/CoreShop/pull/1249) + - [IndexBundle] fix index columns form (https://github.com/coreshop/CoreShop/pull/1259) + - [Country] don't call the request based resolvers every time (https://github.com/coreshop/CoreShop/pull/1261) + +### 2.1.1 + +- Features: + - [CoreBundle] Implement Variant Unit and QPR Solidifier (https://github.com/coreshop/CoreShop/issues/1157) + - [AddressBundle] Improve Country Address Formatting (https://github.com/coreshop/CoreShop/pull/1153) + - [OrderBundle] properly implement AddMultipleToCart (https://github.com/coreshop/CoreShop/pull/1154) + - [IndexBundle] allow to query relations also by relation type (https://github.com/coreshop/CoreShop/pull/1156) + - [SEOBundle] add priority to extractors (https://github.com/coreshop/CoreShop/pull/1155) + - [QuantityPriceRules] Allow Object Deletion without removing QPR + first (https://github.com/coreshop/CoreShop/issues/1160) + - [CoreBundle] Improve Unit Definition `<=>` QPR Dependency (https://github.com/coreshop/CoreShop/pull/1161) + - [StorageList] introduce service to resolve if cart-items are + equal (https://github.com/coreshop/CoreShop/pull/1188) + - [OrderBundle] Allow Item Data per Row in Order Overview (https://github.com/coreshop/CoreShop/pull/1193) + - [OrderBundle] add sale-detail event (https://github.com/coreshop/CoreShop/pull/1192) + - [IndexBundle] Argument for re-index command (https://github.com/coreshop/CoreShop/pull/1219) + - [CoreBundle] Maximum Quantity to Order (https://github.com/coreshop/CoreShop/issues/1209) + +- Bugs: + - [StoreBundle] add missing store dependency (https://github.com/coreshop/CoreShop/pull/1159) + - [Install] add dummy migration (https://github.com/coreshop/CoreShop/pull/1172) + - [CoreBundle] Remove Store Values after Store has been removed (https://github.com/coreshop/CoreShop/pull/1171) + - [Order] Fix Character Length Count in Voucher Code + Generator (https://github.com/coreshop/CoreShop/pull/1194/files) + - [Order] fix item price for items without tax-rule (https://github.com/coreshop/CoreShop/pull/1200) + - [TRACKING] use single item price in order item extractor (https://github.com/coreshop/CoreShop/pull/1232) + +### 2.1.0 + +- If you have a custom validation File for *AddToCart* or *Cart*, make sure to use the new 2 MinimumQuantity and + MaximumQuantity Constraints. Otherwise it will happen that a validation is triggered twice. + +### 2.1.0 + +- Bugs: + - [ThemeBundle] add missing dependency to + pimcore-bundle (https://github.com/coreshop/CoreShop/pull/1138, https://github.com/coreshop/CoreShop/pull/1140) + - [ResourceBundle] fix naming of parameter sortBy (https://github.com/coreshop/CoreShop/pull/1132) + - [Quantity Price Rules] Check Inherited Product Quantity Price Range + Data (https://github.com/coreshop/CoreShop/pull/1143) + - [FrontendBundle] allow usage of auto-wired Frontend Controllers (https://github.com/coreshop/CoreShop/pull/1141) + - [OrderBundle] CartItem Quantity has to be > 0 (https://github.com/coreshop/CoreShop/pull/1144) + +### 2.1.0-rc.2 + +- Features: + - [IndexBundle] allow for more complex doctrine types in index (https://github.com/coreshop/CoreShop/pull/1110) + - [IndexBundle] add Select and Multiselect Filter Processor from + Multiselect (https://github.com/coreshop/CoreShop/pull/1111) + - [Autowire] improvement: allow service registries to be + autowired (https://github.com/coreshop/CoreShop/pull/1113, https://github.com/coreshop/CoreShop/pull/1116, https://github.com/coreshop/CoreShop/pull/1122) + - [QuantityPriceRules] allow price range ordering @solverat (https://github.com/coreshop/CoreShop/pull/1121) + - [Payment] Fix payment provider logo @davidhoeck (https://github.com/coreshop/CoreShop/pull/1124) + - [ResourceBundle, OrderBundle, CoreBundle] introduce more memory + efficient (https://github.com/coreshop/CoreShop/pull/1126, https://github.com/coreshop/CoreShop/pull/1129) + - [Shipping, ShippingBundle] Add logo field to carrier @davidhoeck (https://github.com/coreshop/CoreShop/pull/1127) + - + +- Bugs: + - [Tests] exit code (https://github.com/coreshop/CoreShop/pull/1119) + - [Tracking] remove decimal factor multiplier in order extractor + @solverat (https://github.com/coreshop/CoreShop/pull/1128) + - [QuantityPriceRules] Move migration for Quantity Rule Range Unit to Sales Unit + migration (https://github.com/coreshop/CoreShop/pull/1123) + +### 2.1.0 + +- BC-Break: Introduced `array $options` parameter into `CoreShop\Component\Index\Listing\ListingInterface` to allow + certain variations for loading data + +- Introduced WholesalePrice Calculators, this deprecates the "wholesalePrice" property in the Product Class and adds + the "wholesaleBuyingPrice" Property with a currency attached. We've added a migration for that, but since we need a + currency now, we just assume the buying currency as the defaults store currency. If you have a different one, create a + custom migration that changes it. + +- `CoreShop\Component\StorageList\StorageListModifierInterface` got completely refactored and works a bit different now. + Since deciding what StorageListItem belongs to what product, can be a bit more complicated, we decided to introduce a + BC break. + - `CoreShop\Component\StorageList\StorageListModifierInterface` added `addToList` function + - `CoreShop\Component\StorageList\StorageListModifierInterface` removed `remove` to `removeFromList` + - `CoreShop\Component\StorageList\Model\StorageListItemInterface` added `equals` function + - `CoreShop\Component\StorageList\Model\StorageListInterface` removed `getItemForProduct` function + - `CoreShop\Component\StorageList\Model\StorageListProductInterface` got deprecated, since not it's not needed + anymore +- `CoreShop\Component\Order\Factory\CartItemFactoryInterface` introduced a new + function `public function createWithPurchasable(PurchasableInterface $purchasable, $quantity = 1);` + +- Introduced Theme-Bundle to handle + Themes (https://github.com/coreshop/CoreShop/pull/749, https://github.com/coreshop/CoreShop/pull/756, https://github.com/coreshop/CoreShop/pull/755) + - + deprecated [CoreShop\Bundle\StoreBundle\Theme\ThemeHelper](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/StoreBundle/Theme/ThemeHelper.php) + in favor + of [CoreShop\Bundle\ThemeBundle\Service\ThemeHelper](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/ThemeBundle/Service/ThemeHelper.php) + - + deprecated [CoreShop\Bundle\StoreBundle\Theme\ThemeHelperInterface](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/StoreBundle/Theme/ThemeHelperInterface.php) + in favor + of [CoreShop\Bundle\ThemeBundle\Service\ThemeHelperInterface](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/ThemeBundle/Service/ThemeHelperInterface.php) + - + deprecated [CoreShop\Bundle\StoreBundle\Theme\ThemeResolver](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/StoreBundle/Theme/ThemeResolver.php) + in favor + of [CoreShop\Bundle\ThemeBundle\Service\ThemeResolver](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/ThemeBundle/Service/ThemeResolver.php) + - + deprecated [CoreShop\Bundle\StoreBundle\Theme\ThemeResolverInterface](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/StoreBundle/Theme/ThemeResolverInterface.php) + in favor + of [CoreShop\Bundle\ThemeBundle\Service\ThemeResolverInterface](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/ThemeBundle/Service/ThemeResolverInterface.php) + +- Introduce AddToCartFormType and QuantityType. This allows to use validators to check if its allowed to add a product + to the cart. If you update from CoreShop 2.0.* change the add-to-cart form in your templates to the + following: (https://github.com/coreshop/CoreShop/pull/812/files#diff-3e06a5f0e813be230a0cd232e916738eL29) (https://github.com/coreshop/CoreShop/pull/812, https://github.com/coreshop/CoreShop/pull/864) + - `{{ render(url('coreshop_cart_add', {'product': product.id})) }}` + - Be sure you have adopted the new form template in `views/Product/_addToCart.html.twig` + +- Introduced Store + Unit: (https://github.com/coreshop/CoreShop/pull/877, https://github.com/coreshop/CoreShop/pull/883, https://github.com/coreshop/CoreShop/pull/950, https://github.com/coreshop/CoreShop/pull/902, https://github.com/coreshop/CoreShop/pull/896) + - Please add `product_unit` to permission table. + - Remove `storePrice` field from all product classes + - If you don't use the `Store Price` element in your classes besides the `storePrice` field, you should delete + the `coreshop_product_store_price` table after migration. + - We introduced a new jquery plugin `$.coreshopQuantitySelector()` which allows you to add more numeric control to + your quantity field, checkout our + demo [example](https://github.com/coreshop/CoreShop/blob/7d05ccd89aed99f9fd93c585e096cd1edaf20010/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/js/shop.js#L20). + +- Features: +- *Product Quantity Rules*, big thanks to + @solverat (https://github.com/coreshop/CoreShop/pull/791, https://github.com/coreshop/CoreShop/pull/954, https://github.com/coreshop/CoreShop/pull/951, https://github.com/coreshop/CoreShop/pull/898, https://github.com/coreshop/CoreShop/pull/813) +- *Product Units*, big thanks to + @solverat (https://github.com/coreshop/CoreShop/pull/861, https://github.com/coreshop/CoreShop/pull/911, https://github.com/coreshop/CoreShop/pull/900, https://github.com/coreshop/CoreShop/pull/897, https://github.com/coreshop/CoreShop/pull/891, https://github.com/coreshop/CoreShop/pull/875) +- *Minimum Order Quantity and Item Quantity Factor* big thanks to + @solverat (https://github.com/coreshop/CoreShop/pull/881) +- Introduce Menu + Bundle (https://github.com/coreshop/CoreShop/pull/854, https://github.com/coreshop/CoreShop/pull/880, https://github.com/coreshop/CoreShop/pull/878, https://github.com/coreshop/CoreShop/pull/876) +- Introduce Theme + Bundle (https://github.com/coreshop/CoreShop/pull/749, https://github.com/coreshop/CoreShop/pull/756, https://github.com/coreshop/CoreShop/pull/755) +- [Store Values] swap store-prices with store-values and make them extendable for custom store + values (https://github.com/coreshop/CoreShop/pull/877, https://github.com/coreshop/CoreShop/pull/883, https://github.com/coreshop/CoreShop/pull/950, https://github.com/coreshop/CoreShop/pull/902, https://github.com/coreshop/CoreShop/pull/896) +- [ResourceBundle] Add group to ThumbnailInstaller (https://github.com/coreshop/CoreShop/pull/1017) @AndiKeiser +- [All] AutoWiring (https://github.com/coreshop/CoreShop/pull/850) +- [All] Pimcore 6/Symfony 4 + compatibilty (https://github.com/coreshop/CoreShop/pull/996, https://github.com/coreshop/CoreShop/pull/1062, https://github.com/coreshop/CoreShop/pull/1035) +- [Tests] Update to friends-of-behat/symfony-extension:^2.0 (https://github.com/coreshop/CoreShop/pull/1024) +- [Travis] add setup for Pimcore 6 changed system.yml config (https://github.com/coreshop/CoreShop/pull/1029) +- [All] Introduce configurable decimal precision and factor (https://github.com/coreshop/CoreShop/pull/1030) +- [All] change db type for pricing fields to + BIGINT (https://github.com/coreshop/CoreShop/pull/1032, https://github.com/coreshop/CoreShop/pull/1098) +- [ShippingBundle] introduce gross/net checkbox for amount condition (https://github.com/coreshop/CoreShop/pull/1042) +- [Graphql] Add Support for Pimcore GraphQl Data Hub (https://github.com/coreshop/CoreShop/pull/1052) +- [Tracking] Add Decimal Precision to Order Extractor (https://github.com/coreshop/CoreShop/pull/1058) +- [MoneyBundle] add fallback in money-bundle for decimal precision (https://github.com/coreshop/CoreShop/pull/1061) +- [Docs] Added visualization for coreshop_order Workflow (https://github.com/coreshop/CoreShop/pull/1067) @davidhoeck +- [Pimcore] add conflict for Pimcore 6.1.0 and Pimcore 6.1.1 (https://github.com/coreshop/CoreShop/pull/1069) +- [Docs] Update 03_Theme.md (https://github.com/coreshop/CoreShop/pull/1072) @D37R4C7 +- [FQCN] FQCN + Services (https://github.com/coreshop/CoreShop/pull/1079, https://github.com/coreshop/CoreShop/pull/1084, https://github.com/coreshop/CoreShop/issues/1085, https://github.com/coreshop/CoreShop/pull/1086, https://github.com/coreshop/CoreShop/pull/1090) +- [Product] Unit Definition - + Precision (https://github.com/coreshop/CoreShop/pull/1081, https://github.com/coreshop/CoreShop/pull/1091, https://github.com/coreshop/CoreShop/pull/1092) + @solverat +- [IndexBundle] split conditions into pre_conditions and + user_conditions (https://github.com/coreshop/CoreShop/pull/1055) +- [Quantity Price Rules] Remove "to" field from quantity price + range (https://github.com/coreshop/CoreShop/pull/1003, https://github.com/coreshop/CoreShop/pull/1095) +- [Order] Introduce backend cart-creation and cart-details (https://github.com/coreshop/CoreShop/pull/963) +- [PermissionSetup] add category to Permission (https://github.com/coreshop/CoreShop/pull/1101) +- [ShippingBundle] add more carrier price options (https://github.com/coreshop/CoreShop/pull/1015) +- [FrontendBundle] show discount/surcharge label in order overview (https://github.com/coreshop/CoreShop/pull/1006) +- [Index, IndexBundle] allow options for the listing load function (https://github.com/coreshop/CoreShop/pull/1001) +- [ResourceBundle] add connection interface into Pimcore Repository (https://github.com/coreshop/CoreShop/pull/1000) +- [ProductBundle, CoreBundle] set itemQuantityFactor min value to null (https://github.com/coreshop/CoreShop/pull/993) +- [Core] use default unit quanity in onhold inventory (https://github.com/coreshop/CoreShop/pull/990) @solverat +- [Maintenance] refactor to use new maintenance task from pimcore 5.8 (https://github.com/coreshop/CoreShop/pull/986) +- [All] require min Pimcore 5.8 and PHP 7.2 (https://github.com/coreshop/CoreShop/pull/973) +- [CoreBundle] introduce store-preview for products (https://github.com/coreshop/CoreShop/pull/982) +- [Adjustments] remove return type AdjustmentInterface (https://github.com/coreshop/CoreShop/pull/978) @solverat +- [Taxation] fix tax collection on gross values - 2.1 (https://github.com/coreshop/CoreShop/pull/974) +- [Order] introduce translatable cart-price-rules (https://github.com/coreshop/CoreShop/pull/969) +- [WholesaleCalculator] introduce purchasable wholesale calculator (https://github.com/coreshop/CoreShop/pull/957) +- [Product] introduce stop propagation flag for price-rules (https://github.com/coreshop/CoreShop/pull/946) +- [Pimcore] make CoreShop 2.1 compatible with Pimcore 5.7.2 (https://github.com/coreshop/CoreShop/pull/915) +- [CoreBundle] serialize relational values (product and store) as + relation (https://github.com/coreshop/CoreShop/pull/916) +- [Core] Disable Customer Deletion if bounded Orders are available (https://github.com/coreshop/CoreShop/pull/732) +- [PriceRules] add priority to product-price-rules (https://github.com/coreshop/CoreShop/pull/905) +- [Product] add translation to product price rules (https://github.com/coreshop/CoreShop/pull/879) +- [All] Min 5.7 (https://github.com/coreshop/CoreShop/pull/871) +- [Core] Refactor how we identify CartItem - Product (https://github.com/coreshop/CoreShop/pull/866) +- [Core/Cart] Refactor add to cart (https://github.com/coreshop/CoreShop/pull/864) +- [Cart] implement add-to-cart as Symfony Form (https://github.com/coreshop/CoreShop/pull/812) +- [Core, Order, Product] throw exceptions for when a price can't be + found (https://github.com/coreshop/CoreShop/pull/811) +- [Order] make accessor protected for OrderDocument Processor (https://github.com/coreshop/CoreShop/pull/775) +- [WorkflowBundle, OrderBundle] always load all available coreshop states into + js (https://github.com/coreshop/CoreShop/pull/773) +- [Core, Order] also apply discounts to cart-items (https://github.com/coreshop/CoreShop/pull/770) +- [OrderBundle, Pimcore] extract DataLoader from Controller to be used + oustide (https://github.com/coreshop/CoreShop/pull/771) +- [OrderBundle] add event to prepare sale in order to better extend + details (https://github.com/coreshop/CoreShop/pull/772) +- [IndexBundle] implement optional inclusion into ProcessManager (https://github.com/coreshop/CoreShop/pull/758) + +- Bugs: + - [Product] remove getIsAvailableWhenOutOfStock and + setIsAvailableWhenOutOfStock (https://github.com/coreshop/CoreShop/pull/1019) + - [CoreBundle] fix inheritance for store-values (https://github.com/coreshop/CoreShop/pull/1028) + - [ResourceBundle] Fix missing coreshop.helper namespace (https://github.com/coreshop/CoreShop/pull/1039) + - [PimcoreBundle] fix dynamic-dropdown for pimcore-6 (https://github.com/coreshop/CoreShop/pull/1040) + - [All] fix related to element.href and this pimcore PR: + pimcore/pimcore#4496 (https://github.com/coreshop/CoreShop/pull/1041) + - [Core] Store Values - default value to 0 instead of null, fix setting inherited store + values (https://github.com/coreshop/CoreShop/pull/1093) + - [FrontendBundle] fix wishlist remove and allow purchasables (https://github.com/coreshop/CoreShop/pull/997) + - [Bundles] provide proper version strings and names (https://github.com/coreshop/CoreShop/pull/970) + - [Migration] only add indices to store_price table if table actually + exists (https://github.com/coreshop/CoreShop/pull/967) + - [IndexBundle] improve standalone usage (https://github.com/coreshop/CoreShop/pull/965) + - [Product] allow price rule labels to be null and fix error with two trait + constructors (https://github.com/coreshop/CoreShop/pull/953) + - [ProductBundle] re-add active to list serializer group (https://github.com/coreshop/CoreShop/pull/912) + - [CoreBundle] fix cart-stock validation (https://github.com/coreshop/CoreShop/pull/894) + - [Tests] [Behat] the cart tests haven't been ran since the theme-bundle was + introduced (https://github.com/coreshop/CoreShop/pull/872) + +## 2.0.x + +### 2.0.12 + +- Translations: + - New Crowdin translations (https://github.com/coreshop/CoreShop/pull/1165) +- Tests + - [Tests] add conflict for monolog (https://github.com/coreshop/CoreShop/pull/1178) +- Bug + - [TRACKING] use single item price in order item extractor (https://github.com/coreshop/CoreShop/pull/1231) + +### 2.0.11 + +- Bugs: + - [IndexBundle] use doctrine schema-config to create index-table + schema (https://github.com/coreshop/CoreShop/pull/1142) + +### 2.0.10 + +- Bugs: + - [PayumBundle]: add sandbox to PayPal Configuration (https://github.com/coreshop/CoreShop/pull/1112) + +### 2.0.9 + +- Bugs: + - [Pimcore] fix stan tests on 2.0 (https://github.com/coreshop/CoreShop/pull/998) + - [CurrencyBundle] fix for money-currency editable when data comes from pimcore + editmode (https://github.com/coreshop/CoreShop/pull/1023) + - [PimcoreBundle] use reflection to get class methods (https://github.com/coreshop/CoreShop/pull/1038) + - [CoreExtensions] don't allow any diff until properly implemented (https://github.com/coreshop/CoreShop/pull/1050) + - [ProductBundle] specific price rules: keep id on save (https://github.com/coreshop/CoreShop/pull/1045) + - [TrackingBundle] fix total tax in tag manager tracker (https://github.com/coreshop/CoreShop/pull/1053) @solverat + - [IndexBundle] fix iterator and nested interpreter (https://github.com/coreshop/CoreShop/pull/1054) + - [IndexBundle] fix index iterator interpreter (https://github.com/coreshop/CoreShop/pull/1076) + - [ResourceBundle] fix resource-select options (https://github.com/coreshop/CoreShop/pull/1077) + - [Tests] fix stan and travis tests (https://github.com/coreshop/CoreShop/pull/1078) + - [Docs] Fix extend docs (https://github.com/coreshop/CoreShop/pull/1082) + - [PimcoreBundle] embedd CoreExtension - Protected members are available only via + getters (https://github.com/coreshop/CoreShop/pull/1089) @rishadomar + - [IndexBundle] fix order-direction now serialized properly (https://github.com/coreshop/CoreShop/pull/1097) + - [All] Fixing Configuration Keys (https://github.com/coreshop/CoreShop/pull/1100) @khusseini + - [FrontendBundle] CategoryController perPage Configuration fix (https://github.com/coreshop/CoreShop/pull/1105) + +- Features: + - [All] make CoreShop stores more async, don't load them initially (https://github.com/coreshop/CoreShop/pull/1025) + - [Order] introduce checkout events (https://github.com/coreshop/CoreShop/pull/1043) + - [CoreShop] Update CI (https://github.com/coreshop/CoreShop/pull/1056) + - [CoreShop] Smaller CI changes (https://github.com/coreshop/CoreShop/pull/1060) + +### 2.0.8 + +- Bug: + - [Pimcore] Make CoreShop compatible with Pimcore 5.8.0 (https://github.com/coreshop/CoreShop/pull/977) + - [Order] remove wrong type hints (https://github.com/coreshop/CoreShop/pull/978) + - [Core] fix setting customer and persisting cart on user login (https://github.com/coreshop/CoreShop/pull/980) + +### 2.0.7 + +- Bug: + - [Taxation] Wrong Tax Calculation when using Store Gross Values (https://github.com/coreshop/CoreShop/issues/971) + - [Core] remove unused Helper Classes (https://github.com/coreshop/CoreShop/pull/966) + - [Core] add index to StorePrice Table for better performance (https://github.com/coreshop/CoreShop/pull/962) + - [Core] remove result cache for Store Price due to issues with + inheritance (https://github.com/coreshop/CoreShop/pull/961) + - [Core] strip_tags for meta description in Category (https://github.com/coreshop/CoreShop/pull/959) + - [Currency] MoneyCurrency fixes and improvements (https://github.com/coreshop/CoreShop/pull/958) + - [Purchasable] When using custom purchasable, CoreShop always assumed that your class has a weight, even though it + didn't had to. That's why we moved all weight related fields to the Core Component and CoreBundle. + - [Core] prevent empty carts from being persisted (https://github.com/coreshop/CoreShop/issues/920) + - [Core] move weight/total weight to Core Component (https://github.com/coreshop/CoreShop/pull/938) + - [Address] use isoCode as fallback if no language value is set (https://github.com/coreshop/CoreShop/pull/939) + +- Features + - [JMS Serializer] Updated JMS Serializer to 2.0 (https://github.com/coreshop/CoreShop/pull/955) + +### 2.0.6: + +- Bug: + - [Adjustments] in the classes "CoreShopOrderItem", "CoreShopQuoteItem", was a typo `basePdjustmentItems` instead + of `baseAdjustmentItems`. Please manually rename them to `baseAdjustmentItems` + - [ProductBundle] Fix extjs layout crash price rule is inactive (https://github.com/coreshop/CoreShop/pull/908) + - [FrontendBundle] fix address creation redirect (https://github.com/coreshop/CoreShop/pull/910) + - [StorageList] Storage List and Storage List Item is not a Pimcore + Object (https://github.com/coreshop/CoreShop/pull/907) + - [Order] fix typo in OrderItem and QuoteItem (https://github.com/coreshop/CoreShop/pull/906) + - [NotificationBundle] fix typo in serializer namespace declaration (https://github.com/coreshop/CoreShop/pull/901) + - [CoreBundle] fix notification rule setting for order mail action (https://github.com/coreshop/CoreShop/pull/886) + - [Core] use PriceCalculatorInterface in product tracking extractor (https://github.com/coreshop/CoreShop/pull/892) + - [Core] fix not passing full configuration in store based email (https://github.com/coreshop/CoreShop/pull/917) + - [Core] fix copying object brick data from cart to sale (https://github.com/coreshop/CoreShop/pull/918) + - [CoreBundle/OrderBundle] KernelResponse Event should ignore Profile + Toolbar (https://github.com/coreshop/CoreShop/pull/919) + - [Pimcore] Make CoreShop compatible with Pimcore 5.7.2 (https://github.com/coreshop/CoreShop/pull/914) + +- Features: + - [FrontendBundle] make private method protected (https://github.com/coreshop/CoreShop/pull/890) + - [AddressBundle] introduce + address-identifiers (https://github.com/coreshop/CoreShop/issues/830 & https://github.com/coreshop/CoreShop/pull/913) + +### 2.0.5: + +- Deprecations: + - [WorkflowBundle] refactor state change logging (https://github.com/coreshop/CoreShop/pull/835) + - `CoreShop\Bundle\OrderBundle\Workflow\OrderHistoryLogger` has been deprecated, + use `CoreShop\Bundle\WorkflowBundle\History\HistoryLoggerInterface` instead + - `CoreShop\Bundle\OrderBundle\Workflow\OrderStateHistoryLogger` has been deprecated, + use `CoreShop\Bundle\WorkflowBundle\History\StateHistoryLoggerInterface` instead + - `CoreShop\Bundle\OrderBundle\Workflow\WorkflowStateManager` has been deprecated, + use `CoreShop\Bundle\WorkflowBundle\StateManager\WorkflowStateInfoManagerInterface` instead +- Bugs + - [PimcoreBundle] Make embedded classes work for Pimcore 5.6 (https://github.com/coreshop/CoreShop/pull/867) + - [All] Make CoreShop 2.0.x compatible with Pimcore 5.7 (https://github.com/coreshop/CoreShop/pull/869) + - [All] fix PHP5 sort issues by removing them (https://github.com/coreshop/CoreShop/issues/840) + - [Shipping] if cart has no shippables, don't force carriage + calculation (https://github.com/coreshop/CoreShop/pull/863) + - [Checkout] validate cart before submitting the order (https://github.com/coreshop/CoreShop/pull/858) + - [Frontend] remove unused property in templates (https://github.com/coreshop/CoreShop/pull/859) + - [Permissions] prefix permission labels (https://github.com/coreshop/CoreShop/pull/855) + - [Order] refactor creation of + invoices/shipments (https://github.com/coreshop/CoreShop/pull/852 + https://github.com/coreshop/CoreShop/pull/849) + - [Order] introduce options for order-document-items (https://github.com/coreshop/CoreShop/pull/848) + - [Autoloading] fix paths (https://github.com/coreshop/CoreShop/pull/846) + - [ResourceBundle] Introduce more basic + resource-types (https://github.com/coreshop/CoreShop/pull/838 + https://github.com/coreshop/CoreShop/pull/845) + - [AddressBundle] add missing translations (https://github.com/coreshop/CoreShop/pull/836) + +- Features + - [Index] Introduce advanced sorting for indexes (https://github.com/coreshop/CoreShop/pull/856) + +### 2.0.4 + +- Features: + - [Reports] Reports Grid Sorting (https://github.com/coreshop/CoreShop/pull/828) + - [Reports] Add Paginator To All Reports (https://github.com/coreshop/CoreShop/pull/826) + - [Pimcore] introduce twig placeholder (https://github.com/coreshop/CoreShop/pull/827) + - [Resource] add serialization for pimcore types (https://github.com/coreshop/CoreShop/pull/818) + - [Resource] add more doctrine-pimcore-types (https://github.com/coreshop/CoreShop/pull/816) + +- Bugs: + - [Order] fix code-generator length (https://github.com/coreshop/CoreShop/pull/833) + - [JS] Split JS Helpers into several regions of usability (https://github.com/coreshop/CoreShop/pull/829) + - [Core] fix for cart-item digital product never set (https://github.com/coreshop/CoreShop/pull/821) + - [Docs] Fix dead link (https://github.com/coreshop/CoreShop/pull/822) + - [Resource] move settings icon to resource-bundle (https://github.com/coreshop/CoreShop/pull/815) + - [Tracker] Update CompositeTracker::trackCheckoutStep (https://github.com/coreshop/CoreShop/pull/810) + +### 2.0.3 + +- Features: + - [All] Replace intval with int cast (https://github.com/coreshop/CoreShop/pull/805) + - [Core] Store Price Dirty Detection if installed Pimcore Version >= + 5.5 (https://github.com/coreshop/CoreShop/pull/807) + - [Core] Allow Variants in Product Rule Conditions (https://github.com/coreshop/CoreShop/pull/794) + - [Core] Add Event for Settings (https://github.com/coreshop/CoreShop/pull/785) + - [Core] Extract CartItem Processor (https://github.com/coreshop/CoreShop/pull/784) + - [Core] Decouple Shipping Calculator from Cart (https://github.com/coreshop/CoreShop/pull/783) + - [Order] extract DataLoader into Pimcore Component (https://github.com/coreshop/CoreShop/pull/782) + - [Order] rename Pimcore Grid Operators to be more CoreShop specific (https://github.com/coreshop/CoreShop/pull/787) + - [Order] Check also for CurrencyAwareInterface in PriceFormatter Gird + Operator (https://github.com/coreshop/CoreShop/pull/788) + - [Index] Introduce Iterator Interpreter (https://github.com/coreshop/CoreShop/pull/802) + - [Index] Introduce new Abstract function in AbstractWorker to allow handling of array + data (https://github.com/coreshop/CoreShop/pull/803) + - [Pimcore] add object_method twig function (https://github.com/coreshop/CoreShop/pull/809) +- Bugs: + - [Core] Fix Gift Cart Price Rule Action (https://github.com/coreshop/CoreShop/pull/796) + - [Core] Fix Invoice WKHTML Settings (https://github.com/coreshop/CoreShop/pull/786) + - [Core] Rule Conditions: Check on type (https://github.com/coreshop/CoreShop/pull/779) + - [Core] Add Translation for Adjustments (https://github.com/coreshop/CoreShop/pull/774) + - [Pimcore] allow spaces in DynamicDropdown (https://github.com/coreshop/CoreShop/pull/781) + +### 2.0.2 + +- Pimcore: + - This release makes CoreShop compatible with Pimcore 5.6.0 (https://github.com/coreshop/CoreShop/pull/762) +- Features: + - [Core] Adds a new CoreShop JS Event to add custom Menu Items to the CoreShop + Menu (https://github.com/coreshop/CoreShop/pull/765) + - [Resource] [ResourceBundle] add JMS Serializer Handler for Pimcore + Objects (https://github.com/coreshop/CoreShop/pull/766) +- Bugs: +- [Tracking] Fixes a Bug in the Tracking Manager when a Product does not have any categories + applied (https://github.com/coreshop/CoreShop/pull/767) + +### 2.0.1 + +- Features: + - [Core] Remove login customer after successfully registration (https://github.com/coreshop/CoreShop/pull/735) +- Bugs: + - [Core] Countries are removed when removing Store (https://github.com/coreshop/CoreShop/pull/746) + - [Core] order Document State Resolver when a Document is cancelled (https://github.com/coreshop/CoreShop/pull/738) + - [Core] safe path for folders (https://github.com/coreshop/CoreShop/pull/742) + - [Core] Fix for StoreMailActionProcessor exception in Notification + Rule (https://github.com/coreshop/CoreShop/pull/740) + - [Shipping] is invalid when no Shipping Rules are given (https://github.com/coreshop/CoreShop/pull/741) + - [Frontend] Inaccurate Store Filter Query in Category Controller (https://github.com/coreshop/CoreShop/pull/744) + +### 2.0.0 + +- CoreShop\Component\Index\Condition\RendererInterface has been deprecated in favor of + CoreShop\Component\Index\Condition\DynamicRendererInterface to allow dynamic registration of condition renderers + +### 2.0.0-RC.1 + +- Flash Messages are translated in the Controllers now, not in views anymore. If you have custom Flash Messages, + translate them in your Controller instead of the view. + +### 2.0.0-beta.4 + +- Completely remove FOSRestBundle, you still can use it, but you need to install it yourself. CoreShop only used the + BodyListener to decode POST/PUT Requests, this Listener is now added by CoreShop if FOSRestBundle is not installed. + +## 2.0.0-beta.3 to 2.0.0-beta.4 + +- **BC break**: All occurrences of + parameters `coreshop.all.stack.pimcore_class_ids`, `"application".model."class".pimcore_class_id`, `coreshop.all.pimcore_classes.ids` + have been removed. Inject the corresponding Repository and use `classId` function instead +- **Pimcore**: CoreShop now requires at least Pimcore 5.4.0. You need to update Pimcore to the at least 5.4.0 in order + to use/update CoreShop. + +### Product Price Calculation + +In order to allow custom price calculation on API Level, we changed the way CoreShop calculates product prices by +introducing a new parameter to every PriceCalculation Interface. Price Calculator Conditions are not anymore using a +Live context, instead it gets passed via API. + +Following interfaces have changed: + +- ```CoreShop\Component\Core\Product\TaxedProductPriceCalculatorInterface``` +- ```CoreShop\Component\Order\Calculator\PurchasableDiscountCalculatorInterface``` +- ```CoreShop\Component\Order\Calculator\PurchasableDiscountPriceCalculatorInterface``` +- ```CoreShop\Component\Order\Calculator\PurchasablePriceCalculatorInterface``` +- ```CoreShop\Component\Order\Calculator\PurchasableRetailPriceCalculatorInterface``` +- ```CoreShop\Component\Product\Calculator\ProductDiscountCalculatorInterface``` +- ```CoreShop\Component\Product\Calculator\ProductDiscountPriceCalculatorInterface``` +- ```CoreShop\Component\Product\Calculator\ProductPriceCalculatorInterface``` +- ```CoreShop\Component\Product\Calculator\ProductRetailPriceCalculatorInterface``` +- ```CoreShop\Component\Product\Rule\Action\ProductDiscountActionProcessorInterface``` +- ```CoreShop\Component\Product\Rule\Action\ProductDiscountPriceActionProcessorInterface``` +- ```CoreShop\Component\Product\Rule\Action\ProductDiscountPriceActionProcessorInterface``` +- ```CoreShop\Component\Product\Rule\Action\ProductPriceActionProcessorInterface``` +- ```CoreShop\Component\Product\Rule\Fetcher\ValidRulesFetcherInterface``` + +If you have anything customized with those classes, please change them accordingly. + +If you use the PriceCalculator Service directly, you also need to change the call from + +``` +$this->priceCalculator->getPrice($object, true) +``` + +to + +``` +$this->priceCalculator->getPrice($object, [ + 'store' => $store, + 'country' => $country, + 'customer' => $customer, + 'currency' $currency, + 'cart' => $cart +], true) +``` + +The new second argument, is the Context for which you want to get the Price. This is highly depends on your +need. On a default CoreShop setup, the context can be fetched form the `ShopperContext` Service like this: + +``` +return [ + 'store' => $this->shopperContext->getStore(), + 'customer' => $this->shopperContext->hasCustomer() ? $this->shopperContext->getCustomer() : null, + 'currency' => $this->shopperContext->getCurrency(), + 'country' => $this->shopperContext->getCountry(), + 'cart' => $this->shopperContext->getCart() +]; +``` + +CoreShop makes that easier for you, you can just use ```$this->shoppperContext->getContext()```. But be aware, the +Shopper Context is only in a Web Request available. +When you work on a CLI Level, you have to define the context yourself. + +If you already have a cart and want to calculate the price for the cart, the context is a bit different, cause it +resolves from the cart + +``` +$context = [ + 'store' => $cart->getStore(), + 'customer' => $cart->getCustomer() ?: null, + 'currency' => $cart->getCurrency(), + 'country' => $cart->getStore()->getBaseCountry(), + 'cart' => $cart +]; +``` + +### Taxation + +Tax Rule Store relation has been removed as it makes currently no sense. + +### Tracking + +Tracking bundle has completely been refactored in order to support more use-cases than just ecommerce. If you have any +customizations made, please check the current implementation to adapt your changes. + +### Order Invoice + +Due to changes in adjustments, we also need to change OrderInvoice/OrderInvoiceItem. + +After you have migrated to the latest version you also have to remove some fields: + +#### CoreShopOrderInvoice + +- totalTax +- baseTotalTax +- subtotalTax +- baseSubtotalTax +- shippingTax +- baseShippingTax +- taxes +- baseTaxes +- discountTax +- baseDiscountTax +- discountNet +- discountGross +- baseDiscountNet +- baseDiscountGross +- shippingNet +- shippingGross +- baseShippingNet +- baseShippingGross +- shippingTaxRate + +#### CoreShopOrderInvoiceItem + +- totalTax +- baseTotalTax +- taxes +- baseTaxes + +### Adjustments + +> **BC break / New Feature** + +There are several deprecated class fields. +After you have migrated to the latest version you also have to remove them: + +#### CoreShopOrder / CoreShopQuote + +- shippingGross +- shippingNet +- shippingTax +- discountGross +- discountNet +- discountTax +- baseShippingNet +- baseShippingGross +- baseShippingTax +- baseDiscountNet +- baseDiscountGross +- totalTax +- baseTotalTax +- subTotalTax +- baseSubtotalTax + +#### CoreShopOrderItem / CoreShopQuoteItem + +- totalTax +- baseTotalTax + +#### CoreShopCart + +- shippingGross +- shippingNet +- discountGross +- discountNet + +## 2.0.0-beta.2 to 2.0.0-beta.3 + +- **BC break** Signature of following interfaces changed: + - `CoreShop\Component\Index\Interpreter\InterpreterInterface`: `public function interpret($value, IndexableInterface $object, IndexColumnInterface $config, $interpreterConfig = []);` + - `CoreShop\Component\Index\Interpreter\LocalizedInterpreterInterface`: `public function interpretForLanguage($language, $value, IndexableInterface $object, IndexColumnInterface $config, $interpreterConfig = []);` + - `CoreShop\Component\Index\Interpreter\RelationInterpreterInterface`: `public function interpretRelational($value, IndexableInterface $indexable, IndexColumnInterface $config, $interpreterConfig = []);` + - `CoreShop\Component\Customer\Model\UserInterface::ROLE_DEFAULT` + renamed `CoreShop\Component\Customer\Model\UserInterface::CORESHOP_ROLE_DEFAULT` + - `CoreShop\Component\Customer\Model\UserInterface::ROLE_SUPER_ADMIN` + renamed `CoreShop\Component\Customer\Model\UserInterface::CORESHOP_ROLE_SUPER_ADMIN` + +- **BC break** Shipment / Invoice Creation via API changed + - Before adding a new Shipment / Invoice you need to dispatch a request state to your order. Read more about + it [here](../03_Development/06_Order/18_Invoice/01_Invoice_Creation.md) + and [here](../03_Development/06_Order/19_Shipment/01_Shipment_Creation.md). +- **BC break** getName in `CoreShop\Component\Index\Model\IndexableInterface` has been changed to `getIndexableName` + as `getName` could eventually conflict with a non localized Pimcore Field +- **BC break** getEnabled in `CoreShop\Component\Index\Model\IndexableInterface` has been changed + to `getIndexableEnabled` as `getEnabled` could eventually conflict with a localized Pimcore Field + +## 2.0.0-beta.1 to 2.0.0-beta.2 + +- Link Generator implemented. If you want to use nice urls, you need to add the link generator service: + - CoreShopProduct: add `@coreshop.object.link_generator.product` as Link Provider + - CoreShopCategory: add `@coreshop.object.link_generator.category` as Link Provider + - Change `{{ path('') }}` to `{{ coreshop_path('') }}`. You may want to checkout the FrontendBundle to get a deeper + insight. +- Deprecated Field Names in - CoreShop\Component\Payment\Model\PaymentInterface`: + - getName is now getTitle + - getOrderId is now getOrder and directly returns a OrderInterface +- Deprecated Field Names in - `CoreShop\Component\Shipping\Model\CarrierInterface`: + - getLabel is not getTitle + - getName is now getIdentifier + +## 2.0.0-alpha.4 to 2.0.0-beta.1 + +- **BC break** Signature of following interfaces changed: + - `CoreShop\Component\Index\Interpreter\InterpreterInterface`: `public function interpret($value, IndexableInterface $object, IndexColumnInterface $config);` + - `CoreShop\Component\Index\Interpreter\LocalizedInterpreterInterface`: `public function interpretForLanguage($language, $value, IndexableInterface $object, IndexColumnInterface $config);` + - `CoreShop\Component\Index\Interpreter\RelationInterpreterInterface`: `public function interpretRelational($value, IndexableInterface $indexable, IndexColumnInterface $config);` + +- **BC break** CoreShop now takes advantage of the dependent bundle feature introduced in Pimcore 5.1.2. Therefore, + all bundles are now automatically loaded. This is a BC break, as when updating, you might run into issues. + To solve the issues, check following things: + - remove `RegisterBundles` entry from `app/AppKernel.php` + - remove loading CoreShopCoreBundle Configuration in `app/config.yml` + - enable CoreShopCoreBundle via CLI or manually + in `var/config/extensions.php`: `"CoreShop\\Bundle\\CoreBundle\\CoreShopCoreBundle" => TRUE` +- **BC break** Upgraded Default Layout to Bootstrap 4. This will most certainly cause issues when you just override + certain templates. Best would be to copy all templates from before the Bootstrap 4 Upgrade. + +## 2.0.0-alpha.4 to 2.0.0-alpha.5 + +- **BC break** added Component\Core\Model\OrderItem and Component\Core\Model\QuoteItem. If you already customized them, + inherit them from the Core Models. +- **BC break** changed the way CoreShop processes Cart-Rules. If you implemented a custom-condition, inherit + from `CoreShop\Component\Order\Cart\Rule\Condition\AbstractConditionChecker` and implement `isCartRuleValid` instead + of `isValid` +- Deprecated: remove `cart/add-price-rule/` static route. + +## 2.0.0-alpha.3 to 2.0.0-alpha.4 + +- **BC break** decoupled MoneyBundle from CurrencyBundle, therefore the Twig Extension for Money Conversion went to the + CurrencyBundle. Therefore the name of that extension was renamed from + **coreshop_convert_money** to **coreshop_convert_currency**. If you use it directly in your code, please rename all of + them. +- Deprecated CoreShopAdminBundle which responsability was only handling installation and deliviering pimcore resources + like JS and CSS files. + * Installation has been moved to CoreShopCoreBundle + * Delivering of resources is now handled by CoreShopResourceBundle, this also makes it easier to use CoreShop + Bundles without handling resources yourself. + +## 2.0.0-alpha.2 to 2.0.0-alpha.3 + +- **BC break** getPrice in PurchasableInterface and ProductInterface has been removed. In favor of this a new + coreShopStorePrice editable has been introduced, which stores prices for each store. This makes handling of multiple + currencies way more elegant. + + If you still want to use the old getPrice, create a new Subclass of \CoreShop\Component\Core\Model\Product, implement + \CoreShop\Component\Order\Model\PriceAwarePurchasableInterface and set your class to CoreShopProduct parents. + +# V1 to V2 + +- CoreShop 2 is not backward compatible. Due to the framework change, we decided to re-make CoreShop from scratch. If + you still have instances running and want to migrate, there is a basic migration way which gets you data from V1 to + V2. +- [Export from CoreShop1](https://github.com/coreshop/CoreShopExport) +- [Import into CoreShop2](https://github.com/coreshop/ImportBundle) + +# Within V1 + +- Nothing available diff --git a/docs/01_Getting_Started/03_Demo.md b/docs/01_Getting_Started/03_Demo.md new file mode 100644 index 0000000000..b37858154f --- /dev/null +++ b/docs/01_Getting_Started/03_Demo.md @@ -0,0 +1,26 @@ +# Demo + +Discover the full potential of CoreShop through our interactive demos. Explore our Open-Source version for a +comprehensive insight into CoreShop's foundational features and capabilities. This demo provides a hands-on experience, +allowing you to witness the power and flexibility of CoreShop in real-world scenarios. Whether you’re a developer, +business owner, or eCommerce enthusiast, our demos offer a valuable glimpse into what CoreShop can do for you. + +## Frontend Demo + +:::info +[https://demo4.coreshop.org](https://demo4.coreshop.org) +::: + +## Backend Demo + +:::info +[https://demo4.coreshop.org/admin](https://demo4.coreshop.org/admin) + +Username: admin / Password: coreshop +::: + + +:::tip +You can also setup this demo locally by running `bin/console coreshop:install:demo` +::: + diff --git a/docs/01_Getting_Started/04_Tests.md b/docs/01_Getting_Started/04_Tests.md new file mode 100644 index 0000000000..cc5edb03ab --- /dev/null +++ b/docs/01_Getting_Started/04_Tests.md @@ -0,0 +1,48 @@ +# Tests + +CoreShop comes with a full test-suite. We use [Behat](https://docs.behat.org/en/latest/) for our Domain-Tests and +Frontend Tests. It also comes with [Psalm](https://psalm.dev/) and [PHPStan](https://phpstan.org/) for Static Analysis. + +## Running Tests Locally + +### Psalm + +``` +vendor/bin/psalm +``` + +### PHPStan + +``` +SYMFONY_ENV=test vendor/bin/phpstan analyse -c phpstan.neon src -l 3 --memory-limit=-1 +``` + +### BEHAT + +- create database `coreshop4__behat` + +#### Install Pimcore and CoreShop in Test Env + +``` +APP_ENV=test PIMCORE_TEST_DB_DSN=mysql://root:ROOT@coreshop-4/coreshop4___behat PIMCORE_INSTALL_ADMIN_USERNAME=admin PIMCORE_INSTALL_ADMIN_PASSWORD=admin PIMCORE_INSTALL_MYSQL_HOST_SOCKET=coreshop-4 PIMCORE_INSTALL_MYSQL_USERNAME=root PIMCORE_INSTALL_MYSQL_PASSWORD=ROOT PIMCORE_INSTALL_MYSQL_DATABASE=coreshop4___behat PIMCORE_INSTALL_MYSQL_PORT=3306 PIMCORE_KERNEL_CLASS=Kernel vendor/bin/pimcore-install --env=test --skip-database-config -n +APP_ENV=test PIMCORE_TEST_DB_DSN=mysql://root:ROOT@coreshop-4/coreshop4___behat bin/console coreshop:install +``` + +#### BEHAT Domain + +``` +CORESHOP_SKIP_DB_SETUP=1 PIMCORE_TEST_DB_DSN=mysql://root:ROOT@coreshop-4/coreshop4___behat vendor/bin/behat -c behat.yml.dist -p default +``` + +#### BEHAT UI + +``` +vendor/bin/bdi detect drivers + +# OUTSIDE CONTAINER +# Run Symfony Server +APP_ENV=test PIMCORE_TEST_DB_DSN=mysql://root:ROOT@127.0.0.1:3306/coreshop4___behat symfony server:start --port=9080 --dir=public --no-tls + +# Run Behat +CORESHOP_SKIP_DB_SETUP=1 PANTHER_EXTERNAL_BASE_URI=http://127.0.0.1:9080/index_test.php PANTHER_NO_HEADLESS=0 PIMCORE_TEST_DB_DSN=mysql://root:ROOT@127.0.0.1:3306/coreshop4___behat php -d memory_limit=-1 vendor/bin/behat -c behat.yml.dist -p ui -vvv +``` \ No newline at end of file diff --git a/docs/docs/01_Getting_Started/img/architecture.png b/docs/01_Getting_Started/img/architecture.png similarity index 100% rename from docs/docs/01_Getting_Started/img/architecture.png rename to docs/01_Getting_Started/img/architecture.png diff --git a/docs/01_Getting_Started/index.md b/docs/01_Getting_Started/index.md new file mode 100644 index 0000000000..901a932e4b --- /dev/null +++ b/docs/01_Getting_Started/index.md @@ -0,0 +1,9 @@ +# Getting Started + +This section provides a quick tutorial to get started with CoreShop. It covers the following topics: + +1. **Installation of Pimcore**: [Installation Guide](./00_Installation.md) +2. **Architecture Overview**: [Architecture Overview](./01_Architecture_Overview.md) +3. **Upgrade Notes**: [Upgrade Notes](./02_Upgrade_Notes.md) +4. **UI Documentation**: [User Interface Documentation](../02_User_Documentation/index.md) +5. **Developer Documentation**: [Developer Documentation](../03_Development/index.md) diff --git a/docs/02_User_Documentation/01_Stores.md b/docs/02_User_Documentation/01_Stores.md new file mode 100644 index 0000000000..67dd0465c1 --- /dev/null +++ b/docs/02_User_Documentation/01_Stores.md @@ -0,0 +1,45 @@ +# Stores + +In CoreShop, each installation is linked to a default store, typically associated with a Pimcore site. Understanding how +stores function is crucial for managing different aspects of your e-commerce platform. + +![Stores](img/stores.png) + +## Domain-Based Store Setup + +CoreShop's default setup involves one store per domain. This means your main website domain corresponds to your default +store. If your platform operates across multiple domains, you can assign a separate store to each. + +> **Tip:** For more information on managing multiple sites with Pimcore, +> see [Pimcore Sites](https://pimcore.com/docs/platform/Pimcore/MVC/Routing_and_URLs/Working_with_Sites/). + +## Custom Store Locator + +In scenarios where you have a single site but require different stores (for example, `/de-at` for an Austrian store +and `/de-de` for a German store), you'll need a custom store locator. Detailed guidance on creating a custom store +locator is available in the development section. + +## Setting Up CoreShop Stores + +To configure stores in CoreShop: + +1. Navigate to CoreShop Menu -> "Stores". +2. You'll see the default store linked to your main domain. +3. To add a new store, click on the "Add" button and proceed with the setup. + +## Utilizing Stores Effectively + +Stores in CoreShop can be leveraged in various ways depending on your business needs: + +### Global Store + +- **Use Case**: Managing multiple currencies, countries, and tax calculations within a single store. +- **Advantage**: Suitable for a unified product and price strategy across different regions. + +### Country Store + +- **Use Case**: Setting up a store for each country, allowing for country-specific restrictions and customizations. +- **Advantage**: Ideal for businesses targeting specific national markets. + +By understanding and utilizing the store configurations in CoreShop, you can tailor your e-commerce experience to meet +diverse regional requirements and customer preferences. diff --git a/docs/02_User_Documentation/02_Settings.md b/docs/02_User_Documentation/02_Settings.md new file mode 100644 index 0000000000..2f315909d1 --- /dev/null +++ b/docs/02_User_Documentation/02_Settings.md @@ -0,0 +1,64 @@ +# Settings + +CoreShop's settings are categorized into individual shop settings and overarching system settings. These configurations +are crucial for tailoring the functionality and behavior of your e-commerce store. + +## Shop-Specific Settings + +Each store in CoreShop can have its unique settings. + +![Settings](img/settings-shop.png) + +### Base Settings + +- **Catalog-Mode**: Enable to view products without cart and checkout functionalities. +- **Guest-Checkout**: Toggle the guest-checkout feature. + +### Customer Service Settings + +- **Customer Email Documents**: Define email templates for customer communication. +- **Contact Sales**: Set default contacts for sales-related inquiries. +- **Contact Technology**: Set default contacts for technology-related inquiries. + +### Stock Settings + +- **Default Stock Behaviour**: Set the general stock behavior for products. + +### Tax Settings + +- **Validate VAT**: Toggle VAT number validation for European countries. +- **Disable VAT for Base Country**: Enable or disable VAT-Free shopping for eligible customers in the base country. +- **Taxation Address**: Determine which address is used for taxation purposes. + +### Price Settings + +- **Prices are gross prices**: Specify whether prices entered in CoreShop include tax. + +### Shipping Settings + +- **Free Shipping Options**: Set conditions for free shipping based on weight or cart value. +- **Carrier Sort**: Define the sorting order for carriers. + +### Product Settings + +- **Default Image**: Set a default image for products without images. +- **Number of days as new**: Define the duration for marking a product as new. + +### Category Settings + +- **Default Image**: Set a default image for categories without images. + +### Invoice Settings + +- **Invoice Creation**: Set conditions for automatic invoice creation. +- **Invoice Number Formatting**: Define prefixes and suffixes for order and invoice numbers. +- **WKHTMLTOPDF Parameters**: Specify parameters for the WKHTMLTOPDF tool. + +### Mail Settings + +- **Order Notification Emails**: Define admin email addresses for order notifications. +- **Send OrderStates as BCC**: Choose whether to send order-state emails to admin-emails. + +### Cart Settings + +- **Automatic Cart Cleanup**: Toggle the automatic cleanup of inactive and empty carts. diff --git a/docs/02_User_Documentation/03_Price_Rules/01_Cart_Price_Rules.md b/docs/02_User_Documentation/03_Price_Rules/01_Cart_Price_Rules.md new file mode 100644 index 0000000000..71164c6cd7 --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/01_Cart_Price_Rules.md @@ -0,0 +1,37 @@ +# Cart Price Rules Documentation + +CoreShop provides a versatile framework for offering discounts and promotions in your e-commerce store using the Pimcore +platform. Cart price rules can be customized based on a variety of factors, including cart subtotal, specific products, +customer groups, and more. This documentation aims to guide you through the process of creating and managing cart price +rules in CoreShop. + +![Cart Price Rules](img/cart-pricerule.png) + +## Crafting Your Cart Price Rules + +### Available Actions + +Enhance your cart with these actions: + +- [Free Shipping](./06_Actions.md#free-shipping): Offer free shipping as an incentive. +- [Gift Product](./06_Actions.md#gift-product): Add a complimentary product to the cart. +- [Discount Amount](./06_Actions.md#discount-amount): Apply a fixed discount to the cart total. +- [Discount Percent](./06_Actions.md#discount-percent): Reduce cart total by a percentage. + +### Available Conditions + +Tailor your rules with these conditions: + +- [Customers](./07_Conditions.md#customers): Specific rules for individual customers. +- [Customer Groups](./07_Conditions.md#customer-groups): Target different customer segments. +- [Time Span](./07_Conditions.md#time-span): Rules active during selected time periods. +- [Voucher](./07_Conditions.md#voucher): Implement rules with vouchers. +- [Amount](./07_Conditions.md#amount): Rules based on cart amount. +- [Countries](./07_Conditions.md#countries): Geographically targeted rules. +- [Zones](./07_Conditions.md#zones): Rules for specific zones. +- [Stores](./07_Conditions.md#stores): Store-specific rules. +- [Currencies](./07_Conditions.md#currencies): Currency-based rules. +- [Carriers](./07_Conditions.md#carriers): Rules based on shipping carriers. +- [Nested Rules](./07_Conditions.md#nested-rules): Combine rules for complex scenarios. +- [Products](./07_Conditions.md#products): Product-specific rules. +- [Categories](./07_Conditions.md#categories): Category-specific rules. diff --git a/docs/02_User_Documentation/03_Price_Rules/02_Product_Price_Rules.md b/docs/02_User_Documentation/03_Price_Rules/02_Product_Price_Rules.md new file mode 100644 index 0000000000..c5f5f8b0a8 --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/02_Product_Price_Rules.md @@ -0,0 +1,33 @@ +# Product Price Rules Documentation + +CoreShop provides a dynamic and flexible approach to implementing discounts and special pricing for products in your +e-commerce store, leveraging the capabilities of the Pimcore platform. These product price rules can be tailored based +on a variety of conditions, allowing you to apply them to specific products, categories, or customer groups. This guide +will help you navigate the process of creating and managing these rules in CoreShop. + +![Product Price Rules](img/product-pricerule.png) + +## Available Actions + +Choose from a range of actions to apply as price rules: + +- [Price](./06_Actions.md#new-price): Set a new price for products. +- [Discount Price](./06_Actions.md#discount-price): Apply a discounted price. +- [Discount Amount](./06_Actions.md#discount-amount): Reduce by a specific amount. +- [Discount Percent](./06_Actions.md#discount-percent): Apply a percentage-based discount. + +## Available Conditions + +Set up price rules based on various conditions: + +- [Customers](./07_Conditions.md#customers): Target individual customers. +- [Customer Groups](./07_Conditions.md#customer-groups): Target specific customer groups. +- [Time Span](./07_Conditions.md#time-span): Apply rules within a certain time frame. +- [Voucher](./07_Conditions.md#voucher): Use in conjunction with vouchers. +- [Countries](./07_Conditions.md#countries): Target customers in specific countries. +- [Zones](./07_Conditions.md#zones): Apply to certain geographical zones. +- [Stores](./07_Conditions.md#stores): Specific to certain stores. +- [Currencies](./07_Conditions.md#currencies): Apply based on currency. +- [Nested Rules](./07_Conditions.md#nested-rules): Combine multiple rules. +- [Products](./07_Conditions.md#products): Specific to certain products. +- [Categories](./07_Conditions.md#categories): Apply to specific categories. diff --git a/docs/02_User_Documentation/03_Price_Rules/03_Specific_Price_Rules.md b/docs/02_User_Documentation/03_Price_Rules/03_Specific_Price_Rules.md new file mode 100644 index 0000000000..3541c5b37d --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/03_Specific_Price_Rules.md @@ -0,0 +1,30 @@ +# Specific Price Rules Documentation + +CoreShop's specific price rules enable a high level of flexibility in offering targeted discounts and special pricing +for individual products or variants in your e-commerce store on the Pimcore platform. These rules can be tailored based +on customer groups, currencies, or countries, ensuring precise application of discounts. This guide will assist you in +the creation and management of specific price rules in CoreShop. + +![Specific Price Rules](img/specific-price-rules.png) + +## Available Actions + +You can use a variety of actions for setting specific prices: + +- [Price](./06_Actions.md#new-price): Set a new, specific price. +- [Discount Price](./06_Actions.md#discount-price): Implement a discounted price. +- [Discount Amount](./06_Actions.md#discount-amount): Reduce the price by a fixed amount. +- [Discount Percent](./06_Actions.md#discount-percent): Apply a percentage-based discount. + +## Available Conditions + +Design rules based on a range of conditions: + +- [Customers](./07_Conditions.md#customers): Target individual customers. +- [Customer Groups](./07_Conditions.md#customer-groups): Apply rules to specific customer groups. +- [Time Span](./07_Conditions.md#time-span): Restrict rules to a specific time period. +- [Countries](./07_Conditions.md#countries): Limit to customers in certain countries. +- [Zones](./07_Conditions.md#zones): Apply within designated zones. +- [Stores](./07_Conditions.md#stores): Specific to certain stores. +- [Currencies](./07_Conditions.md#currencies): Target specific currencies. +- [Nested Rules](./07_Conditions.md#nested-rules): Combine multiple rules for layered pricing strategies. diff --git a/docs/02_User_Documentation/03_Price_Rules/04_Quantity_Price_Rules.md b/docs/02_User_Documentation/03_Price_Rules/04_Quantity_Price_Rules.md new file mode 100644 index 0000000000..35a659673b --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/04_Quantity_Price_Rules.md @@ -0,0 +1,22 @@ +# Quantity Price Rules Documentation + +CoreShop Quantity Price Rules offer a dynamic way to incentivize bulk purchases in your e-commerce store with CoreShop. +These rules enable you to apply volume-based discounts to specific products, with tiered pricing that varies based on +the quantity purchased. This guide will help you in effectively creating and managing quantity price rules within +CoreShop. + +![Quantity Price Rules](img/quantity-price-rules.png) + +## Implementing Quantity Price Rules + +These rules can be applied under various conditions to best suit your sales strategy: + +- [Customers](./07_Conditions.md#customers): Target specific individual customers. +- [Customer Groups](./07_Conditions.md#customer-groups): Apply rules to designated customer groups. +- [Time Span](./07_Conditions.md#time-span): Restrict or activate rules within certain time frames. +- [Countries](./07_Conditions.md#countries): Make rules applicable in selected countries. +- [Zones](./07_Conditions.md#zones): Define rules for specific geographical zones. +- [Stores](./07_Conditions.md#stores): Implement rules in certain stores. +- [Currencies](./07_Conditions.md#currencies): Apply rules based on the currency used. +- [Nested Rules](./07_Conditions.md#nested-rules): Create complex rules by combining multiple conditions. + diff --git a/docs/02_User_Documentation/03_Price_Rules/05_Vouchers.md b/docs/02_User_Documentation/03_Price_Rules/05_Vouchers.md new file mode 100644 index 0000000000..2bf32f73ba --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/05_Vouchers.md @@ -0,0 +1,59 @@ +# Vouchers + +> **Info**: In CoreShop, vouchers are a type of Price Rule. +> To utilize or generate Vouchers, you need to create a Cart Price Rule. + +## How to Create Vouchers + +To create a voucher, start by making a new [cart price rule](./01_Cart_Price_Rules.md) and activate the "Is Voucher +Rule" option. This will enable the "Voucher Codes" tab. + +![Voucher](./img/vouchers-1.png) + +### Voucher Condition + +For more control over Voucher handling, add the "Voucher" condition. + +![Voucher](./img/vouchers-2.png) + +| Name | Description | +|:--------------------------------|:------------------------------------------------| +| Max. Usage per Code | Define the maximum usage for each voucher code. | +| Allow only one Voucher per Code | Limit to one voucher per cart if checked. | + +### Voucher Codes + +Manage your voucher codes in the "Voucher Codes" tab, where you can also export codes to a CSV file. + +![Voucher](./img/vouchers-3.png) + +> For global statistics about vouchers, refer to the [voucher report](../09_Reports/09_Vouchers.md). + +| Name | Description | +|:--------------|:--------------------------------------------------------| +| Code | The generated voucher code. | +| Creation Date | The date when the voucher was created. | +| Used | Indicates if the voucher has been used (true or false). | +| Uses | The number of times each code has been used. | +| Action | Option to delete codes not in use. | + +### Creating Voucher Codes + +There are two methods for generating voucher codes: + +#### Single Voucher Code + +Create an individual voucher code. Note that duplicate strings are not allowed and will trigger an error message. + +#### Voucher Codes Generator + +For bulk generation, use the Voucher Codes Generator: + +| Name | Description | +|:---------------------------|:-------------------------------------------------------------| +| Amount | Number of voucher codes to generate. | +| Length | Length of each voucher code. | +| Format | Format of the code: `Alphanumeric`, `Alphabetic`, `Numeric`. | +| Prefix | A prefix for each code, e.g., `SHOP-`. | +| Suffix | A suffix for each code, e.g., `-SHOP`. | +| Hyphens every X characters | Inserts a dash (`-`) after every X characters. | diff --git a/docs/02_User_Documentation/03_Price_Rules/06_Actions.md b/docs/02_User_Documentation/03_Price_Rules/06_Actions.md new file mode 100644 index 0000000000..20f97cb6ac --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/06_Actions.md @@ -0,0 +1,78 @@ +# Price Rule Actions + +Get a brief overview of all the available *Price Rule Actions* in CoreShop. + +## Free Shipping + +> **Available for**: Cart Price Rules + +This action allows free shipping when added to a cart price rule. + +## Gift Product + +> **Available for**: Cart Price Rules + +Add a gift to the customer's cart with this action. + +#### Options + +| Name | Description | +|:-------------|:----------------------------------------------------------| +| Gift Product | The product must be a registered CoreShop product object. | + +## Discount Amount + +> **Available for**: Cart Price Rules, Specific Product Price, Product Price + +Apply a fixed amount of discount. + +#### Options + +| Name | Description | +|:---------|:------------------------------------------------------------------------------------------| +| Amount | Define the discount amount. | +| Gross | Check if the amount includes VAT. | +| Currency | Specify the currency for the amount. | +| Apply On | Choose between `total` and `subtotal`. **Note:** Only available in the cart rule context. | + +## Discount Percent + +> **Available for**: Cart Price Rules, Specific Product Price, Product Price + +Set a percentage-based discount. + +#### Options + +| Name | Description | +|:---------|:------------------------------------------------------------------------------------------| +| Percent | Define the discount percentage. | +| Apply On | Choose between `total` and `subtotal`. **Note:** Only available in the cart rule context. | + +## New Price + +> **Available for**: Specific Product Price, Product Price + +Set a new price for a product. + +> **Note**: This is used as the new sale price in the frontend, without special discount labelling. For a highlighted +> discount price, use the `Discount Price` action. + +#### Options + +| Name | Description | +|:---------|:----------------------| +| Price | Set the new price. | +| Currency | Specify the currency. | + +## Discount Price + +> **Available for**: Specific Product Price, Product Price + +Define a discounted price for a product. + +#### Options + +| Name | Description | +|:---------|:--------------------------| +| Price | Set the discounted price. | +| Currency | Specify the currency. | diff --git a/docs/02_User_Documentation/03_Price_Rules/07_Conditions.md b/docs/02_User_Documentation/03_Price_Rules/07_Conditions.md new file mode 100644 index 0000000000..a341868be3 --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/07_Conditions.md @@ -0,0 +1,162 @@ +# Price Rules Conditions + +Get a brief overview of all the available *Price Rule Conditions* in CoreShop. + +## Customers + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Target specific customers with the price rule. + +#### Options + +| Name | Description | +|:----------|:---------------------------------------------| +| Customers | Select one or more CoreShop Customer Objects | + +## Customer Groups + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Target specific customer groups. + +#### Options + +| Name | Description | +|:-------|:---------------------------------------------------| +| Groups | Select one or more CoreShop Customer Group Objects | + +## Time Span + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Set the validity period for the price rule. + +#### Options + +| Name | Description | +|:----------|:----------------| +| Date From | Start Date/Time | +| Date To | End Date/Time | + +## Voucher + +> **Available for**: Cart Price Rules + +Configure Voucher conditions. See the [Voucher Section](./05_Vouchers.md) for more details. + +#### Options + +| Name | Description | +|:--------------------------------|:------------------------------------------| +| Max. Usage per Code | Maximum usage for each voucher code. | +| Allow only one Voucher per Code | Limit to one voucher per cart if checked. | + +## Amount + +> **Available for**: Cart Price Rules + +Define the cart amount range for rule application. + +#### Options + +| Name | Description | +|:-----------|:---------------------| +| Min Amount | Minimum cart amount. | +| Max Amount | Maximum cart amount. | + +## Countries + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Link the rule to specific countries. + +#### Options + +| Name | Description | +|:----------|:----------------------------------| +| Countries | Select one or multiple Countries. | + +## Zones + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Associate the rule with specific zones. + +#### Options + +| Name | Description | +|:------|:------------------------------| +| Zones | Select one or multiple Zones. | + +## Stores + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Bind the rule to specific stores. + +#### Options + +| Name | Description | +|:-------|:-------------------------------| +| Stores | Select one or multiple Stores. | + +## Currencies + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Define applicable currencies for the rule. + +#### Options + +| Name | Description | +|:-----------|:-----------------------------------| +| Currencies | Select one or multiple Currencies. | + +## Carriers + +> **Available for**: Cart Price Rules + +Set carrier-based conditions for the rule. + +#### Options + +| Name | Description | +|:---------|:---------------------------------| +| Carriers | Select one or multiple Carriers. | + +## Nested Rules + +> **Available for**: Cart Price Rules, Specific Product Prices, Product Price + +Create complex conditions with `AND`, `OR`, and `NOT` operators. + +#### Options + +| Name | Description | +|:---------|:------------------------------| +| Operator | Choose `AND`, `OR`, or `NOT`. | + +## Products + +> **Available for**: Cart Price Rules, Product Price + +Apply the rule to specific products. + +#### Options + +| Name | Description | +|:---------|:--------------------------------------------| +| Products | Select one or more CoreShop Product Objects | + +## Categories + +> **Available for**: Cart Price Rules, Product Price + +Target products within specific categories. + +#### Options + +| Name | Description | +|:-----------|:---------------------------------------------| +| Categories | Select one or more CoreShop Category Objects | diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/cart-pricerule.png b/docs/02_User_Documentation/03_Price_Rules/img/cart-pricerule.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/cart-pricerule.png rename to docs/02_User_Documentation/03_Price_Rules/img/cart-pricerule.png diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/product-pricerule.png b/docs/02_User_Documentation/03_Price_Rules/img/product-pricerule.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/product-pricerule.png rename to docs/02_User_Documentation/03_Price_Rules/img/product-pricerule.png diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/quantity-price-rules.png b/docs/02_User_Documentation/03_Price_Rules/img/quantity-price-rules.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/quantity-price-rules.png rename to docs/02_User_Documentation/03_Price_Rules/img/quantity-price-rules.png diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/specific-price-rules.png b/docs/02_User_Documentation/03_Price_Rules/img/specific-price-rules.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/specific-price-rules.png rename to docs/02_User_Documentation/03_Price_Rules/img/specific-price-rules.png diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/vouchers-1.png b/docs/02_User_Documentation/03_Price_Rules/img/vouchers-1.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/vouchers-1.png rename to docs/02_User_Documentation/03_Price_Rules/img/vouchers-1.png diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/vouchers-2.png b/docs/02_User_Documentation/03_Price_Rules/img/vouchers-2.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/vouchers-2.png rename to docs/02_User_Documentation/03_Price_Rules/img/vouchers-2.png diff --git a/docs/docs/02_User_Documentation/03_Price_Rules/img/vouchers-3.png b/docs/02_User_Documentation/03_Price_Rules/img/vouchers-3.png similarity index 100% rename from docs/docs/02_User_Documentation/03_Price_Rules/img/vouchers-3.png rename to docs/02_User_Documentation/03_Price_Rules/img/vouchers-3.png diff --git a/docs/02_User_Documentation/03_Price_Rules/index.md b/docs/02_User_Documentation/03_Price_Rules/index.md new file mode 100644 index 0000000000..05444f9d06 --- /dev/null +++ b/docs/02_User_Documentation/03_Price_Rules/index.md @@ -0,0 +1,60 @@ +# Price Rules + +CoreShop Price Rules are powerful tools for price calculation. This section provides a detailed overview of how price +calculation works in CoreShop. + +## Types of Price Rules + +There are three types of Price Rules in CoreShop: + +#### 1. Cart Price Rules + +Apply a Price Rule to the customer's cart. + +#### 2. Product Price Rules + +Apply a Price Rule globally to products. + +#### 3. Specific Product Prices + +Apply Price Rules to specific products. + +## Global Priority + +The order of priority for price rules is as follows: + +1. **Product Price Rules** are applied first. +2. **Specific Product Prices** are applied second. + +### Example 1: + +- Given: Product A with a price of 100,- +- Product Price Rule for Product A: New Price 50,- +- Specific Price Rule for Product A: New Price 20,- +- Resulting Price: 20,- + +### Example 2: + +- Given: Product A with a price of 100,- +- Product Price Rule for Product A: Discount Percentage 50% +- Specific Price Rule for Product A: New Price 50,- +- Resulting Price: 25,- + +## Specific Price Priority + +It's possible to add multiple Specific Price Rules per Product. The priority can be adjusted using the priority number +field. + +## Automatic Rule Availability Checker + +Rules with time-span elements included on the root level will be disabled automatically if they're outdated. Read more +about automation [here](../10_Automation/index.md). + +## More Information + +- [Cart Price Rules](./01_Cart_Price_Rules.md) +- [Product Price Rules](./02_Product_Price_Rules.md) +- [Specific Product Prices](./03_Specific_Price_Rules.md) +- [Vouchers](./05_Vouchers.md) +- [Available Actions](./06_Actions.md) +- [Available Conditions](./07_Conditions.md) diff --git a/docs/02_User_Documentation/04_Localization/01_Countries.md b/docs/02_User_Documentation/04_Localization/01_Countries.md new file mode 100644 index 0000000000..ab651057e3 --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/01_Countries.md @@ -0,0 +1,14 @@ +# Country Configuration + +In CoreShop, each country is defined by a set of attributes that determine how it interacts with your store. Here's what +each attribute represents: + +- **Name**: The official name of the country. +- **ISO-Code**: The standardized international code for the country. +- **Active**: This flag determines if customers from this country can make purchases from your store. +- **Use Store Default Currency**: When checked, transactions from this country will use your store's default currency. +- **Currency**: The specific currency associated with the country. +- **Zone**: The geographical or commercial zone to which the country belongs. +- **Stores**: Specifies which of your stores the country settings apply to. + +![Countries](img/countries.png) diff --git a/docs/02_User_Documentation/04_Localization/02_States.md b/docs/02_User_Documentation/04_Localization/02_States.md new file mode 100644 index 0000000000..267e892e31 --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/02_States.md @@ -0,0 +1,11 @@ +# State Configuration + +In CoreShop, a State (or County) is defined by several key attributes essential for regional management within your +store. These attributes include: + +- **Name**: The name of the state or county. +- **ISO Code**: A unique code that follows international standards for identifying the state. +- **Active**: Indicates whether the state is active for transactions and operations in your store. +- **Country**: The country to which the state belongs. + +![States](img/states.png) diff --git a/docs/02_User_Documentation/04_Localization/03_Zones.md b/docs/02_User_Documentation/04_Localization/03_Zones.md new file mode 100644 index 0000000000..c1422888bf --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/03_Zones.md @@ -0,0 +1,9 @@ +# Zone Configuration + +In CoreShop, a 'Zone' functions as a group of countries and is defined by a set of attributes. Zones are primarily used +for configuring Price Rules and Shipping Rules. Here's an overview of the attributes for a Zone: + +- **Name**: The designated name of the zone. +- **Active**: Indicates whether the zone is active and can be used in the store's operational settings. + +![Zones](img/zones.png) diff --git a/docs/02_User_Documentation/04_Localization/04_Currencies.md b/docs/02_User_Documentation/04_Localization/04_Currencies.md new file mode 100644 index 0000000000..280bed2ecc --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/04_Currencies.md @@ -0,0 +1,19 @@ +# Currencies + +In CoreShop, the configuration of a currency involves several key attributes essential for international transactions +and currency management. + +- **Name**: The official name of the currency. +- **ISO Code**: The standardized international three-letter code representing the currency. +- **Numeric ISO Code**: The numerical code assigned to the currency, as per international standards. +- **Symbol**: The graphical symbol or abbreviation used to denote the currency (e.g., $ for USD, € for EUR). + +![Currencies](img/currencies.png) + +## Exchange Rates + +CoreShop supports automated calculation of exchange rates, simplifying the process of maintaining current and accurate +currency information. This feature is particularly useful for stores that handle transactions in multiple currencies and +need to ensure consistent and fair pricing across different regions. + +> **Important**: Regular updates of exchange rates are necessary for accurate currency conversion. \ No newline at end of file diff --git a/docs/02_User_Documentation/04_Localization/05_Taxes.md b/docs/02_User_Documentation/04_Localization/05_Taxes.md new file mode 100644 index 0000000000..3fd1d73751 --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/05_Taxes.md @@ -0,0 +1,11 @@ +# Taxes Configuration + +In CoreShop, tax rates are crucial for accurately calculating the applicable taxes on products and services. Each tax +rate is defined by the following attributes: + +- **Localized Name**: The name of the tax rate as it appears in the shopping cart and on invoices. It can be localized + to match the language preferences of different regions. +- **Rate**: The percentage value of the tax, such as 20%. +- **Active**: Indicates whether the tax rate is currently active and applicable. + +![Taxes](img/taxes.png) diff --git a/docs/02_User_Documentation/04_Localization/06_TaxRules.md b/docs/02_User_Documentation/04_Localization/06_TaxRules.md new file mode 100644 index 0000000000..9988025507 --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/06_TaxRules.md @@ -0,0 +1,16 @@ +# Tax Rules + +Tax Rules in CoreShop are instrumental in determining the appropriate Tax Rate based on the customer's country or state. +These rules ensure that the correct tax is applied to products during transactions. + +## Key Components of a Tax Rule + +Each Tax Rule is characterized by several important attributes: + +- **Name**: The identifier for the Tax Rule. +- **Active**: Indicates whether the Tax Rule is currently in use. +- **Stores**: Specifies which stores can apply this Tax Rule. +- **Rules**: Defines the relationship between Countries/States and Tax Rates, and the handling of scenarios where + multiple Tax Rates are applicable. + +![Tax Rules](img/taxrules.png) diff --git a/docs/docs/02_User_Documentation/04_Localization/img/countries.png b/docs/02_User_Documentation/04_Localization/img/countries.png similarity index 100% rename from docs/docs/02_User_Documentation/04_Localization/img/countries.png rename to docs/02_User_Documentation/04_Localization/img/countries.png diff --git a/docs/docs/02_User_Documentation/04_Localization/img/currencies.png b/docs/02_User_Documentation/04_Localization/img/currencies.png similarity index 100% rename from docs/docs/02_User_Documentation/04_Localization/img/currencies.png rename to docs/02_User_Documentation/04_Localization/img/currencies.png diff --git a/docs/docs/02_User_Documentation/04_Localization/img/states.png b/docs/02_User_Documentation/04_Localization/img/states.png similarity index 100% rename from docs/docs/02_User_Documentation/04_Localization/img/states.png rename to docs/02_User_Documentation/04_Localization/img/states.png diff --git a/docs/docs/02_User_Documentation/04_Localization/img/taxes.png b/docs/02_User_Documentation/04_Localization/img/taxes.png similarity index 100% rename from docs/docs/02_User_Documentation/04_Localization/img/taxes.png rename to docs/02_User_Documentation/04_Localization/img/taxes.png diff --git a/docs/docs/02_User_Documentation/04_Localization/img/taxrules.png b/docs/02_User_Documentation/04_Localization/img/taxrules.png similarity index 100% rename from docs/docs/02_User_Documentation/04_Localization/img/taxrules.png rename to docs/02_User_Documentation/04_Localization/img/taxrules.png diff --git a/docs/docs/02_User_Documentation/04_Localization/img/zones.png b/docs/02_User_Documentation/04_Localization/img/zones.png similarity index 100% rename from docs/docs/02_User_Documentation/04_Localization/img/zones.png rename to docs/02_User_Documentation/04_Localization/img/zones.png diff --git a/docs/02_User_Documentation/04_Localization/index.md b/docs/02_User_Documentation/04_Localization/index.md new file mode 100644 index 0000000000..2d336784b6 --- /dev/null +++ b/docs/02_User_Documentation/04_Localization/index.md @@ -0,0 +1,13 @@ +# Localization + +CoreShop provides comprehensive options for localization, ensuring that your e-commerce store can cater to a global +audience with region-specific settings. Below are the key components of CoreShop's localization system, each linked to +detailed documentation: + +- **Countries**: Configure countries. [Learn More](./01_Countries.md) +- **States**: Manage state or county settings within each country. [Learn More](./02_States.md) +- **Zones**: Group countries or regions for targeted rules and pricing. [Learn More](./03_Zones.md) +- **Currencies**: Set up and manage multiple currencies for international transactions. [Learn More](./04_Currencies.md) +- **Taxes**: Define tax rates and rules applicable to different regions. [Learn More](./05_Taxes.md) +- **Tax Rules**: Determine how taxes are applied based on customer location. [Learn More](./06_TaxRules.md) + diff --git a/docs/02_User_Documentation/05_Shipping/01_Carriers.md b/docs/02_User_Documentation/05_Shipping/01_Carriers.md new file mode 100644 index 0000000000..3562df676b --- /dev/null +++ b/docs/02_User_Documentation/05_Shipping/01_Carriers.md @@ -0,0 +1,31 @@ +# Carriers + +CoreShop Carriers play a pivotal role in the shipping process of the CoreShop e-commerce framework, enabling you to +integrate various shipping providers like UPS, FedEx, or DHL. This guide outlines the steps for creating and managing +carriers within the CoreShop environment on the Pimcore platform. + +## Creating a Carrier + +Follow these steps to set up a new carrier: + +1. **Access Admin Interface**: Log in to the Pimcore admin interface. +2. **Navigate to Shipping**: Go to the "CoreShop Menu" -> "Shipping" tab and select "Carriers." +3. **Add New Carrier**: Click on "Add new" to initiate a new carrier setup. +4. **Configure Carrier**: Enter the carrier's name and adjust the settings as required. + +## Carrier Configuration Options + +Each carrier in CoreShop can be customized with various options: + +- **Name**: Assign a descriptive name (e.g., UPS, FedEx, or DHL). +- **Tracking URL**: Provide a URL for tracking shipments. +- **Tax Rule Group**: Select a tax rule group for applying taxes to shipping costs. This requires the prior setup of an + appropriate tax rule group. +- **Shipping Rules**: Define shipping costs and conditions. You can link multiple shipping rules with different + priorities to determine the final shipping cost. + +## Summary + +Carriers in CoreShop are essential for offering diverse and customized shipping options. Through careful configuration +of carriers and their associated shipping rules, you can provide a seamless and efficient shipping experience, catering +to various customer preferences and logistics requirements in your e-commerce store. diff --git a/docs/02_User_Documentation/05_Shipping/02_Shipping_Rules.md b/docs/02_User_Documentation/05_Shipping/02_Shipping_Rules.md new file mode 100644 index 0000000000..ef15b69e6a --- /dev/null +++ b/docs/02_User_Documentation/05_Shipping/02_Shipping_Rules.md @@ -0,0 +1,62 @@ +# Shipping Rules + +CoreShop Shipping Rules are a key feature within the CoreShop e-commerce framework on the Pimcore platform, enabling you +to define shipping costs through customizable rules. These rules can be based on various conditions such as weight, +price, dimensions, and shipping destination. + +## Overview + +Shipping rules in CoreShop are composed of conditions and actions: + +- **Conditions**: Determine the applicability of a rule. +- **Actions**: Define the adjustments to shipping costs when a rule is applied. + +You can create a variety of rules, each tailored to specific shipping scenarios. + +## Creating Shipping Rules + +1. **Access Shipping Rules**: Navigate to the "Shipping" tab and select "Shipping Rules." +2. **Add New Rule**: Click "Add new" to start creating a rule. +3. **Configure Rule**: Name the rule and adjust settings according to your requirements. + +## Configuring Conditions + +Conditions are criteria that must be met for a shipping rule to apply. CoreShop supports multiple conditions per rule, +including: + +- **Weight**: Based on the total weight of the order. +- **Price**: Based on the total price of the order. +- **Dimension**: Based on order dimensions (length, width, height). +- **Quantity**: Based on the total quantity of items. +- **Countries**: Targeting specific shipping destinations. +- **Zones**: Focusing on particular geographic zones. + +### Setting Up a Condition + +- Click "Add Condition" in the rule's "Conditions" section. +- Select a condition type and configure its parameters. + +Example: For orders over 10kg, add a weight condition with a minimum weight of 10kg. + +## Configuring Actions + +Actions determine how shipping costs are modified when a rule is triggered. CoreShop allows for multiple actions per +rule, such as: + +- **Discount Amount**: A fixed discount on shipping costs. +- **Discount Percentage**: A percentage discount on shipping costs. +- **Add Amount**: An additional fixed amount to the shipping costs. +- **Add Percentage**: An extra percentage to the shipping costs. + +### Setting Up an Action + +- Click "Add Action" in the rule's "Actions" section. +- Choose an action type and set the necessary parameters. + +Example: For a 20% shipping discount, add a discount percentage action and set it to 20%. + +## Summary + +CoreShop Shipping Rules provide a versatile and robust mechanism to manage shipping costs in your e-commerce store. By +leveraging various conditions and actions, you can tailor shipping costs to meet diverse requirements and offer precise +shipping estimates to your customers. diff --git a/docs/docs/02_User_Documentation/05_Shipping/img/carriers.png b/docs/02_User_Documentation/05_Shipping/img/carriers.png similarity index 100% rename from docs/docs/02_User_Documentation/05_Shipping/img/carriers.png rename to docs/02_User_Documentation/05_Shipping/img/carriers.png diff --git a/docs/docs/02_User_Documentation/05_Shipping/img/example1-conditions.png b/docs/02_User_Documentation/05_Shipping/img/example1-conditions.png similarity index 100% rename from docs/docs/02_User_Documentation/05_Shipping/img/example1-conditions.png rename to docs/02_User_Documentation/05_Shipping/img/example1-conditions.png diff --git a/docs/docs/02_User_Documentation/05_Shipping/img/example2-action.png b/docs/02_User_Documentation/05_Shipping/img/example2-action.png similarity index 100% rename from docs/docs/02_User_Documentation/05_Shipping/img/example2-action.png rename to docs/02_User_Documentation/05_Shipping/img/example2-action.png diff --git a/docs/02_User_Documentation/05_Shipping/index.md b/docs/02_User_Documentation/05_Shipping/index.md new file mode 100644 index 0000000000..b239b9f771 --- /dev/null +++ b/docs/02_User_Documentation/05_Shipping/index.md @@ -0,0 +1,7 @@ +# Shipping + +CoreShop provides a comprehensive shipping management system that allows you to define and configure various aspects of +shipping, such as carriers, shipping rules, and carrier services. + +* [Carriers](./01_Carriers.md) +* [Shipping Rules](./02_Shipping_Rules.md) \ No newline at end of file diff --git a/docs/02_User_Documentation/06_Cart/index.md b/docs/02_User_Documentation/06_Cart/index.md new file mode 100644 index 0000000000..f602108cd6 --- /dev/null +++ b/docs/02_User_Documentation/06_Cart/index.md @@ -0,0 +1,21 @@ +# Cart + +## Inventory Check on Cart Addition + +When a customer adds an item to their cart, CoreShop verifies product stock availability. In cases where stock is +insufficient, the customer is informed through a form error. + +## Auto-Removal of Disabled or Deleted Products + +Should a product be disabled or deleted from the backend, CoreShop will automatically remove it from all active carts. +Customers with modified carts will receive a form error notification in the frontend. + +## Handling Abandoned Carts + +By default, carts are not deleted in CoreShop. This approach allows for: + +- Analysis of abandoned cart statistics. +- Development of customized follow-up strategies, such as email notifications to customers. + +For managing abandoned carts, including their removal, refer to +the [expire cart command](../../03_Development/06_Order/20_Commands.md) in the development section. diff --git a/docs/02_User_Documentation/06_Order/01_Orders.md b/docs/02_User_Documentation/06_Order/01_Orders.md new file mode 100644 index 0000000000..395afce732 --- /dev/null +++ b/docs/02_User_Documentation/06_Order/01_Orders.md @@ -0,0 +1,29 @@ +# Orders + +## Utilizing Grid View for Order Management + +CoreShop's order management leverages Pimcore's grid view, providing a robust and customizable interface. + +### Default Column Configuration + +To access the default column setup: + +1. Click on "Column configuration" located on the right side. +2. Select "Order Overview" from the options. +3. To set this as your preferred view, click the "Column configuration" button again and choose "Set as favorite". + +## Customizing Filters in Grid View + +For project-specific needs, CoreShop allows the addition of custom filter definitions: + +- These customizations require configuration through a PHP service. +- Detailed instructions and guidelines can be + found [here](../../03_Development/06_Order/14_Backend_Management/01_OrderList_Filter.md). + +## Implementing Bulk Actions in Grid View + +CoreShop supports the application of custom bulk actions for selected orders: + +- Similar to filters, these actions are set up via a PHP service. +- For more information on creating and applying these actions, + visit [here](../../03_Development/06_Order/14_Backend_Management/02_OrderList_Action.md). diff --git a/docs/02_User_Documentation/06_Order/02_Order_Detail.md b/docs/02_User_Documentation/06_Order/02_Order_Detail.md new file mode 100644 index 0000000000..e8cd24c68b --- /dev/null +++ b/docs/02_User_Documentation/06_Order/02_Order_Detail.md @@ -0,0 +1,81 @@ +# Order Detail + +The Order Detail section in CoreShop provides comprehensive information about individual orders, including their states, +price overview, and other relevant details. + +## State and Price Overview + +For an in-depth understanding of the order workflow process, refer to +the [Order Workflow documentation](./03_Order_Workflow.md). + +### Key Information + +- **Order Store**: Indicates the store where the order was placed. +- **Total Order Amount**: The complete amount for the order. + +### Order States + +#### Main State + +The primary state summarizing the overall status of the order. + +| Name | Description | +|:----------|:----------------------------| +| new | Newly placed order. | +| confirmed | Order successfully created. | +| cancelled | Order has been cancelled. | +| complete | Order is complete. | + +#### Payment State + +Reflects the overall payment status of the order. + +| Name | Description | +|:-------------------|:-------------------------------| +| new | New payment initiated. | +| awaiting_payment | Awaiting payment confirmation. | +| partially_paid | Partial payment received. | +| paid | Full payment received. | +| cancelled | Payment cancelled. | +| partially_refunded | Partial refund processed. | +| refunded | Full refund processed. | + +#### Shipment State + +Indicates the shipping status of the order. + +| Name | Description | +|:------------------|:----------------------------| +| new | New shipment initiated. | +| cancelled | Shipment cancelled. | +| partially_shipped | Partial shipment completed. | +| shipped | Full shipment completed. | + +#### Invoice State + +Summarizes the invoicing status of the order. + +| Name | Description | +|:-------------------|:-----------------------------| +| new | New invoice created. | +| cancelled | Invoice cancelled. | +| partially_invoiced | Partial invoicing completed. | +| invoiced | Full invoicing completed. | + +## Carrier and Payment Provider Information + +- **Currency**: The currency used for the order. +- **Total Weight**: The cumulative weight of all order items. +- **Carrier**: The shipping provider used. +- **Total Amount**: The total amount for the order. + +## Additional Sections + +- **Order History**: Tracks changes in order states. +- **Payments**: Details about payment transactions. +- **Shipments**: Information on shipment progress. +- **Invoices**: Records of invoicing. +- **Mail Correspondence**: Log of emails related to the order. +- **Customer**: Customer details. +- **Comments**: Any comments or notes on the order. +- **Products**: List of products included in the order. diff --git a/docs/02_User_Documentation/06_Order/03_Order_Workflow.md b/docs/02_User_Documentation/06_Order/03_Order_Workflow.md new file mode 100644 index 0000000000..58c026e7c6 --- /dev/null +++ b/docs/02_User_Documentation/06_Order/03_Order_Workflow.md @@ -0,0 +1,77 @@ +# Order Workflow + +CoreShop provides a comprehensive workflow system for managing various states of orders, payments, shipments, and +invoices. For a technical overview, refer to +the [State Management documentation](../../03_Development/06_Order/16_State_Management/index.md). + +## Changing States + +States can be changed for Orders, Payments, Shipments, and Invoices. If a transition is available, a colored state +button will be displayed. Click this button to change the state. + +## Order Completion + +In CoreShop, an order is considered complete when the payment state reaches `paid` and the shipment state +reaches `shipped`. If you wish to include the invoice state `invoiced` in the order completion criteria, this can be +enabled via the config like this: + +```yml +## app/config/config.yml +parameters: + coreshop.workflow.include_invoice_state_to_complete_order: true +``` + +#### Order Cancellation + +Orders are rarely cancelled in CoreShop, except under specific circumstances: + +- **Front-End Review**: After a customer cancels their payment, they reach a review page where they can restart the + payment process or cancel the order and restore their cart. +- **Back-End Review**: Similar to the front-end, but the customer cannot restore a cart since the order was created in + the back-end. + +More details on the cancellation process can be +found [here](../../03_Development/06_Order/16_State_Management/03_Things_To_Know.md). + +## Payment Workflow + +### Creating a Payment + +Create a payment using the green button in the top-right corner. Payment state changes are typically managed by the +frontend payment gateway. + +### Workflow Rules + +- Payments enter the `new` state upon creation. +- Payments can be cancelled as long as they are in the `new` or `processing` state. +- Once a payment reaches the `completed` state, it can only be refunded. + +> **Attention**: The refund process is not yet implemented in CoreShop! + +## Shipment Workflow + +### Creating a Shipment + +Create a shipment using the green button in the top-right corner, provided there are enough shippable items. + +### Workflow Rules + +- Shipments enter the `ready` state after creation. +- Shipments can be cancelled as long as they are in the `ready` state. +- Once the `ship` state is triggered, a shipment cannot be cancelled anymore. + +## Invoice Workflow + +### Creating an Invoice + +Create an invoice using the green button in the top-right corner, if there are enough invoiceable items. + +### Workflow Rules + +- Invoices enter the `ready` state after creation. +- Invoices can be cancelled as long as they are in the `ready` state. **Note**: Cancelling an invoice is not a refund + action. You are allowed to create another invoice after cancelling the previous one. +- Once the `complete` state is triggered, an invoice cannot be cancelled anymore, which means the invoice has been + finally captured. After that, a refund process must be initiated. + +> **Attention**: The refund process is not yet implemented in CoreShop! diff --git a/docs/02_User_Documentation/06_Order/04_Order_Comments.md b/docs/02_User_Documentation/06_Order/04_Order_Comments.md new file mode 100644 index 0000000000..67026f3134 --- /dev/null +++ b/docs/02_User_Documentation/06_Order/04_Order_Comments.md @@ -0,0 +1,21 @@ +# Order Comments + +CoreShop features a straightforward comment interface, enabling you to add notes to any order. This functionality +facilitates efficient communication and record-keeping within order management. + +![Comment](img/comment2.png) +![Comment](img/comment1.png) + +## Adding and Managing Comments + +You can easily append simple notes or comments to an order through this interface. These comments can serve as internal +reminders or clarifications regarding the order's processing or specific customer requests. + +## Sharing Comments with Customers + +For enhanced customer interaction, CoreShop allows you to share these comments directly with the customer. To do this: + +- Check the option "Submit Comment to Customer" when adding a comment. + +> **Important Note:** Ensure you have a valid Notification Rule set up in CoreShop to successfully send comments to +> customers. This rule is necessary for the system to deliver comment notifications appropriately. diff --git a/docs/docs/02_User_Documentation/06_Order/img/comment1.png b/docs/02_User_Documentation/06_Order/img/comment1.png similarity index 100% rename from docs/docs/02_User_Documentation/06_Order/img/comment1.png rename to docs/02_User_Documentation/06_Order/img/comment1.png diff --git a/docs/docs/02_User_Documentation/06_Order/img/comment2.png b/docs/02_User_Documentation/06_Order/img/comment2.png similarity index 100% rename from docs/docs/02_User_Documentation/06_Order/img/comment2.png rename to docs/02_User_Documentation/06_Order/img/comment2.png diff --git a/docs/docs/02_User_Documentation/06_Order/img/orderstates.png b/docs/02_User_Documentation/06_Order/img/orderstates.png similarity index 100% rename from docs/docs/02_User_Documentation/06_Order/img/orderstates.png rename to docs/02_User_Documentation/06_Order/img/orderstates.png diff --git a/docs/02_User_Documentation/06_Order/index.md b/docs/02_User_Documentation/06_Order/index.md new file mode 100644 index 0000000000..f1469d409c --- /dev/null +++ b/docs/02_User_Documentation/06_Order/index.md @@ -0,0 +1,6 @@ +# Order + +* [Orders](./01_Orders.md) +* [Order Detail](./02_Order_Detail.md) +* [Order Workflow](./03_Order_Workflow.md) +* [Order Comments](./04_Order_Comments.md) \ No newline at end of file diff --git a/docs/02_User_Documentation/07_Catalog/index.md b/docs/02_User_Documentation/07_Catalog/index.md new file mode 100644 index 0000000000..b15e20df7d --- /dev/null +++ b/docs/02_User_Documentation/07_Catalog/index.md @@ -0,0 +1,56 @@ +# Products + +At the heart of any e-commerce store built on the Pimcore platform are its products. CoreShop offers a robust and +versatile system for product management, designed to accommodate the diverse needs of modern e-commerce platforms. + +## Key Features of CoreShop Product Management + +CoreShop’s product management system is equipped with a range of features to effectively handle various aspects of your +e-commerce products: + +- **Product Variants**: Manage different variations of a product, such as size, color, or material, providing customers + with a range of options. +- **Attributes and Specifications**: Define and manage a wide array of product attributes to provide detailed + information to your customers. +- **Product Images and Media**: Easily upload and manage product images and other media, enhancing the visual appeal and + informational value of your products. +- **Pricing and Stock Management**: Set up flexible pricing strategies and keep track of inventory levels to ensure + efficient stock management. +- **Categories and Collections**: Organize products into categories and collections for easier navigation and discovery + by customers. + +### Streamlined Product Handling + +CoreShop’s intuitive interface allows for seamless management of products, ensuring that adding, updating, or removing +products is straightforward and efficient. + +### Customization and Integration + +With its flexible architecture, CoreShop enables extensive customization to meet specific business requirements and +seamless integration with other modules and third-party systems. + +Embracing these powerful features and capabilities will enhance your e-commerce store’s functionality, providing an +enriched shopping experience for your customers and streamlined operations for your business. + +## Variants + +CoreShop incorporates the Variant Bundle to effectively manage product variants. This bundle offers the tools and +features needed to handle different versions of a product, such as size, color, or material variations. + +For detailed information on using the Variant Bundle in CoreShop, refer to +the [Variant Bundle documentation](./../../03_Bundles/Variant_Bundle.md). + +## Categories + +Categories play a crucial role in CoreShop by helping you organize and structure the products in your e-commerce store +on the Pimcore platform. They enable the creation of a hierarchical navigation system, enhancing the shopping experience +by making it easy for customers to browse and find products. + +### Key Benefits of Using Categories + +- **Improved Navigation**: Categories facilitate a user-friendly and intuitive way for customers to navigate through + different sections of your store. +- **Better Organization**: They help in systematically categorizing products, making it easier for both store managers + and customers to locate specific items. +- **Enhanced User Experience**: A well-structured category system contributes to a seamless and enjoyable shopping + experience, encouraging customers to explore more products. diff --git a/docs/02_User_Documentation/08_Inventory/index.md b/docs/02_User_Documentation/08_Inventory/index.md new file mode 100644 index 0000000000..76a517861f --- /dev/null +++ b/docs/02_User_Documentation/08_Inventory/index.md @@ -0,0 +1,43 @@ +# Inventory + +Managing inventory in CoreShop is a critical aspect that involves understanding several key business logics to ensure +accurate stock tracking and order fulfillment. + +## Product Inventory Configuration + +Each product in CoreShop includes a "Stock" tab for inventory management. Here's a breakdown of the available +configurations: + +### Configuration Options + +| Name | Description | +|:-----------|:-------------------------------------------------------------------------------------| +| Is Tracked | Indicates whether the product's stock is tracked. | +| On Hand | The current available quantity of the product. | +| On Hold | The quantity currently reserved (locked) for orders. Do not modify unless necessary. | + +#### Is Tracked + +To activate inventory tracking for a product, enable the "Is Tracked" setting. With this enabled, the product becomes +unorderable in the frontend if the stock is insufficient. + +> **Note**: Inventory tracking is active only when "Is Tracked" is enabled. Without it, the product is considered always +> available, regardless of stock levels. + +#### On Hand + +This setting determines the available stock for each product. The stock decreases automatically with each successful +order. + +#### On Hold + +This setting requires further explanation: + +- After checkout completion, ordered items shift from "On Hand" to "On Hold" until payment is complete. +- If an unpaid order is cancelled, the "On Hold" quantity returns to "On Hand". +- If the order payment status changes to `paid`, the "On Hold" quantity is permanently deducted. + +## Cart and Checkout Process + +During the checkout process, if a product becomes out of stock, it will be removed from the customer's cart, and a form +error will be displayed. This ensures that customers are only able to purchase items that are available in stock. diff --git a/docs/02_User_Documentation/09_Reports/01_Sales.md b/docs/02_User_Documentation/09_Reports/01_Sales.md new file mode 100644 index 0000000000..5297f07a36 --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/01_Sales.md @@ -0,0 +1,40 @@ +# Sales Report Overview + +The CoreShop Sales Report provides a comprehensive analysis of sales data, enabling you to track and understand sales +trends over different time periods. + +![Sales Report](img/sales.png) + +## Report Format + +The Sales Report is presented in a Cartesian Chart format. + +| Type | Has Pagination | +|:----------------|:---------------| +| Cartesian Chart | No | + +## Filters for Tailored Analysis + +Customize your sales data view using a variety of filters: + +| Name | Description | +|:---------|:--------------------------------------------| +| Store | Filter sales by specific Store. | +| Day | Filter sales for the current Day. | +| Month | Filter sales for the current Month. | +| Year | Filter sales for the current Year. | +| Day -1 | Filter sales for the previous Day. | +| Month -1 | Filter sales for the previous Month. | +| Year -1 | Filter sales for the previous Year. | +| From | Start date for the sales filter period. | +| To | End date for the sales filter period. | +| Group By | Group sales data by `Day`, `Month`, `Year`. | + +## Chart Data Fields + +The sales chart includes the following data fields: + +| Name | Description | +|:-----|:--------------------| +| Y | Total Sales Amount. | +| X | Date of Sales. | diff --git a/docs/02_User_Documentation/09_Reports/02_Carts.md b/docs/02_User_Documentation/09_Reports/02_Carts.md new file mode 100644 index 0000000000..5297f07a36 --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/02_Carts.md @@ -0,0 +1,40 @@ +# Sales Report Overview + +The CoreShop Sales Report provides a comprehensive analysis of sales data, enabling you to track and understand sales +trends over different time periods. + +![Sales Report](img/sales.png) + +## Report Format + +The Sales Report is presented in a Cartesian Chart format. + +| Type | Has Pagination | +|:----------------|:---------------| +| Cartesian Chart | No | + +## Filters for Tailored Analysis + +Customize your sales data view using a variety of filters: + +| Name | Description | +|:---------|:--------------------------------------------| +| Store | Filter sales by specific Store. | +| Day | Filter sales for the current Day. | +| Month | Filter sales for the current Month. | +| Year | Filter sales for the current Year. | +| Day -1 | Filter sales for the previous Day. | +| Month -1 | Filter sales for the previous Month. | +| Year -1 | Filter sales for the previous Year. | +| From | Start date for the sales filter period. | +| To | End date for the sales filter period. | +| Group By | Group sales data by `Day`, `Month`, `Year`. | + +## Chart Data Fields + +The sales chart includes the following data fields: + +| Name | Description | +|:-----|:--------------------| +| Y | Total Sales Amount. | +| X | Date of Sales. | diff --git a/docs/02_User_Documentation/09_Reports/03_Abandoned_Carts.md b/docs/02_User_Documentation/09_Reports/03_Abandoned_Carts.md new file mode 100644 index 0000000000..62a52a1f51 --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/03_Abandoned_Carts.md @@ -0,0 +1,43 @@ +# Abandoned Carts Report + +The CoreShop Abandoned Carts Report is an essential tool for analyzing carts that were not converted into orders. This +report helps identify potential issues in the sales process and opportunities for re-engaging customers. + +## Report Format + +The report is presented in a list format with pagination enabled. + +| Type | Has Pagination | +|:-----|:---------------| +| List | Yes | + +## Applying Filters for Targeted Insights + +Customize the report using various filters to focus on specific data: + +| Name | Description | +|:---------|:----------------------------------| +| Store | Filter carts by Store. | +| Day | Filter for the current Day. | +| Month | Filter for the current Month. | +| Year | Filter for the current Year. | +| Day -1 | Filter for the previous Day. | +| Month -1 | Filter for the previous Month. | +| Year -1 | Filter for the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | + +## Key Grid Fields + +The report includes several crucial fields for detailed analysis: + +| Name | Description | +|:------------------|:---------------------------------------------------| +| Customer Name | Name of the customer (if available). | +| Email | Customer's email address (if available). | +| Selected Payment | Name of the payment method chosen. | +| Creation Date | Date when the cart was created. | +| Modification Date | Date when the cart was last modified. | +| Items in Cart | Total number of items in the cart. | +| Action | Option to open the cart object for further review. | + diff --git a/docs/02_User_Documentation/09_Reports/04_Products.md b/docs/02_User_Documentation/09_Reports/04_Products.md new file mode 100644 index 0000000000..b1ffa5ba6a --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/04_Products.md @@ -0,0 +1,54 @@ +# Products Report + +The CoreShop Products Report provides a comprehensive view of product performance, including sales, quantities, and +profits. This report is instrumental for analyzing product trends and making informed inventory decisions. + +![Products Report](img/products.png) + +## Report Format + +The Products Report is presented in a list format with pagination. + +| Type | Has Pagination | +|:-----|:---------------| +| List | Yes | + +## Customizing the Report with Filters + +Enhance your analysis by applying various filters: + +| Name | Description | +|:--------------|:-----------------------------------------------------------------| +| Store | Filter data by specific Store. | +| Day | Filter for the current Day. | +| Month | Filter for the current Month. | +| Year | Filter for the current Year. | +| Day -1 | Filter for the previous Day. | +| Month -1 | Filter for the previous Month. | +| Year -1 | Filter for the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | +| Product Types | Group data by `Main Products`, `Variants`, `Container Products`. | + +## Understanding Product Types + +Differentiate products based on their type for targeted analysis: + +| Name | Description | +|:-------------------|:---------------------------------------------------------------------------------------------------------------| +| Main Products | Displays only products without variant inclusion. | +| Variants | Shows only variant product types. | +| Container Products | Summarizes products and their child-products. Note: Ignored in report if the main pimcore objects are deleted. | + +## Key Grid Fields + +Analyze key metrics with the following data fields: + +| Name | Description | +|:------------|:----------------------------------------| +| Name | Product name. | +| Order Count | Total number of orders for the product. | +| Quantity | Total quantity sold. | +| Sale Price | Average sale price. | +| Sales | Total sales amount. | +| Profit | Total profit amount. | diff --git a/docs/02_User_Documentation/09_Reports/05_Categories.md b/docs/02_User_Documentation/09_Reports/05_Categories.md new file mode 100644 index 0000000000..900d03a418 --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/05_Categories.md @@ -0,0 +1,42 @@ +# Categories Report + +The CoreShop Categories Report offers valuable insights into the performance of different product categories within your +e-commerce store. This data can be instrumental in making informed decisions about inventory and marketing strategies. + +![Categories Report](img/categories.png) + +## Report Format + +The Categories Report is displayed in a list format. + +| Type | Has Pagination | +|:-----|:---------------| +| List | No | + +## Applying Filters for Detailed Analysis + +Customize the report for targeted insights using the following filters: + +| Name | Description | +|:---------|:------------------------------------| +| Store | Filter results by a specific Store. | +| Day | Filter for the current Day. | +| Month | Filter for the current Month. | +| Year | Filter for the current Year. | +| Day -1 | Filter for the previous Day. | +| Month -1 | Filter for the previous Month. | +| Year -1 | Filter for the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | + +## Key Grid Fields + +The report includes several essential fields for comprehensive category analysis: + +| Name | Description | +|:------------|:-------------------------------------------------| +| Name | The name of the product category. | +| Order Count | Total number of orders in the category. | +| Quantity | Total quantity of products sold in the category. | +| Sales | Total sales generated from the category. | +| Profit | Total profit from the category. | diff --git a/docs/02_User_Documentation/09_Reports/06_Customers.md b/docs/02_User_Documentation/09_Reports/06_Customers.md new file mode 100644 index 0000000000..a0316a8f6b --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/06_Customers.md @@ -0,0 +1,40 @@ +# Customers Report + +The CoreShop Customers Report provides an in-depth view of customer interactions within your e-commerce store. It offers +valuable insights into customer purchasing patterns, helping to tailor marketing and sales strategies effectively. + +![Customers Report](img/customers.png) + +## Report Format + +This report is formatted as a list, providing a detailed breakdown of customer activities. + +| Type | Has Pagination | +|:-----|:---------------| +| List | No | + +## Customizing the Report with Filters + +Enhance your analysis with various filters to focus on specific customer segments or timeframes: + +| Name | Description | +|:---------|:-----------------------------------------------| +| Store | Filter data by specific Store. | +| Day | Filter for transactions on the current Day. | +| Month | Filter for transactions in the current Month. | +| Year | Filter for transactions in the current Year. | +| Day -1 | Filter for transactions on the previous Day. | +| Month -1 | Filter for transactions in the previous Month. | +| Year -1 | Filter for transactions in the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | + +## Key Grid Fields + +The report includes critical fields to understand customer engagement: + +| Name | Description | +|:------------|:-----------------------------------------------| +| Name | The name of the customer. | +| Order Count | Total number of orders placed by the customer. | +| Sales | Total sales attributed to the customer. | diff --git a/docs/02_User_Documentation/09_Reports/07_Carrier_Distribution.md b/docs/02_User_Documentation/09_Reports/07_Carrier_Distribution.md new file mode 100644 index 0000000000..b25574a6b4 --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/07_Carrier_Distribution.md @@ -0,0 +1,38 @@ +# Carrier Distribution Report + +The CoreShop Carrier Distribution Report provides a visual representation of how different carriers are utilized for +shipping in your e-commerce store. This report, presented as a pie chart, is crucial for analyzing shipping preferences +and efficiency. + +![Carrier Distribution](img/carriers.png) + +## Report Format + +The report is displayed as a pie chart, offering a clear visual breakdown of carrier usage. + +| Type | Has Pagination | +|:----------|:---------------| +| Pie Chart | No | + +## Customizing the Report with Filters + +Apply various filters to refine your data analysis: + +| Name | Description | +|:---------|:-----------------------------------------------| +| Store | Filter by specific Store. | +| Day | Filter for transactions on the current Day. | +| Month | Filter for transactions in the current Month. | +| Year | Filter for transactions in the current Year. | +| Day -1 | Filter for transactions on the previous Day. | +| Month -1 | Filter for transactions in the previous Month. | +| Year -1 | Filter for transactions in the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | + +## Chart Fields + +The Carrier Distribution Report includes the following field: + +- **Carrier Distribution**: This field visualizes the proportion of each carrier used for shipping orders, helping you + to understand which carriers are most popular or efficient for your store. diff --git a/docs/02_User_Documentation/09_Reports/08_Payment_Distribution.md b/docs/02_User_Documentation/09_Reports/08_Payment_Distribution.md new file mode 100644 index 0000000000..ae8deedb3f --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/08_Payment_Distribution.md @@ -0,0 +1,38 @@ +# Payment Distribution Report + +The CoreShop Payment Distribution Report offers a detailed analysis of the various payment methods used in your +e-commerce store. Presented as a pie chart, this report is essential for understanding customer payment preferences and +optimizing your payment options. + +![Payment Distribution](img/payments.png) + +## Report Format + +This report utilizes a pie chart format to provide a visual overview of payment distribution. + +| Type | Has Pagination | +|:----------|:---------------| +| Pie Chart | No | + +## Applying Filters for Detailed Insights + +Customize your report using the following filters to focus on specific data points: + +| Name | Description | +|:---------|:-----------------------------------------------| +| Store | Filter data by specific Store. | +| Day | Filter for transactions on the current Day. | +| Month | Filter for transactions in the current Month. | +| Year | Filter for transactions in the current Year. | +| Day -1 | Filter for transactions on the previous Day. | +| Month -1 | Filter for transactions in the previous Month. | +| Year -1 | Filter for transactions in the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | + +## Chart Field + +The Payment Distribution Report includes the following field: + +- **Payment Provider Distribution**: This field visualizes the usage frequency of each payment provider, enabling you to + assess which payment methods are most popular among your customers. diff --git a/docs/02_User_Documentation/09_Reports/09_Vouchers.md b/docs/02_User_Documentation/09_Reports/09_Vouchers.md new file mode 100644 index 0000000000..718c5ee57f --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/09_Vouchers.md @@ -0,0 +1,40 @@ +# Voucher Report + +The CoreShop Voucher Report provides an analysis of voucher usage within your e-commerce store. This report is +particularly useful for tracking the effectiveness of promotional campaigns and understanding customer response to +vouchers. + +## Report Format + +The Voucher Report is presented in a list format with pagination available. + +| Type | Has Pagination | +|:-----|:---------------| +| List | Yes | + +## Customizing the Report with Filters + +Use the following filters to refine and target your analysis: + +| Name | Description | +|:---------|:------------------------------------------------| +| Store | Filter vouchers used in a specific Store. | +| Day | Filter for vouchers used on the current Day. | +| Month | Filter for vouchers used in the current Month. | +| Year | Filter for vouchers used in the current Year. | +| Day -1 | Filter for vouchers used on the previous Day. | +| Month -1 | Filter for vouchers used in the previous Month. | +| Year -1 | Filter for vouchers used in the previous Year. | +| From | Start date for the filter period. | +| To | End date for the filter period. | + +## Key Grid Fields + +The report includes essential data fields for a comprehensive overview of voucher use: + +| Name | Description | +|:-------------|:---------------------------------------------------| +| Code | The voucher code that was applied. | +| Discount | The amount of discount provided by the voucher. | +| Price Rule | The name of the price rule applied by the voucher. | +| Applied Date | The date when the voucher was applied. | diff --git a/docs/docs/02_User_Documentation/09_Reports/img/carriers.png b/docs/02_User_Documentation/09_Reports/img/carriers.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/carriers.png rename to docs/02_User_Documentation/09_Reports/img/carriers.png diff --git a/docs/docs/02_User_Documentation/09_Reports/img/carts.png b/docs/02_User_Documentation/09_Reports/img/carts.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/carts.png rename to docs/02_User_Documentation/09_Reports/img/carts.png diff --git a/docs/docs/02_User_Documentation/09_Reports/img/categories.png b/docs/02_User_Documentation/09_Reports/img/categories.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/categories.png rename to docs/02_User_Documentation/09_Reports/img/categories.png diff --git a/docs/docs/02_User_Documentation/09_Reports/img/customers.png b/docs/02_User_Documentation/09_Reports/img/customers.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/customers.png rename to docs/02_User_Documentation/09_Reports/img/customers.png diff --git a/docs/docs/02_User_Documentation/09_Reports/img/payments.png b/docs/02_User_Documentation/09_Reports/img/payments.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/payments.png rename to docs/02_User_Documentation/09_Reports/img/payments.png diff --git a/docs/docs/02_User_Documentation/09_Reports/img/products.png b/docs/02_User_Documentation/09_Reports/img/products.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/products.png rename to docs/02_User_Documentation/09_Reports/img/products.png diff --git a/docs/docs/02_User_Documentation/09_Reports/img/sales.png b/docs/02_User_Documentation/09_Reports/img/sales.png similarity index 100% rename from docs/docs/02_User_Documentation/09_Reports/img/sales.png rename to docs/02_User_Documentation/09_Reports/img/sales.png diff --git a/docs/02_User_Documentation/09_Reports/index.md b/docs/02_User_Documentation/09_Reports/index.md new file mode 100644 index 0000000000..b8dc311d91 --- /dev/null +++ b/docs/02_User_Documentation/09_Reports/index.md @@ -0,0 +1,28 @@ +# Reporting Tools Overview + +CoreShop provides a comprehensive suite of reporting tools designed to deliver valuable insights into various facets of +your e-commerce store. These reports are crucial for understanding sales trends, customer behaviors, and other key +metrics, helping you make informed decisions to drive your business forward. + +## Explore Our Range of Reports + +Each report in CoreShop is tailored to offer specific insights: + +- **Sales Reports**: Delve into your store's sales performance, including revenue and order volumes, to gauge your + business's success. [Access Sales Report](./01_Sales.md) +- **Cart/Order Conversion**: Analyze the rate at which carts are converted into completed orders, a vital metric for + understanding the effectiveness of your sales funnel. [Access Cart/Order Conversion Report](./02_Carts.md) +- **Abandoned Carts**: Identify and understand the carts that weren’t converted into orders, providing insights into + potential sales recovery strategies. [Access Abandoned Carts Report](./03_Abandoned_Carts.md) +- **Product Reports**: Evaluate individual product performances within your catalog, helping you make data-driven + inventory decisions. [Access Product Report](./04_Products.md) +- **Category Reports**: Gain insights into category performances, essential for strategic product placement and + marketing. [Access Category Report](./05_Categories.md) +- **Customer Analysis**: Dive deep into customer behaviors and purchasing patterns to tailor your marketing and sales + approaches. [Access Customer Analysis Report](./06_Customers.md) +- **Carrier Distribution**: Review how different carriers are used for order deliveries, an important aspect of your + shipping strategy. [Access Carrier Distribution Report](./07_Carrier_Distribution.md) +- **Payment Distribution**: Understand the distribution and popularity of various payment methods among your + customers. [Access Payment Distribution Report](./08_Payment_Distribution.md) +- **Voucher Usage**: Monitor how vouchers are used and their impact on sales, vital for optimizing promotional + strategies. [Access Voucher Report](./09_Vouchers.md) diff --git a/docs/02_User_Documentation/10_Automation/index.md b/docs/02_User_Documentation/10_Automation/index.md new file mode 100644 index 0000000000..19b211fb24 --- /dev/null +++ b/docs/02_User_Documentation/10_Automation/index.md @@ -0,0 +1,85 @@ +# Automation + +CoreShop implements several automated mechanisms to streamline operations and maintain order within the system. These +automations are executed daily via maintenance jobs. + +## Order Cancellation Automation + +**Execution Time**: Once per day. + +### Default Behavior + +CoreShop automatically cancels orders that are older than 20 days. + +### Customizing Order Expiration + +To change the expiration period for orders, modify the configuration as follows: + +```yml +core_shop_storage_list: + list: + order: + expiration: + params: + order: + days: 30 +``` + +## Expired Carts Cleanup + +**Execution Time**: Once per day. + +> **Note**: By default, cart cleanup is disabled (set to 0 days). + +Expired carts are not removed unless you enable and configure this feature. Set a specific timeframe after which +inactive carts should be cleaned up to manage cart data effectively. + +#### Enabling Cart Cleanup + +To activate and set a specific time frame for cart cleanup: + +```yml +core_shop_storage_list: + list: + order: + expiration: + params: + cart: + days: 20 + params: + anonymous: true + customer: false +``` + +## Expired Wishlists + +**Execution Time**: Once per day. +> **Note**: Wishlist expiration is disabled by default. + +Similar to carts, wishlists also do not expire by default. You can enable this feature and set an expiration period for +wishlists, helping to maintain a clean and current wishlist database. + +#### Setting Wishlist Expiration + +To enable and configure the expiration for wishlists: + +```yml +core_shop_storage_list: + list: + wishlist: + expiration: + service: ~ # use default service + enabled: true + days: 14 + params: + anonymous: true + customer: false +``` + +## Expired Rules Management + +**Execution Time**: Once per day. + +CoreShop automatically disables rules that are beyond their valid time-span. This feature helps in keeping your rule set +relevant and up-to-date. For more complex rule availability logic, CoreShop provides an +event (`coreshop.rule.availability_check`) that allows for custom implementation of rule availability criteria. \ No newline at end of file diff --git a/docs/docs/02_User_Documentation/img/settings-shop.png b/docs/02_User_Documentation/img/settings-shop.png similarity index 100% rename from docs/docs/02_User_Documentation/img/settings-shop.png rename to docs/02_User_Documentation/img/settings-shop.png diff --git a/docs/docs/02_User_Documentation/img/stores.png b/docs/02_User_Documentation/img/stores.png similarity index 100% rename from docs/docs/02_User_Documentation/img/stores.png rename to docs/02_User_Documentation/img/stores.png diff --git a/docs/02_User_Documentation/index.md b/docs/02_User_Documentation/index.md new file mode 100644 index 0000000000..5ef0c98824 --- /dev/null +++ b/docs/02_User_Documentation/index.md @@ -0,0 +1,50 @@ +# User Documentation + +Welcome to the CoreShop User Documentation! This section provides a comprehensive guide to get you started with +CoreShop, covering various key aspects of the platform. + +## Quick Start Topics + +Explore these topics to familiarize yourself with the CoreShop platform: + +1. **[Stores](./01_Stores.md)**: Understanding the store setup in CoreShop. +2. **[Settings](./02_Settings.md)**: Configuration options for each store and system-wide settings. +3. **Price Rules**: Comprehensive guide to pricing strategies. + - [Cart Price Rules](./03_Price_Rules/01_Cart_Price_Rules.md) + - [Product Price Rules](./03_Price_Rules/02_Product_Price_Rules.md) + - [Specific Product Price](./03_Price_Rules/03_Specific_Price_Rules.md) + - [Vouchers](./03_Price_Rules/05_Vouchers.md) + - [Available Actions](./03_Price_Rules/06_Actions.md) + - [Available Conditions](./03_Price_Rules/07_Conditions.md) +4. **Localization**: Managing geographical aspects. + - [Countries](./04_Localization/01_Countries.md) + - [States](./04_Localization/02_States.md) + - [Zones](./04_Localization/03_Zones.md) + - [Currencies](./04_Localization/04_Currencies.md) + - [Taxes](./04_Localization/05_Taxes.md) + - [Tax Rules](./04_Localization/06_TaxRules.md) +5. **Shipping**: Configuring shipping options and rules. + - [Carriers](./05_Shipping/01_Carriers.md) + - [Shipping Rules](./05_Shipping/02_Shipping_Rules.md) +6. **[Cart](./06_Cart/index.md)**: Overview of cart functionalities. +7. **Order Management**: Detailed guide on order processing. + - [Orders](./06_Order/01_Orders.md) + - [Order Detail](./06_Order/02_Order_Detail.md) + - [Order Workflow](./06_Order/03_Order_Workflow.md) + - [Order Comments](./06_Order/04_Order_Comments.md) +8. **Catalog Management**: Managing your product catalog. + - [Products](./07_Catalog/index.md) + - [Product Variants](./07_Catalog/index.md) + - [Categories](./07_Catalog/index.md) +9. **[Inventory](./08_Inventory/index.md)**: Inventory management insights. +10. **Reports**: Understanding reporting tools for data analysis. + - [Sales](./09_Reports/01_Sales.md) + - [Cart/Order Conversion](./09_Reports/02_Carts.md) + - [Abandoned Carts](./09_Reports/03_Abandoned_Carts.md) + - [Products](./09_Reports/04_Products.md) + - [Categories](./09_Reports/05_Categories.md) + - [Customers](./09_Reports/06_Customers.md) + - [Carrier Distribution](./09_Reports/07_Carrier_Distribution.md) + - [Payment Distribution](./09_Reports/08_Payment_Distribution.md) + - [Vouchers](./09_Reports/09_Vouchers.md) +11. **[Automation](./10_Automation/index.md)**: Automated processes in CoreShop. diff --git a/docs/03_Bundles/ClassDefinitionPatch_Bundle.md b/docs/03_Bundles/ClassDefinitionPatch_Bundle.md new file mode 100644 index 0000000000..6cba38cd04 --- /dev/null +++ b/docs/03_Bundles/ClassDefinitionPatch_Bundle.md @@ -0,0 +1,82 @@ +# Class Definition Patch Bundle + +The CoreShop Class Definition Patch Bundle provides a convenient way to modify class definitions from other bundles. +This is particularly useful for adding new properties to existing classes through a configuration setup. + +## Installation + +```bash +$ composer require coreshop/class-definitions-patch-bundle:^4.0 +``` + +### Adding required bundles to kernel + +You need to enable the bundle inside the kernel. + +```php +addBundles([ + new \CoreShop\Bundle\ClassDefinitionPatchBundle\CoreShopClassDefinitionPatchBundle(), + ]); +} +``` + +## Usage + +### Configuration for Patching + +To patch a Pimcore class definition, add a configuration like the following: + +```yaml +core_shop_class_definition_patch: + patches: + CoreShopCompany: + interface: 'blub' + fields: + name2: + before: 'addresses' + definition: + fieldtype: input + title: coreshop.company.name2 +``` + +### Patching CoreShop Classes + +For patching CoreShop classes, leverage the parameters provided by CoreShop: + +```yaml +core_shop_class_definition_patch: + patches: + %coreshop.model.order.pimcore_class_name%: + fields: + total2: + before: 'total' + definition: + fieldtype: coreShopMoney + title: Total 2 +``` + +### Preview Changes + +Before applying the changes, preview them using: + +```bash +bin/console coreshop:patch:classes --dump +``` + +### Applying the Patch + +Once you're satisfied with the preview, apply the patch: + +```bash +bin/console coreshop:patch:classes --force +``` + +> **Note** that the patch modifies your local definitions, which should be part of your version control (e.g., git +> repository). After applying the patch, commit these changes. There's no need to run the patch command during +> deployment. \ No newline at end of file diff --git a/docs/03_Bundles/Index_Bundle.md b/docs/03_Bundles/Index_Bundle.md new file mode 100644 index 0000000000..7a2cc404cb --- /dev/null +++ b/docs/03_Bundles/Index_Bundle.md @@ -0,0 +1,92 @@ +# Index Bundle + +The Index Bundle integrates the Index Component into Symfony and Doctrine, offering tools for indexing Pimcore models, +managing filters, and creating conditions. It includes ListingServices and FilterServices. + +## Installation Process + +To install the bundle, use Composer: + +```bash +$ composer require coreshop/index-bundle:^4.0 +``` + +### Integrating with the Kernel + +Enable the bundle in the kernel by updating the `AppKernel.php` file: + +```php +addBundles([ + new \CoreShop\Bundle\IndexBundle\CoreShopIndexBundle(), + ]); +} +``` + +### Updating the Database Schema + +Update the database schema with the following command: + +```bash +$ php bin/console doctrine:schema:update --force +``` + +## Usage Guidelines + +### Creating an Indexable Class + +Define a class that implements the `CoreShop\Component\Index\Model\IndexableInterface` interface: + +```php +getName($language); + } +} +``` + +Ensure that `App\Model\MyPimcoreDataObject` is set as your parent class for your Pimcore Data-Object. + +### Retrieving Listings from an Index + +Fetch a listing from an index: + +```php +$filter = $this->get('coreshop.repository.filter')->find(1); // Get Filter by ID 1 +$filteredList = $this->get('coreshop.factory.filter.list')->createList($filter, $request->request); +$filteredList->setVariantMode(ListingInterface::VARIANT_MODE_HIDE); +$filteredList->setCategory($category); +$this->get('coreshop.filter.processor')->processConditions($filter, $filteredList, $request->query); +$filteredList->load(); +``` + +This Index Bundle is crucial for managing indexing and filtering of data within CoreShop, ensuring efficient data +handling and retrieval. diff --git a/docs/03_Bundles/Menu_Bundle.md b/docs/03_Bundles/Menu_Bundle.md new file mode 100644 index 0000000000..c5f34feb0f --- /dev/null +++ b/docs/03_Bundles/Menu_Bundle.md @@ -0,0 +1,90 @@ +# Menu Bundle + +The Menu Bundle simplifies the creation of Pimcore menus based on permissions, enhancing the user interface and +navigation experience. + +## Installation Process + +To install the Menu Bundle, use Composer: + +```bash +$ composer require coreshop/menu-bundle:^4.0 +``` + +### Integrating with the Kernel + +Enable the bundle in the kernel by updating the `AppKernel.php` file: + +```php +addBundles([ + new \CoreShop\Bundle\MenuBundle\CoreShopMenuBundle(), + ]); +} +``` + +## Usage Instructions + +### Creating a New Menu + +1. **Define a Menu Builder Class**: + Create a new class for your menu, such as `MyMenuBuilder`. + + ```php + addChild('my-menu-item') + ->setLabel('my-menu-item') + ->setAttribute('permission', 'my_menu_item') + ->setAttribute('iconCls', 'pimcore_icon_delete'); + } + } + ``` + +2. **Register the Menu Builder**: + Register your menu builder class in the Symfony container. + + ```yml + app.my_menu: + class: AppBundle\Menu\MyMenuBuilder + tags: + - { name: coreshop.menu, type: my_menu, menu: my_menu } + ``` + +### Implementing the ExtJs JavaScript Part + +1. **Add a JavaScript File**: + In your bundle's `Bundle.php` file, add the JavaScript file to the `jsPaths` + array: `/admin/coreshop/coreshop.my_menu/menu.js` +2. **Instantiate the Menu**: + In your `startup.js` file, instantiate the menu: + + ```javascript + new coreshop.menu.coreshop.my_menu(); + + pimcore.eventDispatcher.registerTarget('coreshopMenuOpen', new (Class.create({ + coreshopMenuOpen: function(type, item) { + if (item.id === 'my-menu-item') { + alert('My Menu Item has been clicked'); + } + } + + ``` + + + diff --git a/docs/03_Bundles/Messenger_Bundle.md b/docs/03_Bundles/Messenger_Bundle.md new file mode 100644 index 0000000000..175e16fda1 --- /dev/null +++ b/docs/03_Bundles/Messenger_Bundle.md @@ -0,0 +1,30 @@ +# Messenger Bundle + +The CoreShop Messenger Bundle provides a user-friendly interface to view queued Messenger tasks across different queues. + +![Messenger](img/messenger.png) + +## Installation Process + +To install the Messenger Bundle, use Composer: + +```bash +$ composer require coreshop/messenger-bundle:^4.0 +``` + +### Integrating with the Kernel + +To enable the bundle, update the `AppKernel.php` file: + +```php +addBundles([ + new \CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle(), + ]); +} +``` diff --git a/docs/03_Bundles/Money_Bundle.md b/docs/03_Bundles/Money_Bundle.md new file mode 100644 index 0000000000..115b053cbe --- /dev/null +++ b/docs/03_Bundles/Money_Bundle.md @@ -0,0 +1,44 @@ +# Money Bundle + +The Money Bundle provides an efficient way to handle and format monetary values within CoreShop. + +## Installation Process + +To install the Money Bundle, use Composer: + +```bash +$ composer require coreshop/money-bundle:^4.0 +``` + +### Integrating with the Kernel + +To enable the bundle, update the `AppKernel.php` file: + +```php +addBundles([ + new \CoreShop\Bundle\MoneyBundle\CoreShopMoneyBundle(), + ]); +} +``` + +## Usage Instructions + +The Money Bundle introduces a core extension in Pimcore, allowing you to store currency values as integers. This +approach ensures precision and consistency in financial data handling. + +### Twig Extension for Money Formatting + +The bundle includes a Twig extension for formatting money values: + +```twig +{{ value|coreshop_format_money('€', 'de'); }} +``` + +This extension allows for easy and flexible formatting of monetary values within your templates, enhancing the display +and readability of prices and financial figures in CoreShop. diff --git a/docs/03_Bundles/OptimisticEntityLock_Bundle.md b/docs/03_Bundles/OptimisticEntityLock_Bundle.md new file mode 100644 index 0000000000..5a3779ed3d --- /dev/null +++ b/docs/03_Bundles/OptimisticEntityLock_Bundle.md @@ -0,0 +1,50 @@ +# Optimistic Entity Lock Bundle + +The CoreShop Optimistic Entity Lock Bundle is a specialized package for the CoreShop e-commerce framework, designed for +handling optimistic entity locking on the Pimcore platform. This bundle is crucial for preventing editing conflicts when +multiple users attempt to modify the same entity simultaneously. + +## Installation Process + +To install the Optimistic Entity Lock Bundle, use Composer: + +```bash +$ composer require coreshop/optimistic-entity-lock-bundle:^4.0 +``` + +### Integrating with the Kernel + +Enable the bundle in the kernel by updating the `AppKernel.php` file: + +```php +addBundles([ + new \CoreShop\Bundle\OptimisticEntityLockBundle\CoreShopOptimisticEntityLockBundle(), + ]); +} +``` + +## Usage Instructions + +### Implementing the Interface + +Your Pimcore DataObject Class needs to implement +the `CoreShop\Bundle\OptimisticEntityLockBundle\Model\OptimisticLockedInterface`. + +### Adding the Field to Class Definition + +Add the field `optimisticLockVersion` to your Pimcore Class Definition. This field is pivotal for the locking mechanism. + +### Functionality + +Once implemented, every time the DataObject is saved, CoreShop checks and increments the version number. If the version +differs from the last saved state (indicating another user has saved changes), an exception is thrown, preventing +overwrite conflicts. + +This bundle ensures data integrity and consistency in scenarios where concurrent editing might occur, safeguarding your +e-commerce data against inadvertent overwrites. diff --git a/docs/docs/03_Bundles/Pimcore_Bundle.md b/docs/03_Bundles/Pimcore_Bundle.md similarity index 86% rename from docs/docs/03_Bundles/Pimcore_Bundle.md rename to docs/03_Bundles/Pimcore_Bundle.md index a48dfd8ccd..724c0e67fb 100644 --- a/docs/docs/03_Bundles/Pimcore_Bundle.md +++ b/docs/03_Bundles/Pimcore_Bundle.md @@ -1,11 +1,13 @@ -# Pimcore Bundle +# Pimcore Bundle ## Installation + ```bash -$ composer require coreshop/pimcore-bundle:^3.0 +$ composer require coreshop/pimcore-bundle:^4.0 ``` ### Activating Bundle + You need to enable the bundle inside the kernel or with the Pimcore Extension Manager. ```php @@ -23,10 +25,13 @@ public function registerBundlesToCollection(BundleCollection $collection) ## Usage -The CoreShopPimcoreBundle integrates the CoreShop Pimcore Component into Symfony automatically registers a lot of services for you. +The CoreShopPimcoreBundle integrates the CoreShop Pimcore Component into Symfony automatically registers a lot of +services for you. ### JS/CSS Resource Loading -With Pimcore, every bundle needs to take care about loading static assets themselve. PimcoreBundle helps you out here, follow these steps to use it: + +With Pimcore, every bundle needs to take care about loading static assets themselve. PimcoreBundle helps you out here, +follow these steps to use it: - Create a DependencyInjection Extension class like: @@ -35,12 +40,12 @@ With Pimcore, every bundle needs to take care about loading static assets themse namespace AppBundle\DependencyInjection; -use CoreShop\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractModelExtension; +use CoreShop\Bundle\PimcoreBundle\DependencyInjection\Extension\AbstractPimcoreExtension; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -class AppExtension extends AbstractModelExtension +class AppExtension extends AbstractPimcoreExtension { public function load(array $config, ContainerBuilder $container) { @@ -116,18 +121,22 @@ final class Configuration implements ConfigurationInterface ### DataObject Extensions #### Serialized Data + This extension allows you to store SerializedData inside a Pimcore DataObject. ### Slug -Pimcore comes with quite useful objects slugs. But it doesn't come with a Slug Generator. CoreShop for the rescue. In Order to use it, -your class needs to implement `CoreShop\Component\Pimcore\Slug\SluggableInterface` and CoreShop automatically generates slugs for you. +Pimcore comes with quite useful objects slugs. But it doesn't come with a Slug Generator. CoreShop for the rescue. In +Order to use it, +your class needs to implement `CoreShop\Component\Pimcore\Slug\SluggableInterface` and CoreShop automatically generates +slugs for you. #### Extensions / Influence the slug generation -If you want to change the generated slug or prefix it, you can use the `CoreShop\Component\Pimcore\Event\SlugGenerationEvent` Event. +If you want to change the generated slug or prefix it, you can use +the `CoreShop\Component\Pimcore\Event\SlugGenerationEvent` Event. -``` +```php createFieldCollection($pathToJson, $fcName); ``` #### Class/Brick/Field Collection Updater + Definition Updaters help you in migrating your Pimcore Class/Bricks or Field Collection Definitions to be properly migrated from Release to Release. @@ -248,11 +266,14 @@ if (!$classUpdater->hasField('paymentSettings')) { ``` -Thats it, the same works for FieldCollections with the class `CoreShop\Component\Pimcore\DataObject\FieldCollectionDefinitionUpdate` +Thats it, the same works for FieldCollections with the +class `CoreShop\Component\Pimcore\DataObject\FieldCollectionDefinitionUpdate` and for Bricks with the class `CoreShop\Component\Pimcore\DataObject\BrickDefinitionUpdate` #### Inheritance Helper -Inhertiance Helper is a small little but very useful helper class to enable Pimcore inheritance only with a closure function like this: + +Inhertiance Helper is a small little but very useful helper class to enable Pimcore inheritance only with a closure +function like this: ```php @@ -265,6 +286,7 @@ $inheritedValue = InheritanceHelper::useInheritedValues(function() use($object) ``` #### Version Helper + Version Helper is a small little but very useful helper class to disabling or enablind Pimcore Versioning. ```php @@ -279,6 +301,7 @@ VersionHelper::useVersioning(function() use($object) { ``` #### Unpublished Helper + Unpublsihed Helper is a small little but very useful helper class to get unpublished objects in Pimcore Frontend. ```php @@ -293,6 +316,7 @@ $allProducts = UnpublishedHelper::hideUnpublished(function() use($object) { ``` ### Expression Language Features + CoreShop adds some features to the Symfony Expression language like: - PimcoreLanguageProvider: to get Pimcore Objects, Assets or Documents inside a Expression Language Query @@ -300,6 +324,7 @@ CoreShop adds some features to the Symfony Expression language like: ### Migration Features #### Pimcore Shared Translations + Helps you to install new Shared Translations during Migration: ```php diff --git a/docs/03_Bundles/Resource_Bundle/01_Custom_Entities.md b/docs/03_Bundles/Resource_Bundle/01_Custom_Entities.md new file mode 100644 index 0000000000..e5ce76d408 --- /dev/null +++ b/docs/03_Bundles/Resource_Bundle/01_Custom_Entities.md @@ -0,0 +1,208 @@ +# Adding a New Custom Doctrine Entity + +## Step 1: Create Translatable Entity + +First, create your Entity Class. In this case, we create a Translatable Entity. + +### CustomEntityInterface + +Create `CustomEntityInterface.php` in the `AppBundle/Model` directory. + +```php +initializeTranslationsCollection(); + } + + // Getters and Setters +} +``` + +### CustomEntityTranslationInterface + +Create `CustomEntityTranslationInterface.php` in the `AppBundle/Model` directory. + +```php +processConfiguration($this->getConfiguration([], $container), $config); $this->registerPimcoreModels('app', $config['pimcore'], $container); } } - ``` +## Step 4: Use Your Pimcore Entity -## Use your Pimcore Entity +You can either use Pimcore Listing Classes or the automatically generated Factory/Repository Classes. -You can either use Pimcore Listing Classes like: +### Using Pimcore Listing Classes ```php $list = new Pimcore\Model\Object\PimcoreEntity\Listing(); ``` -or use automated generated Factory/Repository Classes +### Using Factory/Repository Classes ```php $pimcoreEntityObject = $container->get('app.repository.pimcore_entity')->findBy($id); diff --git a/docs/03_Bundles/Resource_Bundle/index.md b/docs/03_Bundles/Resource_Bundle/index.md new file mode 100644 index 0000000000..ce7b6edc83 --- /dev/null +++ b/docs/03_Bundles/Resource_Bundle/index.md @@ -0,0 +1,139 @@ +# Resource Bundle + +The Resource Bundle is a central component of CoreShop, handling the creation, reading, updating, and deleting (CRUD) of +CoreShop models. It manages Doctrine ORM mappings, translations, routing, event dispatching, serialization, and CRUD +operations. This bundle also facilitates the installation of various Pimcore definitions. + +## Installation Process + +To install the Resource Bundle, use Composer: + +```bash +$ composer require coreshop/resource-bundle:^4.0 +``` + +### Integrating with the Kernel + +Enable the bundle in the kernel by updating the `AppKernel.php` file: + +```php +addBundles([ + new \CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle(), + ]); +} +``` + +## Adding Custom Doctrine Entities + +To create custom entities or extend existing CoreShop Doctrine entities: + +1. **Enable Doctrine ORM**: + + ```yaml + # app/config/config.yml + doctrine: + orm: + mappings: + App: + is_bundle: false + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App + ``` + +2. **Create Your Entity**: + + ```php + # src/Entity/CustomEntity.php + addBundles([ + new \CoreShop\Bundle\SEOBundle\CoreShopSEOBundle(), + ]); +} +``` + +## Usage + +### Updating SEO Information + +Utilize the `coreshop.seo.presentation` service to update SEO metadata: + +```php +// From a Controller +$this->get('coreshop.seo.presentation')->updateSeoMetadata($object); +``` + +### Implementing SEO Interfaces + +The SEO Bundle includes several interfaces: + +- `CoreShop\Component\SEO\Model\SEOAwareInterface`: For meta-title and meta-description. +- `CoreShop\Component\SEO\Model\SEOImageAwareInterface`: For the og-image attribute. +- `CoreShop\Component\SEO\Model\SEOImageAwareInterface`: For og-title, og-type, and pg-description attributes. + +### Implementing SEO Extractors + +To create a custom extractor, implement the `ExtractorInterface` and register it with the tag `coreshop.seo.extractor`. + +#### Example: Custom Extractor for Product Class + +Implement a custom extractor for the Product class: + +```php +addBundles([ + new \CoreShop\Bundle\SequenceBundle\CoreShopSequenceBundle(), + ]); +} +``` + +### Updating the Database Schema + +After installation, update the database schema with the following command: + +```bash +$ php bin/console doctrine:schema:update --force +``` + +## Usage + +The Sequence Bundle integrates the Sequence Component into Symfony and Doctrine, providing essential tools for +generating sequences within your application. + +### Doctrine Entities + +The primary entity used in the Sequence Bundle is `Sequence`. + +### Generating a New Sequence + +To generate a new sequence, use the sequence generator service: + +```php +$container->get('coreshop.sequence.generator')->getNextSequenceForType('my_sequence'); +``` + +This bundle enhances the functionality of CoreShop, enabling efficient and orderly sequence generation for various +operational needs. diff --git a/docs/03_Bundles/StorageList_Bundle.md b/docs/03_Bundles/StorageList_Bundle.md new file mode 100644 index 0000000000..f033252db3 --- /dev/null +++ b/docs/03_Bundles/StorageList_Bundle.md @@ -0,0 +1,82 @@ +# Storage List Bundle + +The Storage List Bundle assists in managing lists and collections of objects, such as carts, wishlists, or compare +lists, in CoreShop. + +## Installation Process + +To install the Storage List Bundle, use Composer: + +```bash +$ composer require coreshop/storage-list-bundle:^4.0 +``` + +## Usage + +The bundle requires three models to function effectively: + +1. **Storage List** - Represents the collection. Implement + the [`StorageListInterface`](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/StorageList/Model/StorageListInterface.php). +2. **Storage Item** - The item within the collection, which can store additional information, such as prices for a cart. + Implement + the [`StorageListItemInterface`](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/StorageList/Model/StorageListItemInterface.php). +3. **Storage Product** - The actual product being stored inside the item. Implement + the [`StorageListProductInterface`](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/StorageList/Model/StorageListProductInterface.php). + +CoreShop provides basic implementations +of [`Storage List`](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/StorageList/Model/StorageList.php) +and [`Storage Item`](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/StorageList/Model/StorageItem.php). +You will need to implement the StorageListProduct yourself. + +### Mutating Lists + +Use +the [`Storage List Modifier`](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/StorageList/StorageListModifier.php) +to create and persist lists. + +### Example: Basic Session-Based Wishlist + +Let's create a session-based wishlist with the following components: + +- Factory class for the Wishlist +- Factory class for the Wishlist Item +- StorageListManager (repository-like) +- StoreListModifier + +CoreShop provides basic classes for these components: + +```php +use Symfony\Component\HttpFoundation\Session\Session; + +use CoreShop\Component\StorageList\Model\StorageList; +use CoreShop\Component\StorageList\Model\StorageListItem; +use CoreShop\Component\Resource\Factory\Factory; +use CoreShop\Component\StorageList\SessionStorageManager; +use CoreShop\Component\StorageList\SessionStorageListModifier; + +$session = new Session(); +$session->start(); + +$wishlistFactory = new Factory(StorageList::class); +$wishlistItemFactory = new Factory(StorageListItem::class); + +$wishlistManager = new SessionStorageManager($session, 'wishlist', $wishlistFactory); +$wishlistModifier = new SessionStorageListModifier($wishlistItemFactory, $wishlistManager); + +// Adding data to our List +$list = $wishlistManager->getStorageList(); +$product = $productRepository->find(1); // Assumes StorageListProductInterface implementation + +$listItem = $wishlistItemFactory->createNew(); +$listItem->setProduct($product); +$listItem->setQuantity($quantity); + +// Adding a Product +$wishlistModifier->addToList($list, $listItem); + +// Removing a Product +$wishlistModifier->removeFromList($list, $listItem); +``` + +This bundle simplifies the management of various storage lists within CoreShop, enhancing the functionality and user +experience of your e-commerce platform. diff --git a/docs/docs/03_Bundles/Theme_Bundle.md b/docs/03_Bundles/Theme_Bundle.md similarity index 50% rename from docs/docs/03_Bundles/Theme_Bundle.md rename to docs/03_Bundles/Theme_Bundle.md index 521d52a8e8..38da6744ec 100644 --- a/docs/docs/03_Bundles/Theme_Bundle.md +++ b/docs/03_Bundles/Theme_Bundle.md @@ -1,14 +1,19 @@ -# Theme Bundle +# Theme Bundle -CoreShop Theme Bundle provides you with a flexible and extensible way of having multiple themes in a Pimcore installation. +The CoreShop Theme Bundle offers a flexible and extensible approach to managing multiple themes within a Pimcore +installation. + +## Installation Process + +To install the Theme Bundle, use Composer: -## Installation ```bash -$ composer require coreshop/theme-bundle:^3.0 +$ composer require coreshop/theme-bundle:^4.0 ``` -### Adding required bundles to kernel -You need to enable the bundle inside the kernel. +### Integrating with the Kernel + +Enable the bundle in the kernel by updating the `AppKernel.php` file: ```php addBundles([ + new \CoreShop\Bundle\VariantBundle\CoreShopVariantBundle(), + ]); +} +``` + +## Abstract + +Pimcore supports variants but does not define the specifics of what a variant is or how it differs from the parent +product or other variants. CoreShop addresses this by introducing two entities: + +1. **Attribute Group** (`CoreShop\Component\Variant\Model\AttributeGroupInterface`): Defines types like size or color. +2. **Attribute Value** (`CoreShop\Component\Variant\Model\AttributeValueInterface`): Represents values like `XL` + or `Red`. + +The product is an abstract entity specifying the allowed attribute groups, with its variants needing to have these group +values filled. + +### Example + +- **AttributeGroup Color**: Contains `AttributeValue Red` and `AttributeValue Blue`. +- **Product**: Defines allowed groups for color. + - **Variant-Red**: Defines the `AttributeValue Red` in attributes. + - **Variant-Blue**: Defines the `AttributeValue Blue` in attributes. + +## Usage + +### Class Installation + +The Variant Bundle does not come with an installer for required resources. You need to install what you need manually. +By default, it includes three classes: + +- `CoreShopAttributeGroup` +- `CoreShopAttributeColor` +- `CoreShopAttributeValue` + +The classes `Color` and `Value` represent value types, while `Group` is a group type. Manually import the classes +from `vendor/coreshop/variant-bundle/Resources/install/pimcore/classes`. + +### Creating a "Product" Class + +Implement the `CoreShop\Component\Variant\Model\ProductVariantAwareInterface` for your "Product" class. It should +include these fields: + +- **attributes**: ManyToManyObjectRelation for `CoreShopAttributeColor`/`CoreShopAttributeValue`. +- **allowedAttributeGroups**: ManyToManyObjectRelation for `CoreShopAttributeGroup`. +- **mainVariant**: ManyToOneRelation for `Product` (i.e., your class implementing the interface). + +The Variant Bundle significantly enhances the flexibility of product management in CoreShop, allowing for detailed and +diverse product variant configurations. diff --git a/docs/docs/03_Bundles/img/messenger.png b/docs/03_Bundles/img/messenger.png similarity index 100% rename from docs/docs/03_Bundles/img/messenger.png rename to docs/03_Bundles/img/messenger.png diff --git a/docs/docs/03_Bundles/img/patch.png b/docs/03_Bundles/img/patch.png similarity index 100% rename from docs/docs/03_Bundles/img/patch.png rename to docs/03_Bundles/img/patch.png diff --git a/docs/03_Bundles/index.md b/docs/03_Bundles/index.md new file mode 100644 index 0000000000..1071bccc99 --- /dev/null +++ b/docs/03_Bundles/index.md @@ -0,0 +1,36 @@ +# Bundles Overview + +CoreShop offers a suite of bundles that address various non-e-commerce specific functionalities. These bundles are +versatile and can be utilized in any Pimcore installation, extending beyond the scope of typical e-commerce solutions. + +## Available Bundles + +Explore the range of bundles provided by CoreShop, each designed to fulfill specific roles within your Pimcore +installation: + +- **[Class Definition Patch Bundle](./ClassDefinitionPatch_Bundle.md)**: Enables patching of class definitions from + other bundles. +- **[Index Bundle](./Index_Bundle.md)**: Facilitates advanced indexing capabilities. +- **[Money Bundle](./Money_Bundle.md)**: Provides tools for handling monetary values. +- **[Messenger Bundle](./Messenger_Bundle.md)**: Enhances message handling and delivery. +- **[Optimistic Entity Lock Bundle](./OptimisticEntityLock_Bundle.md)**: Implements optimistic locking for entities. +- **[Resource Bundle](./Resource_Bundle/index.md)**: Streamlines repetitive tasks like CRUD operations. +- **[SEO Bundle](./SEO_Bundle.md)**: Offers features for search engine optimization. +- **[Sequence Bundle](./Sequence_Bundle.md)**: Manages sequential number generation. +- **[Storage List Bundle](./StorageList_Bundle.md)**: Handles complex data storage requirements. +- **[Theme Bundle](./Theme_Bundle.md)**: Facilitates theme management and customization. +- **[Variant Bundle](./Variant_Bundle.md)**: Manages product variants effectively. + +### Focus on Resource Bundle + +One of CoreShop's primary objectives is to provide a flexible framework. The Resource Bundle is a foundational component +that simplifies many common tasks: + +- Automates the creation of CRUD controllers (`ResourceController`). +- Streamlines the generation of factories, repositories, routes, and resource controllers for CoreShop resources. + +This bundle proves invaluable not only for CoreShop-specific functionalities but also for any Pimcore bundle, offering +extensive utility across various applications. For more details on the Resource Bundle, [click here](./Resource_Bundle). + +These bundles collectively enhance the capabilities of your Pimcore installation, providing powerful tools to meet +diverse requirements in a streamlined and efficient manner. diff --git a/docs/03_Development/01_Extending_Guide/01_Extend_CoreShop_Resources.md b/docs/03_Development/01_Extending_Guide/01_Extend_CoreShop_Resources.md new file mode 100644 index 0000000000..7380473834 --- /dev/null +++ b/docs/03_Development/01_Extending_Guide/01_Extend_CoreShop_Resources.md @@ -0,0 +1,126 @@ +# Extend CoreShop Resources + +All models in Coreshop are placed in the `Coreshop\Component\*ComponentName*\Model` namespaces alongside with their +interfaces. + +> Many models in CoreShop are extended in the Core component. If the model you are willing to override exists in the +> Core you should be extending the Core one, not the base model from the component. + +## How to Customize a Model + +First things first: If you want to extend coreshop models your Bundle must extend the `AbstractResourceBundle`. Next you +have set your supported drivers. Just add the following lines of code to your bundle class: + +```php +public function getSupportedDrivers(): array +{ +return [ +CoreShopResourceBundle::DRIVER_DOCTRINE_ORM +]; +} +``` + +After that have to tell the bundle where your models are. For that, add the override the following method in your bundle +class and return the model namespace. Here is an example for the `AppBundle`: + +```php +protected function getModelNamespace(): string +{ +return "AppBundle\Model"; +} +``` + +Here a quick overview for you which directories are important for you, when customizing CoreShop models. + +| Folder | Description | +|-------------------------------------------|-----------------------------------------------| +| `AcmeBundle/Model` or `AcmeBundle/Entity` | Where your models are living | +| `AcmeBundle/config/doctrine/model` | Put your doctrine `.yml` config files in here | +| `AcmeBundle/config/serializer` | The serializer configs for the models | + +Let’s take the `CoreShop\Component\Currency\Model\Currency` as an example. This one is extended in Core. How can you +check that? + +First of all, you need to find the current used class by doing following: + +```bash +$ php bin/console debug:container --parameter=coreshop.model.currency.class +``` + +As a result you will get the `CoreShop\Component\Core\Model\Currency` - this is the class that you need to be extending. + +Assuming you want to add a field called **flag**: + +**1.** The first thing to do is to write your own class which will extend the base `Currency` class: + +```php +flag; + } + + /** + * @param bool $flag + */ + public function setFlag($flag) + { + $this->flag = $flag; + } +} +``` + +**2.** Next define your entity’s mapping. The file should be placed +in `AppBundle/Resources/config/doctrine/Currency.orm.yml`: + +```yaml +AppBundle\Entity\Currency: + type: mappedSuperclass + table: coreshop_currency + fields: + flag: + type: boolean + nullable: true +``` + +**3.** Finally, you’ll need to override the model’s class in the `app/config/config.yml`. + +Under the `core_shop_currency`, modify as follows: + +```yaml +core_shop_currency: + resources: + currency: + classes: + model: AppBundle\Entity\Currency +``` + +**4.** Update the database. There are two ways to do it: + +via direct database schema update: + +```bash +$ php bin/console doctrine:schema:update --force +``` + +via migrations (recommended): + +```bash +$ php bin/console doctrine:migrations:diff +$ php bin/console doctrine:migrations:migrate +``` diff --git a/docs/docs/03_Development/01_Extending_Guide/02_Extend_CoreShop_Forms.md b/docs/03_Development/01_Extending_Guide/02_Extend_CoreShop_Forms.md similarity index 58% rename from docs/docs/03_Development/01_Extending_Guide/02_Extend_CoreShop_Forms.md rename to docs/03_Development/01_Extending_Guide/02_Extend_CoreShop_Forms.md index f68cb3cbff..ae25f9858f 100644 --- a/docs/docs/03_Development/01_Extending_Guide/02_Extend_CoreShop_Forms.md +++ b/docs/03_Development/01_Extending_Guide/02_Extend_CoreShop_Forms.md @@ -1,12 +1,12 @@ # Customizing Forms -The forms in CoreShop are placed in the ``CoreShop\Bundle\*BundleName*\Form\Type`` namespaces and the extensions -will be placed in `AppBundle\Form\Extension`. +The forms in CoreShop are placed in the `CoreShop\Bundle\*BundleName*\Form\Type` namespaces and the extensions will be +placed in `AppBundle\Form\Extension`. ## Why would you customize a Form? -There are plenty of reasons to modify forms that have already been defined in CoreShop. -Your business needs may sometimes slightly differ from our internal assumptions. +There are plenty of reasons to modify forms that have already been defined in CoreShop. Your business needs may +sometimes slightly differ from our internal assumptions. You can: @@ -16,29 +16,32 @@ You can: ## How to customize a CoreShop Resource Form? -If you want to modify the form for the ``Store`` in your system there are a few steps that you should take. -Assuming that you would like to (for example): +If you want to modify the form for the `Store` in your system there are a few steps that you should take. Assuming that +you would like to (for example): -* Add a ```contactHours``` field, +* Add a `contactHours` field, These will be the steps that you will have to take to achieve that: -**1.** If your are planning to add new fields remember that beforehand they need to be added on the model that the form type is based on. +**1.** If your are planning to add new fields remember that beforehand they need to be added on the model that the form +type is based on. -In case of our example if you need to have the ```contactHours``` on the model and the entity mapping for the ```Store``` resource. -To get to know how to prepare that go [there](./01_Extend_CoreShop_Resources.md) +In case of our example if you need to have the `contactHours` on the model and the entity mapping for the `Store` +resource. To get to know how to prepare that go [there](./01_Extend_CoreShop_Resources.md). **2.** Create a **Form Extension**. Your form has to extend a proper base class. How can you check that? -For the ``StoreType`` run: +For the `StoreType` run: ```bash $ php bin/console debug:container coreshop.form.type.store ``` -As a result you will get the [```CoreShop\Bundle\StoreBundle\Form\Type\StoreType```](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreType.php) - this is the class that you need to be extending. +As a result you will get +the [```CoreShop\Bundle\StoreBundle\Form\Type\StoreType```](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreType.php) - +this is the class that you need to be extending. ```php add('some_value', TextType::class) +; +} +``` + +With configuration, comes a Javascript file as well: + +```javascript +//AppBundle/Resources/public/pimcore/js/custom_condition.js + +pimcore.registerNS('coreshop.product.pricerule.conditions.custom'); +coreshop.product.pricerule.conditions.custom = Class.create(coreshop.rules.conditions.abstract, { + + type: 'custom', + + getForm: function () { + var some_value = 0; + var me = this; + + if (this.data) { + some_value = this.data.some_value / 100; + } + + var some_valueField = new Ext.form.NumberField({ + fieldLabel: t('custom'), + name: 'some_value', + value: some_value, + decimalPrecision: 2 + }); + + this.form = new Ext.form.Panel({ + items: [ + some_valueField + ] + }); + + return this.form; + } +}); +``` + +Don't forget to run the following command afterwards to deploy it if needed. If you're using the latest symfony +structure, omit the `web`. + +```php +bin/console assets:install +``` + +## Registering the Custom Condition to the Container and load the Javascript File + +We now need to create our Service Definition for our Custom Condition: + +```yaml +app.product_price_rule.custom_condition: + class: AppBundle\CoreShop\CustomCondition + tags: + - { name: coreshop.product_price_rule.condition, type: custom, form-type: AppBundle\Form\Type\CustomConditionType } +``` + +and add this to your config.yml: + +```yaml +core_shop_product: + pimcore_admin: + js: + custom_condition: '/bundles/app/pimcore/js/custom_condition.js' diff --git a/docs/03_Development/01_Extending_Guide/index.md b/docs/03_Development/01_Extending_Guide/index.md new file mode 100644 index 0000000000..b075b1d106 --- /dev/null +++ b/docs/03_Development/01_Extending_Guide/index.md @@ -0,0 +1,40 @@ +# Extending CoreShop + +Welcome to the Extending Guide for CoreShop. This guide is an essential resource for developers looking to tailor +CoreShop to their specific business needs. CoreShop's architecture is built with extensibility in mind, allowing for +seamless integration and customization of its components. Whether you're extending resources, forms, data objects, or +rule actions and conditions, this guide provides you with the knowledge and tools necessary to enhance and adapt +CoreShop functionalities. + +## Extending CoreShop Resources + +CoreShop leverages Doctrine ORM for managing its resources, offering a robust and flexible way to extend these models. +Learn how to add new fields, change relationships, or modify resource behaviors to suit your specific requirements. + +- [Extending CoreShop Resources](01_Extend_CoreShop_Resources.md) + +## Customizing CoreShop Forms + +Forms are a critical part of any eCommerce platform, and CoreShop provides the ability to customize them to capture the +exact data you need. Discover techniques for adding new form fields, adjusting validations, or altering form layouts to +improve user experience and data collection. + +- [Extending CoreShop Forms](02_Extend_CoreShop_Forms.md) + +## Extending Data Objects + +Data objects in CoreShop are central to managing product information, customer data, and more. This section covers how +to extend these Pimcore data objects, enabling you to add custom attributes, change object behaviors, or integrate with +external systems. + +- [Extending CoreShop DataObjects](03_Extend_CoreShop_DataObjects.md) + +## Rule Actions and Conditions + +CoreShop's rule engine is powerful and versatile. Extending rule actions and conditions opens up possibilities for +creating complex, tailored rules that align with your unique business logic. Whether it's pricing rules, discount +conditions, or shipping calculations, learn how to craft custom rules that fit your business model perfectly. + +- [Extending CoreShop Rule Actions](04_Extending_Rule_Actions.md) +- [Extending CoreShop Rule Conditions](05_Extending_Rule_Conditions.md) + diff --git a/docs/docs/03_Development/02_Localization/01_Currencies/01_CRUD.md b/docs/03_Development/02_Localization/01_Currencies/01_CRUD.md similarity index 86% rename from docs/docs/03_Development/02_Localization/01_Currencies/01_CRUD.md rename to docs/03_Development/02_Localization/01_Currencies/01_CRUD.md index 9a7f758e28..a35d6b5e31 100644 --- a/docs/docs/03_Development/02_Localization/01_Currencies/01_CRUD.md +++ b/docs/03_Development/02_Localization/01_Currencies/01_CRUD.md @@ -1,6 +1,7 @@ -# CoreShop Currencies +# Currencies ## Create + If you want to create a Currency via API, you can do following: ```php @@ -35,7 +36,7 @@ $currencies = $queryBuilder->getQuery()->getResult(); ## Update -If you want to update and existing Currency, you need to do following: +If you want to update an existing Currency, you need to do following: ```php // Fetch Currency @@ -49,14 +50,15 @@ $container->get('coreshop.manager.currency')->flush(); ``` ## Delete -If you want to update and existing Currency, you need to do following: + +If you want to delete an existing Currency, you need to do following: ```php // Fetch Currency $currency = $currencyRepository->findById(1); -// And Persist it +// And remove it $container->get('coreshop.manager.currency')->remove($currency); $container->get('coreshop.manager.currency')->flush(); -``` \ No newline at end of file +``` diff --git a/docs/03_Development/02_Localization/01_Currencies/03_Context.md b/docs/03_Development/02_Localization/01_Currencies/03_Context.md new file mode 100644 index 0000000000..e0e91a274a --- /dev/null +++ b/docs/03_Development/02_Localization/01_Currencies/03_Context.md @@ -0,0 +1,28 @@ +# Currency Context + +CoreShop utilizes a concept known as context and context resolvers to determine the current currency. This section +explains the different types of contexts available and how to create a custom resolver. + +## Context Types + +CoreShop defines several contexts to identify the appropriate currency for the current request. Each context is +characterized by its name, priority, associated tag, and a specific role. The following table outlines these contexts: + +| Name | Priority | Tag | Description | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|-----------------------------|-----------------------------------------------------------------------------------| +| [FixedCurrencyContext](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Currency/Context/FixedCurrencyContext.php) | default | `coreshop.context.currency` | Primarily used for testing purposes. | +| [StorageBasedCurrencyContext](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Core/Context/Currency/StorageBasedCurrencyContext.php) | default | `coreshop.context.currency` | Checks if a currency has been changed during a frontend request. | +| [CountryAwareCurrencyContext](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Core/Context/Currency/CountryAwareCurrencyContext.php) | default | `coreshop.context.currency` | Commonly used as it determines the currency based on the current country context. | + +## Creating a Custom Currency Resolver + +To implement a custom Currency Context, follow these steps: + +1. **Implement the Interface**: Your custom context should implement + the `CoreShop\Component\Currency\Context\CurrencyContextInterface`. +2. **Define the Method**: The interface requires the implementation of a method named `getCurrency`. This method should + return an instance of `CoreShop\Component\Currency\Model\CurrencyInterface` or throw + a `CoreShop\Component\Currency\Context\CurrencyNotFoundException` if the currency cannot be determined. +3. **Register the Context**: Add your custom context to the system by using the tag `coreshop.context.currency`. You can + also assign a `priority` attribute, which is optional but can be used to define the order in which contexts are + evaluated. diff --git a/docs/03_Development/02_Localization/01_Currencies/index.md b/docs/03_Development/02_Localization/01_Currencies/index.md new file mode 100644 index 0000000000..1f6bb6b121 --- /dev/null +++ b/docs/03_Development/02_Localization/01_Currencies/index.md @@ -0,0 +1,11 @@ +# Currencies + +> CoreShop is a multi-currency capable eCommerce Framework. It allows for the creation and utilization of various +> currencies. + +## Currency Operations + +1. **[Create, Update, Read, Delete](./01_CRUD.md)**: Detailed instructions on how to manage currencies within CoreShop, + including creating, updating, reading, and deleting currency data. +2. **[Currency Context](./03_Context.md)**: An overview of how CoreShop determines the current currency using the + concept of context and context resolvers, along with guidelines for implementing custom currency contexts. diff --git a/docs/docs/03_Development/02_Localization/02_Countries/01_CRUD.md b/docs/03_Development/02_Localization/02_Countries/01_CRUD.md similarity index 68% rename from docs/docs/03_Development/02_Localization/02_Countries/01_CRUD.md rename to docs/03_Development/02_Localization/02_Countries/01_CRUD.md index 58cd2b4c67..c66b877603 100644 --- a/docs/docs/03_Development/02_Localization/02_Countries/01_CRUD.md +++ b/docs/03_Development/02_Localization/02_Countries/01_CRUD.md @@ -1,62 +1,58 @@ -# CoreShop Countries +a# Countries + +In CoreShop, managing countries through the API involves several operations including create, read, update, and delete. +Below are the guidelines for each of these operations. ## Create -If you want to create a Country via API, you can do following: + +To create a new country via API: ```php $newCountry = $container->get('coreshop.factory.country')->createNew(); ``` -Now you have a new Country, if you want to persist it, you need to do following: +After creating a new Country instance, persist it using: ```php $container->get('coreshop.manager.country')->persist($newCountry); $container->get('coreshop.manager.country')->flush(); ``` -You now have a new persisted Country. +You now have a new persisted country. ## Read -If you want to query for Countries, you can do following: +To query for countries: ```php $countryRepository = $container->get('coreshop.repository.country'); - $queryBuilder = $countryRepository->createQueryBuilder('c'); - // You can now create your query - // And get the result - $countries = $queryBuilder->getQuery()->getResult(); - ``` ## Update -If you want to update and existing Country, you need to do following: +To update an existing country: ```php // Fetch Country - $country = $countryRepository->findById(1); $country->setName('Euro'); - // And Persist it $container->get('coreshop.manager.country')->persist($country); $container->get('coreshop.manager.country')->flush(); ``` ## Delete -If you want to update and existing Country, you need to do following: + +To delete an existing country: ```php // Fetch Country - $country = $countryRepository->findById(1); - -// And Persist it +// And Remove it $container->get('coreshop.manager.country')->remove($country); $container->get('coreshop.manager.country')->flush(); -``` \ No newline at end of file +``` diff --git a/docs/03_Development/02_Localization/02_Countries/02_Context.md b/docs/03_Development/02_Localization/02_Countries/02_Context.md new file mode 100644 index 0000000000..d8a1e27fbb --- /dev/null +++ b/docs/03_Development/02_Localization/02_Countries/02_Context.md @@ -0,0 +1,70 @@ +# Country Context + +CoreShop uses a system of contexts and resolvers to determine the current country of a visitor or customer. + +## Context + +Different contexts are used for determining the appropriate country in various scenarios: + +| Name | Priority | Tag | Description | +|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------------------------|---------------------------------------------------------------| +| [FixedCountryContext](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Address/Context/FixedCountryContext.php) | default | `coreshop.context.country` | For testing purposes. | +| [CountryContext](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Address/Context/RequestBased/CountryContext.php) | default | `coreshop.context.country` | Checks for a country within the country request resolver. | +| [StoreAwareCountryContext](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Core/Context/Country/StoreAwareCountryContext.php) | default | `coreshop.context.country` | Considers the current store context to determine the country. | + +## Resolver + +Resolvers are used to find the correct country based on different criteria: + +| Name | Priority | Tag | Description | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------------------------------------------------|--------------------------------------------------------| +| [GeoLiteBasedRequestResolver](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Address/Context/RequestBased/GeoLiteBasedRequestResolver.php) | 10 | `coreshop.context.country.request_based.resolver` | Uses the Geo Lite Database to determine user location. | + +## Create a Custom Resolver + +To create a custom Country Context: + +1. **Implement the Interface**: Your context should + implement `CoreShop\Component\Address\Context\CountryContextInterface`. + +2. **Define the Method**: This interface has a method `getCountry` + returning `CoreShop\Component\Address\Model\CountryInterface` or + throwing `CoreShop\Component\Address\Context\CountryNotFoundException`. + +3. **Register the Context**: Use the tag `coreshop.context.country` with an optional `priority` attribute for + registration. + +## Create a Request-Based Resolver + +CoreShop supports custom request-based country context resolvers: + +1. **Implement the Interface**: Create a resolver that + implements `CoreShop\Component\Address\Context\RequestBased\RequestResolverInterface`. + +2. **Define the Method**: Implement the method `findCountry`, which returns a country or null based on the request. + +3. **Register the Resolver**: Use the tag `coreshop.context.country.request_based.resolver` with an optional `priority` + attribute. + +## Example + +Creating a `DocumentBasedRequestRequestResolver` based on Pimcore Document: + +```php +// PHP code for creating DocumentBasedRequestRequestResolver +``` + +And configure the service: + +```yaml +services: +app.coreshop.country.context.request.document_based: +class: AppBundle\CoreShop\Address\Context\DocumentBasedRequestRequestResolver +arguments: + - '@Pimcore\Http\Request\Resolver\DocumentResolver' + - '@coreshop.repository.country' +tags: + - { name: coreshop.context.country.request_based.resolver } +``` + +CoreShop will now resolve the current country based on the Pimcore site being accessed. diff --git a/docs/03_Development/02_Localization/02_Countries/index.md b/docs/03_Development/02_Localization/02_Countries/index.md new file mode 100644 index 0000000000..f46c500d7a --- /dev/null +++ b/docs/03_Development/02_Localization/02_Countries/index.md @@ -0,0 +1,10 @@ +# Countries + +> CoreShop is a multi-country capable eCommerce Framework, enabling the creation and utilization of various countries. + +## Managing Countries + +1. **[Create, Update, Read, Delete](./01_CRUD.md)**: Comprehensive guidelines for performing basic CRUD (Create, Read, + Update, Delete) operations on countries within CoreShop. +2. **[Country Context](./02_Context.md)**: Detailed information on how CoreShop determines the country context for a + visitor or customer, including the implementation and customization of country contexts and resolvers. diff --git a/docs/docs/03_Development/02_Localization/03_States/01_CRUD.md b/docs/03_Development/02_Localization/03_States/01_CRUD.md similarity index 69% rename from docs/docs/03_Development/02_Localization/03_States/01_CRUD.md rename to docs/03_Development/02_Localization/03_States/01_CRUD.md index e7b41c701a..030b0ddbc1 100644 --- a/docs/docs/03_Development/02_Localization/03_States/01_CRUD.md +++ b/docs/03_Development/02_Localization/03_States/01_CRUD.md @@ -1,62 +1,58 @@ # States +Managing states in CoreShop involves various operations, including create, read, update, and delete. Below are the +guidelines for each of these operations. + ## Create -If you want to create a State via API, you can do following: + +To create a new state via the API: ```php $newState = $container->get('coreshop.factory.state')->createNew(); ``` -Now you have a new State, if you want to persist it, you need to do following: +After creating a new State instance, persist it using: ```php $container->get('coreshop.manager.state')->persist($newState); $container->get('coreshop.manager.state')->flush(); ``` -You now have a new persisted State. +You now have a new persisted state. ## Read -If you want to query for States, you can do following: +To query for states: ```php $stateRepository = $container->get('coreshop.repository.state'); - $queryBuilder = $stateRepository->createQueryBuilder('c'); - // You can now create your query - // And get the result - $states = $queryBuilder->getQuery()->getResult(); - ``` ## Update -If you want to update and existing State, you need to do following: +To update an existing state: ```php // Fetch State - $state = $stateRepository->findById(1); $state->setName('Euro'); - // And Persist it $container->get('coreshop.manager.state')->persist($state); $container->get('coreshop.manager.state')->flush(); ``` ## Delete -If you want to update and existing State, you need to do following: + +To delete an existing state: ```php // Fetch State - $state = $stateRepository->findById(1); - -// And Persist it +// And Remove it $container->get('coreshop.manager.state')->remove($state); $container->get('coreshop.manager.state')->flush(); -``` \ No newline at end of file +``` diff --git a/docs/03_Development/02_Localization/03_States/index.md b/docs/03_Development/02_Localization/03_States/index.md new file mode 100644 index 0000000000..c3621d30c4 --- /dev/null +++ b/docs/03_Development/02_Localization/03_States/index.md @@ -0,0 +1,6 @@ +# States + +In CoreShop, you can manage states using various operations. These are detailed in the following sections: + +1. **[Create, Update, Read, Delete](./01_CRUD.md)**: This section provides comprehensive instructions for performing + basic CRUD (Create, Read, Update, Delete) operations on states within Core diff --git a/docs/docs/03_Development/02_Localization/04_Zones/01_CRUD.md b/docs/03_Development/02_Localization/04_Zones/01_CRUD.md similarity index 69% rename from docs/docs/03_Development/02_Localization/04_Zones/01_CRUD.md rename to docs/03_Development/02_Localization/04_Zones/01_CRUD.md index 1ad93cfc84..01fefbbf07 100644 --- a/docs/docs/03_Development/02_Localization/04_Zones/01_CRUD.md +++ b/docs/03_Development/02_Localization/04_Zones/01_CRUD.md @@ -1,62 +1,58 @@ # Zones +Managing zones in CoreShop involves various operations, including create, read, update, and delete. Below are the +guidelines for each of these operations. + ## Create -If you want to create a Zone via API, you can do following: + +To create a new zone via the API: ```php $newZone = $container->get('coreshop.factory.zone')->createNew(); ``` -Now you have a new Zone, if you want to persist it, you need to do following: +After creating a new Zone instance, persist it using: ```php $container->get('coreshop.manager.zone')->persist($newZone); $container->get('coreshop.manager.zone')->flush(); ``` -You now have a new persisted Zone. +You now have a new persisted zone. ## Read -If you want to query for Zones, you can do following: +To query for zones: ```php $zoneRepository = $container->get('coreshop.repository.zone'); - $queryBuilder = $zoneRepository->createQueryBuilder('c'); - // You can now create your query - // And get the result - $zones = $queryBuilder->getQuery()->getResult(); - ``` ## Update -If you want to update and existing Zone, you need to do following: +To update an existing zone: ```php // Fetch Zone - $zone = $zoneRepository->findById(1); $zone->setName('Euro'); - // And Persist it $container->get('coreshop.manager.zone')->persist($zone); $container->get('coreshop.manager.zone')->flush(); ``` ## Delete -If you want to update and existing Zone, you need to do following: + +To delete an existing zone: ```php // Fetch Zone - $zone = $zoneRepository->findById(1); - -// And Persist it +// And Remove it $container->get('coreshop.manager.zone')->remove($zone); $container->get('coreshop.manager.zone')->flush(); -``` \ No newline at end of file +``` diff --git a/docs/03_Development/02_Localization/04_Zones/index.md b/docs/03_Development/02_Localization/04_Zones/index.md new file mode 100644 index 0000000000..5ef7254548 --- /dev/null +++ b/docs/03_Development/02_Localization/04_Zones/index.md @@ -0,0 +1,6 @@ +# Zones + +CoreShop allows for comprehensive management of zones, which is detailed in the following section: + +1. **[Create, Update, Read, Delete](./01_CRUD.md)**: This section provides step-by-step instructions for performing + basic CRUD (Create, Read, Update, Delete) operations on zones within CoreShop. diff --git a/docs/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/01_CRUD.md b/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/01_CRUD.md similarity index 56% rename from docs/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/01_CRUD.md rename to docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/01_CRUD.md index 884a28a90f..484e36fe98 100644 --- a/docs/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/01_CRUD.md +++ b/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/01_CRUD.md @@ -1,62 +1,58 @@ # Tax Rates +Managing tax rates in CoreShop involves various operations, including create, read, update, and delete. Below are the +guidelines for each of these operations. + ## Create -If you want to create a Zone via API, you can do following: + +To create a new tax rate via the API: ```php -$newZone = $container->get('coreshop.factory.tax_rate')->createNew(); +$newTaxRate = $container->get('coreshop.factory.tax_rate')->createNew(); ``` -Now you have a new Zone, if you want to persist it, you need to do following: +After creating a new Tax Rate instance, persist it using: ```php -$container->get('coreshop.manager.tax_rate')->persist($newZone); +$container->get('coreshop.manager.tax_rate')->persist($newTaxRate); $container->get('coreshop.manager.tax_rate')->flush(); ``` -You now have a new persisted Zone. +You now have a new persisted tax rate. ## Read -If you want to query for Tax Rates, you can do following: +To query for tax rates: ```php $rateRepository = $container->get('coreshop.repository.tax_rate'); - $queryBuilder = $rateRepository->createQueryBuilder('c'); - // You can now create your query - // And get the result - $rates = $queryBuilder->getQuery()->getResult(); - ``` ## Update -If you want to update and existing Zone, you need to do following: +To update an existing tax rate: ```php -// Fetch Zone - +// Fetch Tax Rate $rate = $rateRepository->findById(1); $rate->setName('Euro'); - // And Persist it $container->get('coreshop.manager.tax_rate')->persist($rate); $container->get('coreshop.manager.tax_rate')->flush(); ``` ## Delete -If you want to update and existing Zone, you need to do following: -```php -// Fetch Zone +To delete an existing tax rate: +```php +// Fetch Tax Rate $rate = $rateRepository->findById(1); - -// And Persist it +// And Remove it $container->get('coreshop.manager.tax_rate')->remove($rate); $container->get('coreshop.manager.tax_rate')->flush(); -``` \ No newline at end of file +``` diff --git a/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/index.md b/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/index.md new file mode 100644 index 0000000000..9258127503 --- /dev/null +++ b/docs/03_Development/02_Localization/05_Taxes/01_Tax_Rate/index.md @@ -0,0 +1,8 @@ +# Tax Rate + +> The Tax Rate in CoreShop represents a single tax rate percentage, such as 20%. + +## Managing Tax Rates + +1. **[Create, Update, Read, Delete](./01_CRUD.md)**: This section provides detailed instructions for performing the + basic CRUD (Create, Read, Update, Delete) operations on tax rates within CoreShop. diff --git a/docs/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/01_CRUD.md b/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/01_CRUD.md similarity index 65% rename from docs/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/01_CRUD.md rename to docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/01_CRUD.md index 04cffc4fb0..dd26e1d280 100644 --- a/docs/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/01_CRUD.md +++ b/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/01_CRUD.md @@ -1,62 +1,58 @@ # Tax Rules +Managing tax rules in CoreShop involves various operations, including create, read, update, and delete. Below are the +guidelines for each of these operations. + ## Create -If you want to create a Tax Rule via API, you can do following: + +To create a new tax rule via the API: ```php $newTaxRule = $container->get('coreshop.factory.tax_rule')->createNew(); ``` -Now you have a new Tax Rule, if you want to persist it, you need to do following: +After creating a new Tax Rule instance, persist it using: ```php $container->get('coreshop.manager.tax_rule')->persist($newTaxRule); $container->get('coreshop.manager.tax_rule')->flush(); ``` -You now have a new persisted Tax Rule. +You now have a new persisted tax rule. ## Read -If you want to query for Tax Rules, you can do following: +To query for tax rules: ```php $ruleRepository = $container->get('coreshop.repository.tax_rule'); - $queryBuilder = $ruleRepository->createQueryBuilder('c'); - // You can now create your query - // And get the result - $rules = $queryBuilder->getQuery()->getResult(); - ``` ## Update -If you want to update and existing Tax Rule, you need to do following: +To update an existing tax rule: ```php // Fetch Tax Rule - $rule = $ruleRepository->findById(1); $rule->setName('Euro'); - // And Persist it $container->get('coreshop.manager.tax_rule')->persist($rule); $container->get('coreshop.manager.tax_rule')->flush(); ``` ## Delete -If you want to update and existing Tax Rule, you need to do following: + +To delete an existing tax rule: ```php // Fetch Tax Rule - $rule = $ruleRepository->findById(1); - -// And Persist it +// And Remove it $container->get('coreshop.manager.tax_rule')->remove($rule); -$container->get('coreshop.manager.tax_rule')->flush(); +$container->get('coreshop.manager.tax_rule')->flush; ``` diff --git a/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/index.md b/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/index.md new file mode 100644 index 0000000000..80c298dc4a --- /dev/null +++ b/docs/03_Development/02_Localization/05_Taxes/02_Tax_Rule/index.md @@ -0,0 +1,8 @@ +# Tax Rule + +> The Tax Rule in CoreShop is designed to manage different tax rates based on Country and State. + +## Managing Tax Rules + +1. **[Create, Update, Read, Delete](./01_CRUD.md)**: This section provides detailed instructions for performing the + basic CRUD (Create, Read, Update, Delete) operations on tax rules within CoreShop. diff --git a/docs/03_Development/02_Localization/05_Taxes/index.md b/docs/03_Development/02_Localization/05_Taxes/index.md new file mode 100644 index 0000000000..3ca7dec4c2 --- /dev/null +++ b/docs/03_Development/02_Localization/05_Taxes/index.md @@ -0,0 +1,11 @@ +# Taxes + +> In CoreShop, taxes are categorized into two main types: Tax Rates and Tax Rules. Tax Rates represent specific +> percentage rates, while Tax Rules determine the applicable Tax Rate based on Country and State. + +## Tax Components + +1. **[Tax Rates](./01_Tax_Rate/index.md)**: This section covers the management of individual tax rates, including their + creation, updating, reading, and deletion. +2. **[Tax Rules](./02_Tax_Rule/index.md)**: Here, you'll find detailed information on setting up and managing Tax Rules, + which are essential for determining the correct Tax Rate based on the geographical location (Country and State). diff --git a/docs/03_Development/02_Localization/index.md b/docs/03_Development/02_Localization/index.md new file mode 100644 index 0000000000..33801c09ff --- /dev/null +++ b/docs/03_Development/02_Localization/index.md @@ -0,0 +1,15 @@ +# Localization + +CoreShop offers a comprehensive suite of tools designed for the effective localization of your eCommerce platform. These +tools encompass various components essential for adapting to different regional settings: + +- **[Currencies](./01_Currencies/index.md)**: This section focuses on handling multiple currencies, a crucial aspect of + international eCommerce operations. +- **[Countries](./02_Countries/index.md)**: Here, you'll find information on managing country-specific settings and + preferences. +- **[States](./03_States/index.md)**: This part covers the management of states, which is vital for regional + customization and shipping logistics. +- **[Zones](./04_Zones/index.md)**: Zones are geographical groupings that can be used for shipping and other + location-based configurations. +- **[Taxes](./05_Taxes/index.md)**: The section on taxes provides details on setting up and managing Tax Rates and Tax + Rules, ensuring compliance with local tax regulations. diff --git a/docs/docs/03_Development/03_Products/01_CRUD.md b/docs/03_Development/03_Products/01_CRUD.md similarity index 55% rename from docs/docs/03_Development/03_Products/01_CRUD.md rename to docs/03_Development/03_Products/01_CRUD.md index ed9f303daf..a28a2c0396 100644 --- a/docs/docs/03_Development/03_Products/01_CRUD.md +++ b/docs/03_Development/03_Products/01_CRUD.md @@ -1,20 +1,18 @@ -# CoreShop Product +# Product -CoreShop uses Pimcore Data Objects to persist Product Information. But, it adds a little wrapper around it to be more -dynamic and configurable. It uses a Factory and Repository Pattern to do that. +CoreShop leverages Pimcore Data Objects for persisting Product Information but adds a layer of dynamism and +configurability through a Factory and Repository Pattern. ## Create -If you want to create a new Product, we need to get our Factory Service for that: +To create a new product, first obtain the Factory Service: ```php $productFactory = $container->get('coreshop.factory.product'); $product = $productFactory->createNew(); ``` -No we have our product and we can set all needed values. - -If you now want to save it, just call the save function +After setting the necessary values on the product, save it: ```php $product->save(); @@ -22,30 +20,27 @@ $product->save(); ## Read -To get products, you need to use the Repository Service CoreShop provides you. +Use the Repository Service provided by CoreShop to retrieve products: ```php $repository = $container->get('coreshop.repository.product'); - // Query by ID $productWithIdOne = $repository->findById(1); -// Get a Listing how you know it from Pimcore +// Get a Listing as in Pimcore $list = $repository->getList(); $list->setCondition("active = 1"); $products = $list->getObjects(); - ``` ## Update -Update works the same as you are used to in Pimcore +Updating a product follows the same pattern as in Pimcore: ```php $repository = $container->get('coreshop.repository.product'); - // Query by ID $productWithIdOne = $repository->findById(1); @@ -56,12 +51,11 @@ $productWithIdOne->save(); ## Delete -Delete works the same as you are used to in Pimcore +Deleting a product also follows the familiar Pimcore process: ```php $repository = $container->get('coreshop.repository.product'); - // Query by ID $productWithIdOne = $repository->findById(1); $productWithIdOne->delete(); diff --git a/docs/03_Development/03_Products/02_Price_Calculation.md b/docs/03_Development/03_Products/02_Price_Calculation.md new file mode 100644 index 0000000000..4f1d0d2be8 --- /dev/null +++ b/docs/03_Development/03_Products/02_Price_Calculation.md @@ -0,0 +1,68 @@ +# Product Price Calculation + +CoreShop employs multiple Price Calculators to determine the correct price for a product. By default, the following +calculators are used: + +- [Price Rule Calculator](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/ProductBundle/Calculator/PriceRuleCalculator.php): + Utilizes prices from Catalog Price Rules and Specific Price Rules. +- [Store Product Price Calculator](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Core/Product/Calculator/StoreProductPriceCalculator.php): + Calculates prices based on store values. + +For custom calculators, implement the +interface [```CoreShop\Component\Product\Calculator\ProductPriceCalculatorInterface```](https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Component/Product/Calculator/ProductPriceCalculatorInterface.php) +and register your service with the tag ```coreshop.product.price_calculator```, including attributes ```type``` +and ```priority```. + +## CoreShop Price Calculation Components + +CoreShop's price calculation encompasses three distinct prices: + +- **Retail Price**: The base price without any discounts. +- **Discount Price**: A special price for promotions, which should be lower than the retail price. +- **Discount**: Monetary value of discounts from promotions. +- **Price**: Calculated as the Retail Price or Discount Price (whichever is applicable) minus any discount rules. + +## Calculator Service Usage + +To calculate the price for a product, use one of the following services: + +1. ```coreshop.product.price_calculator```: Calculates prices without tax considerations. +2. ```coreshop.product.taxed_price_calculator```: Calculates prices with or without tax considerations (recommended). + +### Templating + +For price calculation within a template, use the ```coreshop_product_price``` filter: + +```twig +{{ (product|coreshop_product_price(true)) }} +``` + +Custom Price Calculator Example +This example demonstrates how to add a new calculator, using the property "price" - 1 as the Product Price, and -1 as +the Discount. Note that this example is a demonstration and not a practical implementation. + +```php + +add('textField', InputType::class); + } +} +``` + +Create a corresponding Pimcore Backend UI JavaScript file: + +```javascript +pimcore.registerNS('coreshop.product.pricerules.conditions.custom'); +coreshop.product.pricerule.conditions.custom = Class.create(coreshop.rules.conditions.abstract, { + type: 'custom', + + getForm: function () { + var textFieldValue = this.data && this.data.textField ? this.data.textField : null; + + this.textField = new Ext.create({ + xtype: 'textfield', + name: 'text-field', + value: textFieldValue + }); + + this.form = new Ext.form.Panel({ + items: [this.textField] + }); + + return this.form; + } +}); +``` + +Extend the service definition to include your form type: + +```yaml +# config/services.yaml +services: + App\CoreShop\Product\PriceRules\Condition\CustomCondition: + tags: + - { name: coreshop.product_price_rule.condition, type: custom, form-type: App\CoreShop\Form\Type\PriceRules\Condition\CustomCondition\CustomConditionType } +``` + +## Resolving Autowiring Issues with Custom Conditions + +When autowiring is enabled in your CoreShop project, you may encounter a scenario where your custom condition appears twice in the system: once with configuration options and once without. This duplication can be resolved by modifying your service definition to explicitly disable autoconfiguration for your custom condition. Here’s how you can achieve this: + +In your `services.yaml`, update the service definition for your custom condition as follows: + +```yaml +# config/services.yaml +services: + App\CoreShop\Product\PriceRules\Condition\CustomCondition: + autoconfigure: false + tags: + - { name: coreshop.product_price_rule.condition, type: custom, form-type: App\CoreShop\Form\Type\PriceRules\Condition\CustomCondition\CustomConditionType } +``` + +This modification tells Symfony not to autoconfigure the custom condition service, thus preventing the duplication issue. With this change, your custom condition will appear only once in the CoreShop system with the intended configuration. diff --git a/docs/03_Development/03_Products/03_Price_Rules/02_Custom_Action.md b/docs/03_Development/03_Products/03_Price_Rules/02_Custom_Action.md new file mode 100644 index 0000000000..c446c582a5 --- /dev/null +++ b/docs/03_Development/03_Products/03_Price_Rules/02_Custom_Action.md @@ -0,0 +1,81 @@ +--- +title: Custom Action +--- + +# Creating Custom Product Price Rule Action + +CoreShop offers a variety of default actions for product price rules. However, there may be instances where you need to implement custom actions. This guide will walk you through the process of creating a custom action for product price rules in CoreShop. + +## Step 1: Create the Action Class + +Depending on the type of discount, you can choose between different options (see [Pricing](../02_Price_Calculation.md) for more details) + + - **Price Action**: To define a new fixed price (`CoreShop\Component\Product\Rule\Action\ProductPriceActionProcessorInterface`) + - **Price Discount Action**: To define a new discounted price (`CoreShop\Component\Product\Rule\Action\ProductDiscountPriceActionProcessorInterface`) + - **Discount Action**: To define a Discount on a given Price (`CoreShop\Component\Product\Rule\Action\ProductDiscountActionProcessorInterface`) + +Each one is responsible for a different type of discount. The following example shows how to create a new fixed price discount. + +```php + Find detailed information on product price +> rules [here](../../../02_User_Documentation/03_Price_Rules/02_Product_Price_Rules.md). +> Product price rules are applicable to multiple products and are based on conditions like category or manufacturer. + +### Specific Price Rules + +> Explore specific price rules [here](../../../02_User_Documentation/03_Price_Rules/03_Specific_Price_Rules.md). +> Specific price rules target a single product, with conditions based on factors like customer or customer group. + +### Quantity Price Rules + +> For quantity price rules, click [here](../../../02_User_Documentation/03_Price_Rules/04_Quantity_Price_Rules.md). +> These rules apply to a single product and are based on the quantity of a cart item. They only affect cart item prices, +> and the default price calculation in CoreShop will return zero outside the cart context if only quantity rules are +> configured. + +## Extending Conditions and Actions + +- To add custom Actions, [click here](../../01_Extending_Guide/04_Extending_Rule_Actions.md). +- To add custom Conditions, [click here](../../01_Extending_Guide/05_Extending_Rule_Conditions.md). + +## Template Helper + +### Get Formatted Price with all applied Rules + +```twig +{% import '@CoreShopFrontend/Common/Macro/currency.html.twig' as currency %} +{% import '@CoreShopFrontend/Common/Macro/product_price.html.twig' as product_price %} + +
-Tag type : Universal Analytics -Track type : Pageview -Enable Enhanced Ecommerce Features: true -Use Data Layer: true -Trigger: event equals gtm.dom -- -#### Product Detail View -**Tag Config Example**: -
-Tag type : Universal Analytics -Track type : Pageview -Enable Enhanced Ecommerce Features: true -Use Data Layer: true -Trigger: event equals gtm.dom -- -#### Checkout Step: -> **Event-Name**: `csCheckout` - -**Tag Config Example**: -
-Tag type : Universal Analytics -Track type : Event -Event Category: Ecommerce -Event Action: Checkout -Enable Enhanced Ecommerce Features: true -Use Data Layer: true -Trigger: event equals csCheckout -- -#### Checkout Complete (Purchase): -**Tag Config Example**: -
-Tag type : Universal Analytics -Track type : Pageview -Enable Enhanced Ecommerce Features: true -Use Data Layer: true -Trigger: event equals gtm.dom -- -#### Remove Item from Cart -> **Event-Name**: `csRemoveFromCart` - -**Tag Config Example**: -
-Tag type : Universal Analytics -Track type : Event -Event Category: Ecommerce -Event Action: Remove from Cart -Enable Enhanced Ecommerce Features: true -Use Data Layer: true -Trigger: event equals csRemoveFromCart -- -#### Add Item to Cart -> **Event-Name**: `csAddToCart` - -**Tag Config Example**: -
-Tag type : Universal Analytics -Track type : Event -Event Category: Ecommerce -Event Action: Add to Cart -Enable Enhanced Ecommerce Features: true -Use Data Layer: true -Trigger: event equals csAddToCart -diff --git a/docs/docs/03_Development/14_Events/index.md b/docs/docs/03_Development/14_Events/index.md deleted file mode 100644 index ce6fbc7896..0000000000 --- a/docs/docs/03_Development/14_Events/index.md +++ /dev/null @@ -1,123 +0,0 @@ -# CoreShop Events - -CoreShop comes with a lot of build-in events. - -## Frontend Controller - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.customer.update_post` | ResourceControllerEvent | Fires after Customer has updated the profile | -| `coreshop.customer.change_password_post` | ResourceControllerEvent | Fires after Customer has changed the password | -| `coreshop.customer.newsletter_confirm_post` | ResourceControllerEvent | Fires after Customer has confirmed his newsletter subscription | -| `coreshop.address.add_post` | ResourceControllerEvent | Fires after Customer has added a new address | -| `coreshop.address.update_post` | ResourceControllerEvent | Fires after Customer has updated a address | -| `coreshop.address.delete_pre` | ResourceControllerEvent | Fires before Customer deletes a address | - -## Cart - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.cart.update` | GenericEvent | Fires after cart has been updated | -| `coreshop.cart.pre_add_item` | GenericEvent | Fires before a item gets added to cart | -| `coreshop.cart.post_add_item` | GenericEvent | Fires after a item gets added to cart | -| `coreshop.cart.pre_remove_item` | GenericEvent | Fires before a item gets removed from cart | -| `coreshop.cart.post_remove_item` | GenericEvent | Fires after a item gets removed from cart | - -## Customer - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.customer.register` | CustomerRegistrationEvent | Fires after a new customer has been generated | -| `coreshop.customer.request_password_reset` | RequestPasswordChangeEvent | Fires after password reset has been requested | -| `coreshop.customer.password_reset` | GenericEvent | Fires after new password hast been applied to customer | - -## Order Document - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.order.shipment.wkhtml.options` | WkhtmlOptionsEvent | Options Event: Use it to change wkhtml options. | -| `coreshop.order.invoice.wkhtml.options` | WkhtmlOptionsEvent | Options Event: Use it to change wkhtml options. | - -## Payment - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.payment_provider.supports` | PaymentProviderSupportsEvent | Support Event: Use it to modify available Payment Providers | - -## Notes - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.note.*.post_add` | GenericEvent | Fires after a note of type `*` has been created | -| `coreshop.note.*.post_delete` | GenericEvent | Fires after a note of type `*` has been deleted | - -## Rules - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.rule.availability_check` | RuleAvailabilityCheckEvent | Fires in `RuleAvailabilityCheck` maintenance/command for every active rule. | - -Replace symbol (*) with one of those note types: - -- `payment` -- `update_order` -- `update_order_item` -- `email` -- `order_comment` - -## Workflow - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.workflow.valid_transitions` | WorkflowTransitionEvent | Valid Event: Use it if you need to extend the workflow transitions | - -## Transformer - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.quote_item.pre_transform` | GenericEvent | Fires before proposal item gets transformed to a quote item | -| `coreshop.quote_item.post_transform` | GenericEvent | Fires after proposal item has been transformed to a quote item | -| `coreshop.order_item.pre_transform` | GenericEvent | Fires before proposal item gets transformed to a order item | -| `coreshop.order_item.post_transform` | GenericEvent | Fires after proposal item has been transformed to a order item | -| `coreshop.quote.pre_transform` | GenericEvent | Fires before proposal gets transformed to a quote | -| `coreshop.quote.post_transform` | GenericEvent | Fires after proposal has been transformed to a quote | -| `coreshop.order.pre_transform` | GenericEvent | Fires before proposal gets transformed to a order | -| `coreshop.order.post_transform` | GenericEvent | Fires after proposal has been transformed to a order | -| `coreshop.shipment_item.pre_transform` | GenericEvent | Fires before proposal item gets transformed to a shipment item | -| `coreshop.shipment_item.post_transform` | GenericEvent | Fires after proposal item has been transformed to a shipment item | -| `coreshop.shipment.pre_transform` | GenericEvent | Fires before proposal gets transformed to a shipment | -| `coreshop.shipment.post_transform` | GenericEvent | Fires after proposal has been transformed to a shipment | -| `coreshop.invoice.pre_transform` | GenericEvent | Fires before proposal gets transformed to a invoice | -| `coreshop.invoice.post_transform` | GenericEvent | Fires after proposal has been transformed to a invoice | - -## Backend Controller - -| Name | EventType | Description | -|:-----|:------------|:----------| -| `coreshop.*.pre_create` | ResourceControllerEvent | Fires before object gets created in backend | -| `coreshop.*.post_create` | ResourceControllerEvent | Fires after object gets created in backend | -| `coreshop.*.pre_save` | ResourceControllerEvent | Fires before object gets saved in backend | -| `coreshop.*.post_save` | ResourceControllerEvent | Fires after object gets saved in backend | -| `coreshop.*.pre_delete` | ResourceControllerEvent | Fires before object gets deleted in backend | -| `coreshop.*.post_delete` | ResourceControllerEvent |Fires after object gets deleted in backend | - -Replace symbol (*) with one of those controller: - -- `configuration` -- `payment_provider` -- `exchange_rate` -- `filter` -- `index` -- `notification_rule` -- `notification_rule` -- `cart_price_rule` -- `product_price_rule` -- `shipping_rule` -- `store` -- `tax_rule_group` - -## Workflow Events -There are events vor every state machine transition. Read more about it [here](../17_State_Machine/index.md). - -## Model Events -You can use Pimcore Events for CoreShops Pimcore Models: [Pimcore Events](https://www.pimcore.org/docs/5.0.0/Extending_Pimcore/Event_API_and_Event_Manager.html) diff --git a/docs/docs/03_Development/15_Store_Front/01_Controllers.md b/docs/docs/03_Development/15_Store_Front/01_Controllers.md deleted file mode 100644 index cafe094d78..0000000000 --- a/docs/docs/03_Development/15_Store_Front/01_Controllers.md +++ /dev/null @@ -1,52 +0,0 @@ -# CoreShop Store Front Controller - -If you use CoreShop FrontendBundle, you can change the Controllers it uses. Simply change the configuration for the controller: - -```yaml -core_shop_frontend: - controllers: - index: CoreShop\Bundle\FrontendBundle\Controller\IndexController - register: CoreShop\Bundle\FrontendBundle\Controller\RegisterController - customer: CoreShop\Bundle\FrontendBundle\Controller\CustomerController - currency: CoreShop\Bundle\FrontendBundle\Controller\CurrencyController - language: CoreShop\Bundle\FrontendBundle\Controller\LanguageController - search: CoreShop\Bundle\FrontendBundle\Controller\SearchController - cart: CoreShop\Bundle\FrontendBundle\Controller\CartController - checkout: CoreShop\Bundle\FrontendBundle\Controller\CheckoutController - category: CoreShop\Bundle\FrontendBundle\Controller\CategoryController - product: CoreShop\Bundle\FrontendBundle\Controller\ProductController - quote: CoreShop\Bundle\FrontendBundle\Controller\QuoteController - security: CoreShop\Bundle\FrontendBundle\Controller\SecurityController - payment: CoreShop\Bundle\PayumBundle\Controller\PaymentController -``` - -## Example of using a Custom ProductController - -**1**: Add a new Controller and inherit from the FrontendController - -```php - `money_decimal_precision: 2` - -Having a global precision of 2 - -> `money_decimal_factor: 100` - -Displaying Currency with a factor of 100 (in Pimcore Backend). - -> *WARNING* If you change these settings in an existing Installation with Orders/Products etc. you also have to create -> a migration to change all the values from a precision of 2 to your new setting. - -In order to handle payment values with a precision of for example 4, we introduced a new Order Property called `paymentTotal`. -Within a Payment, you cannot deal with a precision > 2, since a currency only has eg. 100 Cents. Therefore, we round the `total` -Cart/Order value to a precision of 2 into the `paymentTotal` Value. - -For example: - -Your Cart/Order is "€ 1.000,5498", your payment total then is: "€ 1.000,55". - -If you want to display the payment total in your cart, you can use this template: - -```twig -{% if currency.convertAndFormat(cart.total) != currency.convertAndFormat(cart.paymentTotal, 2, 100) %} -
docs
directory.
- >
- ),
- },
- {
- title: 'Powered by React',
- Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
- description: (
- <>
- Extend or customize your website layout by reusing React. Docusaurus can
- be extended while reusing the same header and footer.
- >
- ),
- },
-];
-
-function Feature({Svg, title, description}) {
- return (
- {description}
-t |