Download the PHP package code-redlich/quick-add-cart without Composer

On this page you can find all versions of the php package code-redlich/quick-add-cart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package quick-add-cart

QuickAddCart

Version on main Latest pull request CI

Add products straight from your cart — by product name or product number.

QuickAddCart extends the Shopware 6 Storefront with product suggestions and purchase controls on the cart page and in the offcanvas cart. Customers can find another item, choose a quantity and add it to their order without first opening a product detail page. Products with variants open a selection dialog with the Shopware buy widget.

Enable each search location independently, choose compact cart-icon buttons, and control availability with a Shopware Rule Builder rule. English and German storefront snippets and administration configuration labels are included.

Support

Features

The normal header search continues to work as usual. The additional purchase controls are rendered for the plugin's cart and offcanvas search locations.

Screenshots

The screenshots below were captured from the running plugin in a local Shopware 6.7 demo storefront with example products. Theme styling, product data, currency and translations depend on your shop.

Product search on the cart page

Search by product name, check the product number, choose a quantity and add the item directly to the cart.

Product search in the offcanvas cart

Find another product in the cart sidebar and add it without navigating away from the current page.

Variant selection

For products with variants, open the selection dialog and use the product's buy widget to choose the desired option.

Requirements

Component Supported version / requirement
Shopware Core ~6.7.0 — Shopware 6.7.x
Shopware Storefront ~6.7.0 — Shopware 6.7.x
PHP 8.2.x, 8.3.x, 8.4.x or 8.5.x, subject to the installed Shopware version's own requirements
Composer package code-redlich/quick-add-cart
Plugin name QuickAddCart
License MIT

QuickAddCart is a Shopware Storefront plugin. A headless frontend needs its own user interface; installing this plugin does not add search controls to an independently implemented frontend.

Node.js is needed when building storefront assets or running the JavaScript test suite. The repository's test tooling requires Node.js 24 or 25; production PHP usage does not require the test tooling.

Installation

Install from the repository

Run these commands from your Shopware project root:

Use the storefront build process appropriate to your Shopware deployment if it differs from bin/build-storefront.sh.

After installation, open the plugin configuration and enable the search locations you want to use. Activating the plugin alone does not enable the two optional search fields.

Install with Composer

Once the package is published on Packagist, install it from the Shopware project root:

Update an existing installation

Update the package or repository checkout using your normal deployment process, then run:

Configuration

In the Shopware administration, open Extensions → My extensions, find Quick add to cart, and open its configuration. Configuration labels are available in English and German. Select the appropriate sales-channel scope before changing settings.

Setting Configuration key Effect
Show advanced product search in cart QuickAddCart.config.showAdvancedSearchInCart Shows the product search on the cart page. Disabled while unset.
Show advanced product search in off-canvas cart QuickAddCart.config.showAdvancedSearchInOffCanvas Shows the product search in the offcanvas cart. Disabled while unset.
Only Show Cart Icon QuickAddCart.config.showOnlyIcon Uses an icon-only add button for simple products in search suggestions. The default is the text button.
Availability Rule QuickAddCart.config.availabilityRule Restricts the search widgets to a matching Rule Builder rule. With no rule selected, the enabled locations are available without an additional rule restriction.

The two visibility switches are independent. For example, you can enable the full cart-page search and keep the standard offcanvas layout.

An availability rule is evaluated against the current sales-channel context. The selected rule must match for either quick-add widget to appear. Rules based on cart values can therefore change the widget's visibility as the cart changes.

Suggested first setup

  1. Enable Show advanced product search in cart.
  2. Enable Show advanced product search in off-canvas cart if you also want sidebar ordering.
  3. Leave Only Show Cart Icon disabled until you have checked the layout in your theme.
  4. Leave Availability Rule empty for general availability, or select a rule for your intended audience or cart conditions.
  5. Save and check both locations in the storefront.

How customers use it

  1. Open the cart page or the offcanvas cart.
  2. Enter a product name or product number in Product search.
  3. Select the desired quantity for a simple product and click the add-to-cart button.
  4. For a product with variants, click Choose Variant, select the available options in the dialog, and add the selected variant.

Search uses Shopware's suggestion route and configured minimum search length. Results depend on the current sales channel, its search configuration and product visibility. A simple product receives a direct purchase form only when Shopware considers it available and its calculated maximum purchase quantity meets its minimum purchase quantity.

Development setup

The included Docker Compose setup uses dockware/shopware:6.7.15.1 and mounts this repository into custom/plugins/QuickAddCart.

