Hello support,
due to cache and performance reasons we would like to load the minicart via ajax call async. Works well, if we use the route common/cart/info for the call.
The only thing not working is the dropdown menu for the minicart. AFAIK, the dynamic menus are loaded in the js file libs.min.js.
Do you know the best approach to reload/reactivate the dropdown menu after the ajax call?
Thanks,
Alex
|
|
Ok, found it myself. After the cart has been loaded, you need to execute dropdown_menu('.nav:not(.nav-stacked):not(.nav-tabs)' , '> li', 'below', 100);
It would be great, if TB could publish some more documentation about BurnEngine or refer to other docs, if BE used other tech stacks for modification. It is by far the best theme engine and page builder for OC and it would be great to extend this engine with custom mods!
|
|
Hi,
Sorry for not being able to help earlier. Glad to see you have found a solution!
Wound’t be better if you insert only the new content inside the cart and not replace the entire cart? You will save a JS menu initialization this way.
Thanks for the suggestion about the documentation – we will try to improve it!
BR,
ThemeBurn team
|
|
Yes, probably more efficient to just update the menu content and the item counter, but that would require a custom modification of the minicart function, which might need modification in future versions.
That way it was easier and quicker and served our needs for having an updated cart for html-cached pages via Varnish.
Thanks for getting back to me.
|
|