DivanteLtd / magento2-external-checkout

The project is now maintained by VENDIC: https://github.com/Vendic/magento2-external-checkout
https://github.com/Vendic/magento2-external-checkout
MIT License
11 stars 24 forks source link

giving error while completing checkout for the second time using guest user #3

Closed sam41980 closed 6 years ago

sam41980 commented 6 years ago

@pkarw there is an issue when adding product as a guest user and completing the checkout form magento2 it works for the first time but repeating the same thing with gust user it gives a fatal error

error image: Fatal error: Uncaught TypeError: Return value of Divante\CartSync\Service\Sync::synchronizeGuestCart() must implement interface Divante\CartSync\Service\SyncInterface, boolean returned in /var/www/html/magento24/app/code/Divante/CartSync/Service/Sync.php:146 Stack trace: #0 /var/www/html/magento24/app/code/Divante/CartSync/Controller/Cart/Sync.php(105): Divante\CartSync\Service\Sync->synchronizeGuestCart('dface673e17a45e...') #1 /var/www/html/magento24/generated/code/Divante/CartSync/Controller/Cart/Sync/Interceptor.php(24): Divante\CartSync\Controller\Cart\Sync->execute() #2 /var/www/html/magento24/vendor/magento/framework/App/Action/Action.php(107): Divante\CartSync\Controller\Cart\Sync\Interceptor->execute() #3 /var/www/html/magento24/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) #4 /var/www/html/magento24/vendor/magento/framework/Interception/Interceptor.php(138): Divante\CartSync\Controller\Cart\Sync\Interceptor->

pkarw commented 6 years ago

https://github.com/DivanteLtd/magento2-external-checkout/pull/5/files

Please check this fix

ganeshr28 commented 6 years ago

@pkarw form above fix now it gives error cart not synchronized image

pkarw commented 6 years ago

Do you have "cart.synchronize_totals=true" set in the vue-storefront/config/local.json? It seems like there is no given cart which can be the result of not syncing the carts with Magento

pkarw commented 6 years ago

https://medium.com/@piotrkarwatka/vue-storefront-cart-totals-orders-integration-with-magento2-6fbe6860fcd?source=user_profile---------5----------------

sam41980 commented 6 years ago

@pkarw yes in my cofig/local.json "synchronize": true, "synchronize_totals": true, both are set to true but still, it says cannot synchronize guest cart only when it is a guest user and completing product purchase for the second time it works for the first time with guest user properly but for second purchase with a guest user it gives this error i think the same token is been send can you help me on this

pkarw commented 6 years ago

This is duplicate of #4, closing this one