# Shop plugins

What the optional Shopware, WooCommerce and Magento plugins add to the script tag, where to download them and how to update them.

URL: https://punchout.dev/docs/plugins/

The punchout.dev shop plugins are optional add-ons for Shopware 6, WooCommerce and Magento 2 that print the script tag, mark the cart and sign buyers in.

## Do you need a plugin?

No. Every shop works with the script tag alone, see [Install the tag](https://punchout.dev/docs/getting-started/install-the-tag/). A plugin adds two things the tag cannot do on its own, and one convenience:

| Feature | Script tag only | With a plugin |
| --- | --- | --- |
| Cart container | Found once by the guided [cart detection](https://punchout.dev/docs/getting-started/cart-detection/) and stored on the **Cart** tab | Marked in the cart template with `data-punchout-cart`, nothing to detect |
| Buyer login | The buyer shops as a guest | [Auto-login](https://punchout.dev/docs/plugins/auto-login/): the buyer lands signed in to their customer account |
| Script tag | You paste it into the layout template | The plugin prints it from its settings |

## The cart marker

Each plugin wraps the cart on the cart page in a plain element without class, id or style:

```html
<div data-punchout-cart>
  <!-- the cart's line items -->
</div>
```

With the marker, punchout.dev reads only the marked cart. The marker always takes precedence over a cart container found by cart detection.

A detected cart container describes the theme as it is today. A theme update can move the cart so that the container is no longer found. The marker sits in the cart template and moves with it, so a shop with a plugin survives a redesign without a new cart detection.

:::tip
Run the setup self-test once after installing a plugin. Create a setup link on the shop's **Setup** tab, open it on the cart page and click **Detect cart**. The panel reports the source **Shop plugin**. Once you confirm, the **Cart detected** step in the portal is done.
:::

## Auto-login

Without a login, a punchout buyer shops as a guest and sees guest prices. Each plugin adds a login endpoint. When auto-login is set up, the launch sends the buyer's browser there first with a signed single-use token, and the plugin signs the mapped customer in. See [Auto-login](https://punchout.dev/docs/plugins/auto-login/).

## Which plugin for which platform

| Platform | Plugin | Download file | Login endpoint | Guide |
| --- | --- | --- | --- | --- |
| Shopware 6.7 | `PunchoutDev` | `PunchoutDev-<version>.zip` | `/punchout-dev/login` | [Shopware 6](https://punchout.dev/docs/plugins/shopware/) |
| WordPress with WooCommerce | `punchout-dev` | `punchout-dev-<version>.zip` | `/wp-json/punchout-dev/v1/login` | [WooCommerce](https://punchout.dev/docs/plugins/woocommerce/) |
| Magento 2.4 | module `PunchoutDev_Bridge` | `PunchoutDev-Bridge-<version>.zip` | `/punchout-dev/login` | [Magento 2](https://punchout.dev/docs/plugins/magento/) |

Each zip contains one top-level folder that the platform expects: `PunchoutDev/` for Shopware, `punchout-dev/` for WordPress, `PunchoutDev/Bridge/` for Magento's `app/code`.

On any other platform, you mark the cart yourself and, if you want auto-login, build the login endpoint. See [Your own integration](https://punchout.dev/docs/plugins/custom/).

## Download

You download the plugins from the portal, always in their current version. There is no public download link.

1. Sign in at [punchout.dev/login](https://punchout.dev/login) and open the shop.
2. On the **General** tab, set **Shop platform** to Shopware, WooCommerce or Magento and save.
3. Open the **Embed** tab. The section **Shopware plugin**, **WooCommerce plugin** or **Magento module** carries the button **Download plugin (version …)**.

With **Shop platform** set to **Other**, the Embed tab shows the script tag steps only.

## Settings every plugin shares

The plugins use the portal's words, so you can copy each value field by field:

| Plugin setting | Value | Copy it from |
| --- | --- | --- |
| Embed the snippet | On by default | |
| Snippet URL | `https://js.punchout.dev/pob.js` | Embed tab, **Snippet URL** |
| API base URL (optional) | Leave empty | |
| Enable auto-login | On by default | |
| Shop ID | `pob_live_…` | Embed tab, **Shop ID** |
| Public key lines | Every line the portal shows | Auto-login tab, **Public keys** |

The Shop ID does two jobs. The plugin prints it as `data-shop-id` on the script tag, and it accepts a login token only when the token was issued for this Shop ID. Without a Shop ID or a Snippet URL, the plugin prints no script tag.

## Updates

The plugins do not update themselves.

1. Download the new zip from the Embed tab.
2. Replace the installed plugin with it. The steps differ per platform and are on each platform page.

The settings live in the shop's database (Shopware system configuration, a WordPress option, Magento configuration), so replacing the plugin files keeps them.

:::caution
Version 2.0.0 renamed every technical identifier from `PunchoutNinja` / `punchout-ninja` to `PunchoutDev` / `punchout-dev`. To the shop platform it is a new plugin, not an update. Remove the 1.x plugin first and never run both, because each prints its own script tag. Then enter the settings again and change the **Login path** on the portal's Auto-login tab. The platform pages have the details.
:::

## Full plugin documentation

The plugin READMEs are published unchanged:

- [Shopware plugin README](https://punchout.dev/docs/plugins/shopware/readme/)
- [WooCommerce plugin README](https://punchout.dev/docs/plugins/woocommerce/readme/)
- [Magento module README](https://punchout.dev/docs/plugins/magento/readme/)
- [Login token specification](https://punchout.dev/docs/plugins/custom/login-token/) for your own endpoint
