# mageplaza/module-share-cart

> Magento 2 Share Cart extension

`composer require mageplaza/module-share-cart`

Canonical URL: https://packagento.com/mageplaza/module-share-cart

## At a glance

- **Vendor**: mageplaza (https://packagento.com/mageplaza.md)
- **Latest version**: 4.0.6 — released 2025-07-15
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/mageplaza/module-share-cart and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require mageplaza/module-share-cart:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 Share Cart extension

## README


[Mageplaza Share Cart Extension](https://www.mageplaza.com/magento-2-share-cart/) helps customers in sharing their shopping cart with friends and family as well. This is a supportive method to promote store’s conversion rate via the existing users, and this can significantly contribute to the revenue of the store.

- Share shopping cart quickly 
- Shortly review purchasing cart
- Download the PDF file with full information

[![Latest Stable Version](https://poser.pugx.org/mageplaza/module-share-cart/v/stable)](https://packagist.org/packages/mageplaza/module-share-cart)
[![Total Downloads](https://poser.pugx.org/mageplaza/module-share-cart/downloads)](https://packagist.org/packages/mageplaza/module-share-cart)

**IMPORTANT NOTE:** This version of Mageplaza Share Cart extension on Github is free as a contribution to the Magento community from Mageplaza. This package does not include the technical support. Should you need technical support for this extension, you will have to buy a license from Mageplaza. [Click here to buy](https://www.mageplaza.com/magento-2-share-cart/).

### 1. Documentation

- [Installation guide](https://www.mageplaza.com/install-magento-2-extension/)
- [User guide](https://docs.mageplaza.com/share-cart/index.html)
- [Introduction page](http://www.mageplaza.com/magento-2-share-cart/)
- [Contribute on Github](https://github.com/mageplaza/magento-2-share-cart)
- [Get Support](https://github.com/mageplaza/magento-2-share-cart/issues)

### 2. FAQs 

**Q: I got an error: Mageplaza_Core has been already defined**

A: Read solution [here](https://github.com/mageplaza/module-core/issues/3)

**Q: How can customers use share button?** 

A: Customers only need to click on the button and paste the automated URL to anywhere they want to share.  

**Q: Where will the Share button appear on the website?**

A: Share button can be seen on **Minicart** and **Shopping Cart** page. 

**Q: What if I want to inform customers that the price possibly will change later?**

A: You can leave a message on **Warning Message** box (from the admin backend).

**Q: Can I add the time when the PDF file is downloaded?** 

A: Absolutely yes. In the backend, you can enable the adding timestamp suffix.

**Q: How the PDF button and Text button differ from each other?**

A: **Text** button only displays chosen items while **PDF** button offers more information about the store. Also, Text button will show a pop-up, meanwhile the **PDF** button is for file downloading.

### 3. How to install Share Cart extension for Magento 2

- Install via composer (recommend)

Run the following command in Magento 2 root folder:

With Marketing Automation (recommend):
```
composer require mageplaza/module-share-cart
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

Without Marketing Automation:
```
composer require mageplaza/module-share-cart
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```
### 4. Highlight Features

#### Quick share by copy-and-paste 

**Share Cart Extension** allows the store owners to add an extra button which is **Share Cart** while a customer is processing their purchasing.

The button can be displayed in the **Minicart** section and **Shopping Cart Page**. By clicking this button, the customer can copy their shopping cart’ s URL and paste to a destination just in the blink of an eye. When the URL recipient clicks on the shared URL, their current shopping cart will be automatically added with the same items.

![Quick share by copy-and-paste](https://i.imgur.com/GO16T9C.png)

#### A brief summary with Text button 

For the cart which contains a large number of items, **Share Cart** module allows the customers to view a shot summary easily with **Text** - another extra button.

When the customer hit the **Text** button on their **Shopping Cart Page**, a pop-up text can be seen, it appears as a purchase summarizing box.
This little simple button supports customers in taking a clear overview of chosen items with necessary information such as items’ name, price, quantity and the cart total.

![A brief summary with Text button](https://i.imgur.com/HpEIKl6.png)

#### Quick Shopping cart PDF file publishing

**PDF** button is another extra button with the function to download. When the customer hits this button, a PDF file will be downloaded and stored automatically in the user's current device. In comparison to the **Text** button with quick view function, **PDF**'s function allows the customer to get detail information such as:
- Information of store: Company Name, Address, Email, Phone, VAT Information, Registered Number, and Warning Message
- Date of the purchase
- Purchase summary: Quantity, Price, Total, Stock ID, Descriptio

![Magento 2 Share Cart extension](https://i.imgur.com/mLNOyd8.png)

### 5. More features

#### Update function 

**Update** button is for updating the shopping cart with the latest changes from the original cart. 

#### Warning message offering

Admin is able to add a message to the PDF file, as a notice to customers (for instance, informing about the validation of the file downloaded). 

#### Mobile responsive ability

The module is properly responsive with both mobile and desktop devices.

### 6. Full Magento 2 Share Cart Features

#### For store owners
- Enable/ Disable the module
- Enable/disable the extension
- Be able to set the PDF file name
- Add the timestamp suffix which shows the PDF file downloaded time
- Add information of the store including Company name, Address, Phone, Email, VAT Number, Registered Number
- Display a warning message to notify customers in the PDF file 

#### For customers
- Quickly and easily share the shopping cart
- Briefly view the shared shopping cart
- Download and store the PDF with adequate information

### 7. How to configure Share Cart in Magento 2

#### 7.

_(README truncated for .md surface. Full README on https://packagento.com/mageplaza/module-share-cart.)_

## Changelog

CHANGELOG: https://www.mageplaza.com/releases/share-cart/

## Recent Versions

| Version | Released |
|---|---|
| 4.0.6 | 2025-07-15 |
| 4.0.5 | 2024-11-28 |
| 1.1.5 | 2022-07-06 |
| 4.0.4 | 2022-07-06 |
| 4.0.3 | 2021-08-13 |
| 1.1.4 | 2021-08-13 |
| 1.1.3 | 2021-08-02 |
| 4.0.2 | 2021-08-02 |
| 4.0.0 | 2021-03-23 |
| 1.1.2 | 2020-10-01 |

Showing 10 of 15 versions. Full release history on https://packagento.com/mageplaza/module-share-cart.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| mageplaza/module-core | ^1.5.13 |
| mpdf/mpdf | ^7.1.0 \| ^8.0.0 \| ^8.2.3 \| ^8.2.5 |

## Quality

Latest release (4.0.6) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 42 | 42 warnings (ruleset: Magento2) — 33 auto-fixable with phpcbf |
| PHPMD | Warning | 17 | 17 rule violations (UndefinedVariable:11, UnusedFormalParameter:3, MissingImport:2, IfStatementAssignment:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 58 | 58 | – | – |
| 2.4.8 | – | 58 | 58 | – |
| 2.4.9 | – | – | 56 | 56 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["mageplaza/module-share-cart"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

mageplaza is a Magento 2 vendor on Packagento. See https://packagento.com/mageplaza.md for their full catalogue.

