coddin/magento2-cartbridge

CartBridge by Coddin

Installs: 1 795

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:magento2-module

1.0.5 2022-04-28 13:33 UTC

This package is auto-updated.

Last update: 2024-04-08 13:56:03 UTC


README

build License: MIT codecov

Magento 2 CartBridge

A module to easily add items to an existing Guest/Customer cart programmatically

The only dependency it has is: it has to know about the current Session, either by already being in a programmatic environment that is aware of the current session, or by an AJAX call that has the xhrClientCredentials added to the call

e.g. (jQuery)

xhrFields: {
    withCredentials: true
},

Installation

$ composer require coddin/magento2-cartbridge

Testing

The tests can be run within a Magento 2 instance by using this command:

./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/coddin/magento2-cartbridge/Test/Unit