Magento 2 Shopping Cart Configuration: Key Elements and Setup
[Updated On June 19, 2025] Did you know that shoppers abandon 70% of shopping carts before completing checkout? Magento 2 shopping cart configuration shapes the customer experience.
Poor cart configuration costs e-commerce businesses billions of dollars per year. But with the right setup, you can recover abandoned carts and boost conversions by up to 20%.
The tutorial explores the key elements, essential setup, and analytics-driven shopping cart configuration.
Key Takeaways
-
Cart settings impact customer experience and sales.
-
Core settings include redirect options and gift features.
-
Follow step-by-step instructions to configure your Magento 2 shopping cart.
-
Enhance your cart with powerful extensions and API integrations.
-
Track and optimize your cart performance using Google Analytics and reports.
What is Magento 2 Shopping Cart Configuration?
Shopping cart configuration refers to options that control how the shopping cart functions.
These settings influence the customer experience and management of cart data. Key configurations include setting the cart's data retention period.
The configuration also includes determining whether to redirect customers to the cart. It is after they have added to the cart. It enables or disables the mini cart and displays item counts.
You can configure cross-sell product displays and checkout options, such as guest checkout. Proper configuration ensures a smooth shopping experience and reduces cart abandonment.
You can access these settings under the checkout section in the configuration. Fine-tuning your cart settings helps maximize sales and deliver a smooth buying journey.
5 Key Elements of Magento 2 Shopping Cart Configuration
1. Redirect to the Shopping Cart
The option controls whether we direct customers to the shopping cart page. It is after adding a product.
-
Yes: It is ideal for stores focused on single-item purchases.
-
No: It is better for stores that encourage browsing and adding various items to the cart.
Setting this ensures smoother navigation and reduces cart abandonment.
2. Mini Cart Display
The Mini Cart provides a quick view of cart contents on any store page. You can configure:
-
Enable/Disable Mini Cart: Show or hide the mini cart globally.
-
Number of Items to Display: Set how many items are visible before triggering a scrollbar.
-
Most Display Recently Added Items: Control how many recently added products appear. It is at the top of the mini cart.
A well-optimized mini cart boosts transparency and encourages checkout. It doesn't disrupt the shopping flow.
3. Cart Link Summary
It controls how the cart icon behaves and displays information:
-
Display item quantities: Shows total quantities of all products.
-
Display number of items in cart: Shows count of distinct products. It is regardless of the quantity.
It helps shoppers keep track of their cart status, improving usability and trust.
4. Gift Options
Magento allows you to offer personalization and gifting features:
-
Gift Messages: Enable at the minimum order amount and individual product levels.
-
Gift Wrapping: Enable gift wrapping on orders or per item.
-
Gift Receipt & Printed Card: Offer the ability to include a gift receipt and a printed card with the order.
These features enhance customer experience and add value for gifting scenarios. It is especially useful during holidays.
5. Persistent Shopping Cart
It is a critical feature for improving user experience. It is especially true for guest users and mobile shoppers:
-
Enable Persistence: Retains the items in the cart for returning customers. It is even if they leave the site.
-
Persistence Lifetime: Define the duration for which the cart remains available.
-
“Remember Me” Checkbox: Allow customers to opt in and save their cart information.
-
Clear Cart on Logout: Option to clear the cart when a logged-in user signs out.
-
Persist Other Data: Configure whether to keep:
1. Wishlist
2. Recently ordered items
3. Currently compared products
4. Comparison history
5. Recently viewed products
6. Customer group membership and segmentation
Persistence boosts conversion rates. It is by allowing customers to return later and complete purchases. They don't have to rebuild their cart.
Essential Magento 2 Shopping Cart Setup
Step 1: Configure the Redirect Link to the Magento Cart
1. Go to Stores > Settings > Configuration from the Admin sidebar.
2. Expand Sales and select Checkout.
3. Expand the Shopping Cart section.
4. Select the store view where you want to apply the configuration.
5. Click OK to proceed.
6. Configure After Adding a Product Redirect to Shopping Cart, choose:
-
Yes — Redirects customers to the shopping cart page after adding a product.
-
No — Keeps customers on the current page after adding a product.
7. Click Save Config.
Step 2: Configure the Mini Cart in Magento
1. Navigate to Stores > Settings > Configuration from the Admin sidebar.
2. Expand Sales and click Checkout.
3. Expand the Mini Cart section.
4. Choose the store view where you want to apply the settings.
5. Click OK to proceed.
6. Set Display Mini Cart to:
-
Yes — Displays the mini cart on store pages.
-
No — Hides the mini cart on store pages.
7. If enabled, configure:
-
Number of Items to Display Scrollbar — Set how many items to show before the scrollbar appears.
-
Most Display Recently Added Items — Set the number of recently added items to display.
8. Click Save Config.
Step 3: Configure the Magento Cart Link
1. Go to Stores > Settings > Configuration from the Admin panel.
2. Expand Sales and select Checkout.
3. Expand the My Cart Link section.
4. Set Display Cart Summary to:
-
Display item quantities — Shows total configurable product quantities.
-
Display number of items in cart — Shows product count regardless of quantity.
5. Click Save Config.
Step 4: Enable Gift Options
1. Navigate to Stores > Settings > Configuration from the Admin sidebar.
2. Expand Sales and select the Sales option.
3. Expand Gift Options.
4. Configure gift message settings:
-
Allow Gift Messages on Order Level
-
Allow Gift Messages for Order Items
5. Configure gift wrapping options:
-
Allow Gift Wrapping on Order Level
-
Allow Gift Wrapping for Order Items
6. Set Allow Gift Receipt to Yes.
7. Set Allow Printed Cards to Yes.
8. Enter the Default Price for the Printed Card.
9. Click Save Config.
Step 5: Configure Persistent Magento Shopping Cart
1. Go to Stores > Settings > Configuration from the Admin sidebar.
2. Expand Customers and select Persistent Shopping Cart.
3. Enable persistence by setting Enable Persistence to Yes.
4. Set Persistence Lifetime (in seconds); default is one year (31,536,000 seconds).
5. Configure Enable “Remember Me”:
-
Yes — Displays the "Remember Me" checkbox on the Login page.
-
No — Enables persistence without user choice.
6. Configure Clear Persistence on Log Out:
-
Yes — Clears cart on logout.
-
No — Retains cart on logout.
7. Set Persist Shopping Cart to Yes or No.
8. Configure Persist Wish List to Yes or No.
9. Configure Persist Recently Ordered Items to Yes or No.
10. Configure Persist Currently Compared Products to Yes or No.
11. Configure Persist Comparison History to Yes or No.
12. Configure Persist Recently Viewed Products to Yes or No.
13. Configure Persist Customer Group Membership and Segmentation to Yes or No.
14. Click Save Config.
3 Advanced Customization of Magento 2 Shopping Cart Configuration
1. Custom Code Implementations
Developers can extend Magento’s cart behavior through custom coding. It helps meet unique business requirements:
-
PHP Enhancements: Use plugins or custom modules to introduce advanced pricing rules. It also introduces conditional cart behavior.
-
JavaScript Modifications: Use AJAX-based cart updates for a smooth user experience. Update pricing without reloading the page.
-
Template Customization: Customize cart and mini cart templates. It helps align the visual presentation with your brand. You can also add personalized messages or upsell prompts.
2. Essential Cart Extensions Overview
Leverage Magento Marketplace extensions to add advanced cart features without heavy development:
-
Mageworx Extensions: Offer advanced product options and enhanced cart interactions.
-
Amasty Cart Solutions: Optimize checkout flow with one-step checkout and cart promotions.
-
Knowband Cart Tools: Combat cart abandonment with automated recovery emails and targeted promotions.
3. API Integrations and Third-Party Connections
Integrating the shopping cart with external platforms can further simplify operations. It also helps improve customer engagement:
-
Payment Gateway Integration: Support various payment providers with customized flows. It is for different regions and customer segments.
-
ERP Connectivity: Sync cart data with ERP systems. It helps reflect accurate inventory and pricing.
-
Marketing Automation: Connect cart events to platforms like Klaviyo or HubSpot. It helps trigger personalized emails and retargeting campaigns based on customer behavior.
3 Analytics-Driven Cart Configuration
1. Google Analytics 4 Integration
GA4 provides rich, event-based insights into cart behavior. It helps you track performance and uncover opportunities for optimization.
Key cart metrics to track:
-
Add to cart events: Understand which products drive engagement.
-
Cart abandonment rates: Identify where and when customers leave the cart.
-
Remove from cart actions: Analyze why products get removed.
-
Cart-to-checkout conversion rates: Measure how well your cart drives checkout actions.
-
Average cart value: Track trends in cart size and value.
2. Magento Built-in Analytics and Reporting
Magento 2 offers native cart reporting tools that need no external integrations. It helps you gain insights.
Available cart reports:
-
Products currently in carts: Identify popular products and upsell opportunities.
-
Abandoned cart reports: Track cart abandonment over time.
-
Cart conversion rates: Analyze the percentage of carts that convert to orders.
-
Top cart items: Discover which products land in carts.
Usage:
-
Identify which products encourage deeper engagement.
-
Pinpoint common abandonment points.
-
Focus on improvements to the cart and checkout flow.
3. A/B Testing Cart Configurations
A/B testing helps you confirm which cart settings perform best for your audience. Testing allows you to optimize for conversion without relying on assumptions.
Testing Priorities:
-
Cart redirect settings: Should customers stay on the product page or go straight to the cart?
-
Mini Cart Display Options: Does Displaying the Mini Cart Improve Conversion?
-
Persistent cart duration: How long should carts persist to drive return visits?
-
Gift option prominence: Does highlighting gift options encourage extra purchases?
Tips:
-
Use Magento-compatible A/B testing tools. These include Google Optimize and Convert.
-
Document test results and iterate based on data.
-
Use winning configurations across your store.
FAQs
1. What is a persistent shopping cart in Magento 2?
A persistent shopping cart saves customer cart contents across sessions and devices. It is even after logout or browser closure. It uses cookies to maintain cart data, which can help reduce abandonment rates.
2. How do I reduce cart abandonment in Magento 2?
Reduce abandonment through persistent carts and guest checkout options. Also, through transparent pricing, automated recovery emails, mobile optimization, and streamlined checkout processes.
3. Which extensions are best for Magento 2 cart customization?
Top extensions include Mageworx Advanced Product Options and Knowband Abandoned Cart Recovery. Choose based on your specific needs and budget.
4. How do I configure mobile-optimized carts in Magento 2?
Focus on touch-focused buttons and fast loading times. Also, focus on simplified layouts and clear qty controls. Test across different devices and screen sizes.
5. What are the best practices for configuring B2B carts?
Enable quote functionality and use tiered pricing. Also, add approval workflows and support bulk operations. Furthermore, integrate it with buy order systems to achieve B2B success.
Summary
Magento 2 shopping cart configuration enables control over how the cart behaves. It impacts customer experience and conversion rates. The tutorial explores the key features of the configuration, including:
-
Choose whether to send users to the cart after adding products based on the shopping flow.
-
Control item visibility, enable quick access, and enhance usability across store pages.
-
Offer gift messages and printed cards to boost value during special occasions.
-
Keep cart contents across sessions to improve conversions from returning users.
Unlock the full potential of your shopping cart with optimized configurations. Pair it with managed Magento hosting for faster performance and higher conversions. [Updated On June 19, 2025]