https://github.com/cronixweb/shopware-avantlink-plugin
https://github.com/cronixweb/shopware-avantlink-plugin
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cronixweb/shopware-avantlink-plugin
- Owner: cronixweb
- Created: 2025-07-17T04:00:16.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-11-11T09:18:56.000Z (7 months ago)
- Last Synced: 2025-11-11T11:20:44.787Z (7 months ago)
- Language: PHP
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CronixAvantLink Plugin for Shopware 6
**Official GitHub Repository:** [cronixweb/shopware-avantlink-plugin](https://github.com/cronixweb/shopware-avantlink-plugin)
The CronixAvantLink plugin integrates AvantLinkβs **site-wide** and **order confirmation tracking** scripts into your Shopware 6 storefront β making affiliate tracking simple and automated.
---
## π οΈ System Requirements
- PHP 8.1 or higher
- Docker with Docker Desktop (recommended for local dev)
- Shopware 6.6.x or 6.7.x (tested on 6.7)
- Minimum Shopware version: 6.6.0.0
- Composer
- Git
---
## π Quick Start Guide (Local Setup using Docker)
This plugin was tested using the `dockware/dev:latest` Docker image.
### 1. Setup Shopware via Docker
Create a new folder like `shopware_project` and place the following `docker-compose.yml` file inside:
```yaml
version: "3.7"
services:
shopware:
image: dockware/dev:latest
container_name: shopware
ports:
- "80:80" # HTTP
- "3306:3306" # MySQL
- "22:22" # SSH
- "8888:8888" # Mailcatcher
- "9999:9999" # Adminer
volumes:
- shop_volume:/var/www/html
- db_volume:/var/lib/mysql
environment:
- XDEBUG_ENABLED=1
networks:
- web
volumes:
db_volume:
shop_volume:
networks:
web:
driver: bridge
```
Now run:
```bash
docker compose up -d
```
After container starts, you can access:
- Shopware Frontend: http://localhost
- Shopware Admin Panel: http://localhost/admin (username: `admin`, password: `shopware`)
---
### π¦ Plugin Installation (Inside Docker)
1. Access Docker Container
```bash
docker exec -it shopware bash
```
2. Navigate to Plugin Directory
```bash
cd custom/plugins/
```
3. Clone the Plugin (if not already placed)
```bash
git clone https://github.com/cronixweb/shopware-avantlink-plugin.git CronixAvantLink
```
Or create plugin using:
```bash
bin/console plugin:create CronixAvantLink
```
Then copy the folder manually into `custom/plugins`.
4. Install & Activate Plugin
```bash
bin/console plugin:refresh
bin/console plugin:install --activate CronixAvantLink
bin/console cache:clear
```
---
## βοΈ Plugin Features
### β
1. Site-Wide Tracking Integration
AvantLink script is injected globally into your storefront's `` section.
Implemented in:
`src/Storefront/Resources/views/storefront/base.html.twig`
---
### β
2. Order Confirmation Tracking Script
Tracks orders on the checkout "Thank You" page.
Implemented in:
`src/Storefront/Resources/views/storefront/page/checkout/finish/index.html.twig`
---
### β
3. Configuration from Admin
Go to:
**Shopware Admin > Extensions > CronixAvantLink**
You can configure:
- Merchant ID
- Test Mode
- Enable/Disable Tracking
- Script Injection Position
---
### β
4. Event Subscriber
Used to dynamically inject data into Twig templates from order context.
Implemented in:
`src/Storefront/Subscriber/OrderTrackingSubscriber.php`
---
## ποΈ Plugin Folder Structure
```
CronixAvantLink/
βββ src/
β βββ Resources/
β β βββ config/
β β β βββ config.xml
β β β βββ plugin.png
β β β βββ plugin.xml
β β β βββ services.xml
β β βββ views/
β β βββ storefront/
β β βββ layout/
β β β βββ footer/
β β β βββ footer-minimal.html.twig
β β βββ page/
β β β βββ checkout/
β β β βββ finish/
β β β βββ index.html.twig
β β βββ base.html.twig
β βββ Storefront/
β β βββ Subscriber/
β β βββ OrderTrackingSubscriber.php
β βββ CronixAvantLink.php
βββ tests/
βββ composer.json
βββ phpunit.xml
βββ README.md
---
## π§ͺ Testing the Plugin
1. Visit the Shopware storefront: [http://localhost](http://localhost)
2. Go to checkout and complete a test order.
3. Open browser Developer Tools β Network tab β and check if the AvantLink script loads successfully.
4. Test configuration changes via plugin settings in the admin.
To validate the AvantLink plugin using `shopware-cli`:
```bash
shopware-cli extension validate custom/plugins/CronixAvantLink
```
Sample Output:
```
β 0 problems (0 errors, 0 warnings)
```
---
## π‘ License
MIT License
---
## π¨βπ» Author
**Cronix LLC**
Website: [https://cronixweb.com](https://cronixweb.com)
Email: [admin@cronixweb.com](mailto:admin@cronixweb.com)