coreshop / MarketWarehouseBundle

Other
1 stars 0 forks source link

Checkout with min 2 products of same supplier doesn't work #3

Closed wolfsascha closed 9 months ago

wolfsascha commented 10 months ago
Q A
Bug report? yes

Steps to reproduce:

Additional info:

Screenshot of error:

image

Cart: cart659facf0b50e89.63051942

image

Error-Log:

{
    "error": {
        "message": "Der Vorgang konnte nicht abgeschlossen werden. Bitte versuchen Sie es erneut!"
    },
    "_exception": {
        "message": "Duplicate full path [ /coreshop/orders/2024/01/11/193/sub_orders/0/items/1 ] - cannot save object",
        "code": 0,
        "type": "Pimcore\\Model\\Element\\DuplicateFullPathException",
        "file": "/var/www/html/vendor/pimcore/pimcore/models/DataObject/AbstractObject.php:900",
        "trace": [
            {
                "file": "/var/www/html/vendor/pimcore/pimcore/models/DataObject/AbstractObject.php",
                "line": 735,
                "function": "correctPath",
                "class": "Pimcore\\Model\\DataObject\\AbstractObject",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/pimcore/pimcore/models/DataObject/Concrete.php",
                "line": 727,
                "function": "save",
                "class": "Pimcore\\Model\\DataObject\\AbstractObject",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php",
                "line": 92,
                "function": "save",
                "class": "Pimcore\\Model\\DataObject\\Concrete",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Component/Pimcore/DataObject/VersionHelper.php",
                "line": 43,
                "function": "CoreShop\\Bundle\\OrderBundle\\Manager\\{closure}",
                "class": "CoreShop\\Bundle\\OrderBundle\\Manager\\CartManager",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php",
                "line": 105,
                "function": "useVersioning",
                "class": "CoreShop\\Component\\Pimcore\\DataObject\\VersionHelper",
                "type": "::"
            },
            {
                "file": "/var/www/html/vendor/coreshop/market-warehouse-bundle/src/Order/CartManager.php",
                "line": 38,
                "function": "persistCart",
                "class": "CoreShop\\Bundle\\OrderBundle\\Manager\\CartManager",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/market-warehouse-bundle/src/SubOrder/SubOrderCreator.php",
                "line": 93,
                "function": "persistCart",
                "class": "CoreShop\\Bundle\\MarketWarehouseBundle\\Order\\CartManager",
                "type": "->"
            },
            {
                "function": "createSubOrder",
                "class": "CoreShop\\Bundle\\MarketWarehouseBundle\\SubOrder\\SubOrderCreator",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php",
                "line": 125,
                "function": "call_user_func_array"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php",
                "line": 93,
                "function": "call",
                "class": "CoreShop\\Bundle\\WorkflowBundle\\EventListener\\WorkflowListener",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Component/Pimcore/DataObject/InheritanceHelper.php",
                "line": 34,
                "function": "CoreShop\\Bundle\\WorkflowBundle\\EventListener\\{closure}",
                "class": "CoreShop\\Bundle\\WorkflowBundle\\EventListener\\WorkflowListener",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php",
                "line": 94,
                "function": "useInheritedValues",
                "class": "CoreShop\\Component\\Pimcore\\DataObject\\InheritanceHelper",
                "type": "::"
            },
            {
                "file": "/var/www/html/vendor/coreshop/core-shop/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php",
                "line": 74,
                "function": "applyTransition",
                "class": "CoreShop\\Bundle\\WorkflowBundle\\EventListener\\WorkflowListener",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php",
                "line": 270,
                "function": "onTransitionCompleted",
                "class": "CoreShop\\Bundle\\WorkflowBundle\\EventListener\\WorkflowListener",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php",
                "line": 230,
                "function": "Symfony\\Component\\EventDispatcher\\{closure}",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "::"
            },
            {
                "file": "/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php",
                "line": 59,
                "function": "callListeners",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/workflow/Workflow.php",
                "line": 438,
                "function": "dispatch",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/workflow/Workflow.php",
                "line": 242,
                "function": "completed",
                "class": "Symfony\\Component\\Workflow\\Workflow",
                "type": "->"
            },
            {
                "file": "/var/www/html/src/Controller/CoreShop/CheckoutController.php",
                "line": 216,
                "function": "apply",
                "class": "Symfony\\Component\\Workflow\\Workflow",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
                "line": 163,
                "function": "doCheckoutAction",
                "class": "App\\Controller\\CoreShop\\CheckoutController",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
                "line": 75,
                "function": "handleRaw",
                "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/framework-bundle/Controller/AbstractController.php",
                "line": 156,
                "function": "handle",
                "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
                "type": "->"
            },
            {
                "file": "/var/www/html/src/Controller/CoreShop/CheckoutController.php",
                "line": 134,
                "function": "forward",
                "class": "Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
                "line": 163,
                "function": "processAction",
                "class": "App\\Controller\\CoreShop\\CheckoutController",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
                "line": 75,
                "function": "handleRaw",
                "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
                "type": "->"
            },
            {
                "file": "/var/www/html/vendor/symfony/http-kernel/Kernel.php",
                "line": 202,
                "function": "handle",
                "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
                "type": "->"
            },
            {
                "file": "/var/www/html/public/index.php",
                "line": 36,
                "function": "handle",
                "class": "Symfony\\Component\\HttpKernel\\Kernel",
                "type": "->"
            }
        ]
    }
}

ENV: dev

wolfsascha commented 10 months ago

same appears for the same products with different variants.

Use Case:

wolfsascha commented 10 months ago

Was able to make it more concrete in reproduction:

Doesn't Work CoreShopSupplier = WOLF

Works CoreShopSupplier = WOLF

image image

dpfaffenbauer commented 9 months ago

see https://github.com/coreshop/CoreShop/pull/2510

dpfaffenbauer commented 9 months ago

Can you try copying that fix manually in your project and see if it solves it?

alex-jungwirth commented 9 months ago

@dpfaffenbauer it solves the problem, ty.