Closed nmallepally closed 7 years ago
@nmallepally Thanks for reporting. Please, format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
Hi @andimov Updated 2.0.7 to 2.1 Product added n checkout Payment method: Paypal/Cash on Delivery Payment done successfully mini cart is not cleared, shows up same products in mini cart.
@nmallepally you can read more here: http://magento.stackexchange.com/questions/127203/magento-2-minicart-does-not-clear-items-after-checkout/127347#127347
@nmallepally Did you check solution from @mrkhoa99 ?
@andimov I'm checking it after the changes, will update in few minutes.
@andimov It returned me a different errors. Applied changes from this fix After payment the page returns a network error, page not working on success page, when clicked on reload. Returns a page checkout/cart saying not items in the cart, which it should not and yet displays the items in the cart. During the above process payment is made and order is generated. Attaching images for reference:
@mrkhoa99 Did you see my result above for the fix?, can you advise any alternative solution as we planning to go live in 2days.
@nmallepally try to get the cart info from your local storage: localStorage.getItem('mage-cache-storage')
. Seem the local storage not clear. There is a temporary solution for you, navigate to vendor/magento/module-checkout/view/frontend/templates/cart/noItems.phtml
, add the following js code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData) {
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
});
</script>
@mrkhoa99 Hi thanks for the quick response. works like a charm for paypal orders, does not clear cart when payment is done for cash on delivery method.
@nmallepally Can you list the files which you applied the paths?
I'm using magento 2.1v. I just applied the above java script into vendor/magento/module-checkout/view/frontend/templates/cart/noItems.phtml. As you said this is a temporary solution. Did i miss anything?
Any update on this one? Still exists in 2.1.2.
encountered this bug in CE 2.1.4 as well. it happens when I DON'T sign into my customer account at checkout.
same here. waiting for update
In EE 2.1.5 Still happening
@nmallepally Thanks for the feedback. Is your issue relevant for latest Magento versions? We need more information about your configuration to reproduce this issue. Please identify the web server you are running, the versions of PHP and MySQL, and any other information needed to reproduce your issue.
Hi, I have updated to Magento version 2.1.6, I have no issues now. the cart clears after placing an order.
Thanks.
Hello, Im using Magento 2.1.7 fresh install and the problem persist, i have changed /vender/magento, is this the best practice?
No, editing /vendor/magento
isn't considered best practice because your changes will be overwritten with stock files once you update to a newer version of Magento. You'll need to keep track of the all the patches you've applied and re-apply them after each update if you select this method.
I've even met some composer plugins which allow to re-apply patches automatically 🤣 Please don't go this way.
@silici0 just customize needed template according to http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/templates/template-override.html#override mentioning in comment where the patch came from and for which version so that you can easily drop it when it is not relevant anymore due to Magento upgrade.
@orlangur Ty, i have uploaded a module that fix the problem, im still learning, i would appreciate a code review :)
@nmallepally, thank you for your report. The issue is already fixed in develop branch, 2.2.0, 2.1.9
Hello, Please add below small script in following file path. it's work for me.
app/design/frontend/
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData) {
var sections = ['cart'];
customerData.invalidate(sections);
//customerData.reload(sections, true);
});
</script>
Thanks
Hello,
After i have completed the purchase or placing an order the cart still shows the items and does not remove itself untill any new products added again. it is misleading. can any one give some insight on this?. do i need to upgrade 2.1 to fix or is there any alternative solution.
Thanks, Navya