-
Notifications
You must be signed in to change notification settings - Fork 25
Tutorial - Mini cart slide out panel #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Tutorial - Mini cart slide out panel #242
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
MiniCart
in 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Step 1: CSS Styling for MiniCart
} | ||
``` | ||
|
||
#### Step 3: Integrating Mini Cart with Header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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