Tutorial - Mini cart slide out panel#242
Tutorial - Mini cart slide out panel#242yutingjiangYTJ wants to merge 21 commits intocommerce-docs:developfrom
Conversation
| ### Tutorial: Implementing Mini Cart Functionality | ||
|
|
||
| #### Introduction | ||
| This tutroial describes how to implement a slide-out panel Mini Cart on Boilerplate. The Cart dropin provides the template and |
There was a problem hiding this comment.
Note: Please keep the same grammatical structure and wording styles as shown in experience league documentation. Examples of keeping wording consistent is using "cart drop-in" instead of "Cart dropin"; etc. Below is a suggested edit:
The following tutorial describes how to enable the
MiniCartin a slide-out panel on boilerplate. This cart drop-in component enables functionality to display cart items, manage quantities, and proceed to checkout.
|
|
||
| #### Step 2: JavaScript Logic for Mini Cart | ||
|
|
||
| Update `commerce-mini-cart.js` with logic to initialize and manage mini cart functionality: |
There was a problem hiding this comment.
Update commerce-mini-cart.js with the following logic to initialize and manage MiniCart functionality:
| This tutroial describes how to implement a slide-out panel Mini Cart on Boilerplate. The Cart dropin provides the template and | ||
| necessary functionality to display cart items, manage quantities, and proceed to checkout. | ||
|
|
||
| #### Step 1: CSS Styling for Mini Cart |
There was a problem hiding this comment.
Step 1: CSS Styling for MiniCart
| } | ||
| ``` | ||
|
|
||
| #### Step 3: Integrating Mini Cart with Header |
There was a problem hiding this comment.
| #### Step 3: Integrating Mini Cart with Header | |
| #### Step 3: Integrating MiniCart with Header |
|
|
||
| #### Step 3: Integrating Mini Cart with Header | ||
|
|
||
| Update `header.css` to integrate the mini cart panel with the header navigation: |
There was a problem hiding this comment.
| Update `header.css` to integrate the mini cart panel with the header navigation: | |
| Update `header.css` to integrate the `MiniCart` panel with the header navigation: |
|
|
||
| #### Step 4: JavaScript Logic for Header Integration | ||
|
|
||
| Update `header.js` to handle mini cart interactions: |
There was a problem hiding this comment.
| Update `header.js` to handle mini cart interactions: | |
| Update `header.js` to handle `MiniCart` interactions: |
| events.on('cart/initialized', updateCartCounter, { eager: true }); | ||
| ``` | ||
|
|
||
| As a result of these customizations, the Mini Cart is implemented as follows: |
There was a problem hiding this comment.
| As a result of these customizations, the Mini Cart is implemented as follows: | |
| As a result of these customizations, the `MiniCart` is implemented as follows: |
|
@ericeoeur Thanks for the feedback! changes updated. |
Ticket: https://jira.corp.adobe.com/browse/USF-1949
Bolierplate: hlxsites/aem-boilerplate-commerce#435