Overview
The Glood framework offers two primary JavaScript methods for managing mini cart sections:window.glood.loadPage('ajax_cart')
- Loads or reloads the mini cart sectionwindow.glood.unloadPage('ajax_cart')
- Unloads the mini cart section
Prerequisites
Before implementing mini cart reloading functionality, ensure that:- Glood Framework: The Glood framework is properly loaded on your page
- Global Object: The
window.glood
object is available and accessible - Section Configuration: The
ajax_cart
section is properly configured in your application
Basic Implementation
Simple Reload
You can reload the mini cart section by using this code in your section template:Basic Unload
To unload the mini cart section:Conditional Load/Unload
For more advanced scenarios where you need to conditionally load or unload the mini cart section based on specific conditions, use this code:shouldLoadAjaxCart
and shouldUnloadAjaxCart
) to either load or unload the mini cart section accordingly.