OpenStore icon indicating copy to clipboard operation
OpenStore copied to clipboard

Minicart not refreshing when named other than MiniCart.cshtml

Open skamphuis opened this issue 4 years ago • 0 comments
trafficstars

Ran into an issue where the minicart doesn't get updated wqhen you have selected a razor script with a different name than MiniCart.cshtml.

This is caused by this javascript function (in both Themes/Default/js/product.js AND Themes/Bootstrap4/js\product.js): if (e.cmd === 'cart_addtobasket') { $('.processingminicart').show(); $('input[id*="optionfilelist"]').val(''); // clear any clientupload file names $('#carttemplate').val('MiniCart.cshtml'); nbxproductget('cart_renderminicart', '#productajaxview', '.container_classicajax_minicart'); // Reload Cart $('.addedtobasket').delay(1000).fadeOut('fast'); } This code uses the class "container_classicajax_minicart" to find the minicart module, but this has the razor script's name in it.

skamphuis avatar Sep 20 '21 07:09 skamphuis