If the plugin is already installed, use the update command instead of installing it again. The development storefront is exposed at http://localhost; the Compose file also exposes additional Dockware development ports.

Testing and coverage

The repository includes PHP unit tests, Storefront JavaScript unit tests and browser acceptance tests built with the official Shopware Acceptance Test Suite.

Layer Tool Coverage policy
PHP PHPUnit with Xdebug 100% line coverage across PHP sources in src/, including executable service and routing configuration
Storefront JavaScript Jest with jsdom 100% statements, branches, functions and lines across storefront JavaScript sources
Storefront behavior Playwright / Shopware ATS Browser scenarios against a real Shopware installation; no percentage claim for Twig templates or CSS

The coverage badges show enforced thresholds, not a separate live coverage feed. The CI badge links to the workflow result and changes with GitHub Actions status. Download the coverage artifacts from a workflow run to inspect that run's measured coverage.

PHP unit tests

From the plugin repository root, use PHP 8.4 and the extensions required by Shopware:

The coverage command requires Xdebug and fails below 100% line coverage. Reports are written to:

The unit suite covers availability-rule handling, Twig integration, buy-box controller behavior, unique widget identifiers, exception propagation and service/routing configuration. It uses Composer's autoloader without installing a Shopware database.

JavaScript unit tests

Use Node.js 24 or 25:

Jest covers plugin registration, event setup and teardown, empty modal-wrapper cleanup, suggestion initialization and compatibility with Shopware's global plugin initializer. Coverage is written to build/coverage/storefront/ relative to the repository root.

The directory name tests/appearence/ is retained from the existing repository layout.

Browser acceptance tests

Use an installed, active plugin with compiled storefront assets in a development or test Shopware instance:

APP_URL must end with /. The credentials above are Dockware development defaults. For integration-based authentication, supply SHOPWARE_ACCESS_KEY_ID and SHOPWARE_SECRET_ACCESS_KEY instead of administrator credentials.

The acceptance suite creates its own sales channel and test products through the Admin API, restores changed configuration and cleans up its test data. Use a development/test instance for these tests.

Covered scenarios include:

Useful commands, run from tests/appearence/:

Continuous integration and badges

Shopware Plugin CI runs on pull requests and merge queues targeting main or master.

The workflow checks the Composer version increment, PHP tests and coverage, JavaScript tests and coverage, TypeScript types, browser acceptance tests and Shopware extension validation against the lowest and highest supported versions. For browser tests it starts a fresh Dockware instance, installs the plugin, builds storefront assets and compiles the theme.

Workflow artifacts include:

Artifact Contents
php-coverage Clover and HTML PHP coverage reports
playwright-results Playwright HTML report, JUnit output, JavaScript coverage and failure screenshots, videos and traces

The version and Shopware badges read the composer.json on main, so they update when that branch changes. Version (main) is the declared development version, rather than a claim that a corresponding release has already been published. The CI badge is scoped to pull-request runs. Coverage gates and the supported PHP range are documented policy badges.

Badge mechanisms follow GitHub's workflow-badge documentation and Shields.io's dynamic JSON documentation.

Troubleshooting

Symptom What to check
No product search is visible Confirm the plugin is active, enable the corresponding location, check the sales-channel configuration scope, and check whether the availability rule matches.
Product suggestions are missing Enter enough characters to meet Shopware's minimum search length. Check product visibility, searchability and assignment to the active sales channel.
A product has no direct add button Check availability, minimum purchase quantity and calculated maximum purchase quantity. Variant products use Choose Variant.
Changes to JavaScript or styling do not appear Rebuild storefront assets, compile the theme and clear Shopware's cache.
Search results or a variant dialog look incorrect in a custom theme Compare against the standard Storefront theme and check overrides of cart, search-suggestion and buy-widget Twig blocks.
Playwright cannot reach or authenticate with the shop Check APP_URL, its trailing slash, credentials or integration permissions, and that the target instance is running.
PHP coverage cannot be generated Check that Xdebug is installed and that its coverage mode can be enabled.

Support and contributing

Report reproducible problems through GitHub Issues. Include your Shopware/PHP versions, theme, relevant plugin settings and steps to reproduce the issue. Screenshots and relevant error messages are helpful.

For contributions, include tests for changed behavior and run the PHP coverage, JavaScript coverage, type checks and relevant browser scenarios before opening a pull request.

Maintained by CodeRedlich. Support: [email protected].

License

QuickAddCart is released under the MIT License.


All versions of quick-add-cart with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
shopware/core Version ~6.7.0
shopware/storefront Version ~6.7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package code-redlich/quick-add-cart contains the following files

Loading the files please wait ...