# shopgate/cart-integration-magento2-base

> Shopgate base module for Magento 2, handles communication with merchant API and routing calls

`composer require shopgate/cart-integration-magento2-base`

Canonical URL: https://packagento.com/shopgate/cart-integration-magento2-base

## At a glance

- **Vendor**: shopgate (https://packagento.com/shopgate.md)
- **Latest version**: 2.10.0 — released 2026-03-23
- **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/shopgate/cart-integration-magento2-base 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 shopgate/cart-integration-magento2-base:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Shopgate base module for Magento 2, handles communication with merchant API and routing calls

## README

[![GitHub license](http://dmlc.github.io/img/apache2.svg)](LICENSE.md)
[![Build Status](https://github.com/shopgate/cart-integration-magento2-base/actions/workflows/check_and_deploy.yml/badge.svg)](https://github.com/shopgate/cart-integration-magento2-base/actions/workflows/check_and_deploy.yml)

The Shopgate Magento2 integration enables you to connect your Magento2 store with the Shopgate backend.

### Getting Started
Download and unzip the [latest releases](https://github.com/shopgate/cart-integration-magento2-base/releases/latest) into the root folder of your Magento2 installation.

### Installation and Documentation

You can find more information in our [support center](https://support.shopgate.com/hc/en-us/articles/229181148-Magento-2) and our [developer documentation](https://docs.shopgate.com/).

### Changelog

See [CHANGELOG.md](CHANGELOG.md) file for more information.

### Contributing

See [CONTRIBUTING.md](docs/CONTRIBUTING.md) file for more information.

### About Shopgate

Shopgate is the leading mobile commerce platform. Online retailers use our software-as-a-service (SaaS) to provide their mobile customers with successful native shopping apps. Developers can enhance the Shopgate Cloud platform by building extensions that customize the user experience and add new functionality to our powerful ecommerce solutions.

### License

The Shopgate Magento2 integration is available under the Apache License, Version 2.0.

See the [LICENSE.md](LICENSE.md) file for more information.

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### [Unreleased]

### [2.10.0] - 2026-03-23
#### Removed
- support for Magento 2 below version 2.4.4
- PHP Support below Version 8.1

#### Changed
- uses Shopgate Cart Integration SDK 2.11.0

### [2.9.34] - 2024-05-10
#### Removed
- usage of deprecated Laminas serializer

### [2.9.33] - 2023-11-08
#### Added
- support for enhanced gender options from Shopgate

#### Changed
- uses Shopgate Cart Integration SDK 2.9.91

#### Fixed
- error when browsing to the Shopgate configuration page and using german language
- issue with `set_settings` without a scope set
- issue with `get_settings` & country data not loading

### [2.9.32] - 2022-11-24
#### Fixed
- character encoding issues in some cases when using PHP 8.1

#### Changed
- uses Shopgate Cart Integration SDK 2.9.90

### [2.9.31] - 2022-05-18
#### Added
- support for Magento 2.4.4
- support for PHP 8.1.x

#### Changed
- uses Shopgate Cart Integration SDK v2.9.89

### [2.9.30] - 2022-01-05
#### Changed
- fixed another incompatibility with Magento 2.4.3

### [2.9.29] - 2021-09-01
#### Fixed
- restored compatibility with Magento 2.4.3 and lower

### [2.9.28] - 2021-09-01
#### Fixed
- compatibility with Magento 2.4.3

### [2.9.27] - 2021-04-21
#### Fixed
- avoid logging or displaying a PHP "undefined index" notice on payment mapping

### [2.9.26] - 2020-12-16
#### Fixed
- an internal bug that would break the backend configuration page on some systems

### [2.9.25] - 2020-11-19
#### Added
- quote to checkout session
- support for custom product prices during check_cart and add_order
- support for Magento 2.4

#### Changed
- uses Shopgate Cart Integration SDK v2.9.79

### [2.9.24] - 2020-07-24
#### Added
- mapping for name prefix
- quote to checkout session

#### Fixed
- Order import for Estonia and Croatia when also states are used

### [2.9.23] - 2020-03-17
#### Fixed
- Inactive child products are not exported anymore

### [2.9.22] - 2020-02-05
#### Added
- support for regions based on text input fields

### [2.9.21] - 2019-11-26
#### Added
- Security enhancements
- PluginInfo and ShopInfo to ping action

#### Removed
- Support for PHP < 7.1
- Support for Magento < 2.2  

### [2.9.20] - 2019-11-01
#### Added
- support for including customer data in cart validation by exposing the getCustomer method in checkCart
- export custom attributes as extra fields with customer and customer address data

### [2.9.19] - 2019-09-18
#### Fixed
- Export of child products

### [2.9.18] - 2019-09-13
#### Added
- filter for website specific items in product export

### [2.9.17] - 2019-08-22
#### Added
- registered internalCartInfo cart helper method

### [2.9.16] - 2019-08-08
#### Fixed
- app only coupons not working

### [2.9.15] - 2019-07-18
#### Added
- Magento 2.3.2 CsrfValidation support which fixes the 302 errors
#### Fixed
- Error "unknown shop number" when using Shopgate with different store views connected

### [2.9.14] - 2019-06-17
#### Added
- Support for Export shopgate order collection calls
#### Fixed
- Region/state mapping for get_customer calls, e.g. returns US-TX instead of TX

### [2.9.13] - 2019-06-05
#### Fixed
- Cart validation for products with the same item id

### [2.9.12] - 2019-06-04
#### Fixed
- Check_cart now returns the correct item_number
- Order import when ordering a product more than once with different custom option values

### [2.9.11] - 2019-02-13
#### Added
- Support for Mage 2.3 controller CsrfValidation with backwards compatibility for older versions

### [2.9.10] - 2018-10-27
#### Changed
- Uses Shopgate Cart Integration SDK 2.9.78

_(Changelog truncated for .md surface. Full history on https://packagento.com/shopgate/cart-integration-magento2-base.)_

## Recent Versions

| Version | Released |
|---|---|
| 2.10.0 | 2026-03-23 |
| 2.9.34 | 2024-05-10 |
| 2.9.33 | 2023-11-08 |
| 2.9.33-alpha.1 | 2023-05-03 |
| 2.9.32 | 2022-11-24 |
| 2.9.32-alpha.2 | 2022-11-24 |
| 2.9.32-alpha.1 | 2022-11-17 |
| 2.9.31 | 2022-05-18 |
| 2.9.30 | 2022-01-05 |
| 2.9.29 | 2021-09-13 |

Showing 10 of 48 versions. Full release history on https://packagento.com/shopgate/cart-integration-magento2-base.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/module-bundle | >=100.0 <102.0 |
| magento/module-configurable-product | ^100.0 |
| magento/module-grouped-product | ^100.0 |
| php | ~8.1.0\|\|~8.2.0\|\|~8.3.0 |
| shopgate/cart-integration-sdk | ^2.11.0 |

## Quality

Latest release (2.10.0) 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 | not tested | – |
| 2.4.9 | – | – | not tested | not tested |


### 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 | Fail | 464 | 31 errors, 433 warnings (ruleset: Magento2) — 165 auto-fixable with phpcbf |
| PHPMD | Warning | 25 | 25 rule violations (MissingImport:10, UnusedFormalParameter:5, UndefinedVariable:3, CyclomaticComplexity:2, ExcessiveMethodLength:2) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 62 total lines (min-lines=5, min-tokens=70) |
| 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 | 163 | 163 | – | – |
| 2.4.8 | – | 163 | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### 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 | 35 | 35 | – | – |
| 2.4.8 | – | 35 | Error | – |
| 2.4.9 | – | – | Error | Error |


### 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=["shopgate/cart-integration-magento2-base"],
  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

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

