+1. Our platform: M2.1
Please fix on priority or provide a workaround.
Please assign and act on this on priority. This looks like a major functional issue.
Hi @simonxy @apurv-anand
Thank you for reporting the issue. It is reported as MAGETWO-54964 internally.
Thanks,
Kateryna.
Experiencing the same issue here on Magento 2.1.
The mini cart does not get updated in result of the reorder.
Browser's local storage where the mini cart is cached only gets refreshed upon POST/PUT requests.
However, the reorder action is a regular link that results in an ordinary GET request.
The issue is resolved and will be available in 2.1.2 patch version.
Hey @katmoon,
Is there a commit or work around we can use until the next release?
Hi @brideo
The fix will be available with the next non-security patch release.
@brideo,
I don't have access to the official patch, but I can share the workaround we use.
The idea is to listen to the reorder link clicks and invalidate the customer data in the local storage.
The Workaround
Add the following JavaScript to pages with the reorder links (via layout handle customer_account):
require([
'jquery',
'Magento_Customer/js/section-config',
'Magento_Customer/js/customer-data',
'domReady!'
], function ($, sectionConfig, customerData) {
'use strict';
/**
* Elements - Reorder links
*/
var s = [
'.sales-order-view .order-actions-toolbar .actions .reorder', // sales-order-view
'.sales-order-history .table-order-items .actions .order', // sales-order-history
'.customer-account-index .table-order-items .actions .order', // customer-account-index
];
/**
* Events listener
*/
$(s.join(', ')).on('click', function(event) {
var sections;
// anchor contains span, target may be span instead of anchor
var el = event.target.href ? event.target : event.target.parentElement;
// check if this is really a redirect link
if (el.href.match(/reorder/i)) {
sections = sectionConfig.getAffectedSections(el.href);
if (sections) {
customerData.invalidate(sections);
}
}
});
});
Please note that the official unreleased fix is likely very different from the workaround above. It probably changes the request method from GET to POST to match semantics of the operation: entity creation rather than retrieval.
Brilliant thanks @sshymko!
I will make a note to remove it when the next version of Magento is released.
This issue was fixed in 2.1.2. 2.0.10 and develop branch.
Closed.
@veloraven can you please bring us a link to the commit where this issue was fixed in 2.1 branch?
@veloraven @katmoon
Can you please do as @Bartlomiejsz asked and supply a reference to where/how this was fixed? Also in what release was this fixed in?
I'm still experiencing this on 2.1.5. I'm guessing that the previous (bad) vendor who made this site overwrote something, so the problem still exists..
Issue still exists on magento 2.1.8, old prices not updating when reordering...
Any solution?
Similar issue here #30663