Skip to content

Commit a6b8bf0

Browse files
committed
shopware 6.5 compatibility and codebarista branding
1 parent 23295f5 commit a6b8bf0

File tree

11 files changed

+87
-33
lines changed

11 files changed

+87
-33
lines changed

.github/workflows/package.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Package
2+
3+
on: [workflow_dispatch, push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Create Plugin ZIP
13+
run: ./create_plugin_zip.sh
14+
15+
- uses: actions/upload-artifact@v3
16+
with:
17+
path: codebarista_buy_button_state_synchronizer_*.zip

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
name: Publish Plugin ZIP
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Create Plugin ZIP
20+
run: ./create_plugin_zip.sh
21+
22+
- name: Upload Plugin ZIP to release
23+
uses: svenstaro/upload-release-action@v2
24+
with:
25+
repo_token: ${{ secrets.GITHUB_TOKEN }}
26+
file: codebarista_buy_button_state_synchronizer_*.zip
27+
file_glob: true
28+
tag: ${{ github.ref }}
29+
overwrite: true

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# BuyButtonStateSynchronizer
1+
# Buy-Button-State Synchronizer
22

33
If multiple Shopware plugins modify the buy-button's (btn-buy) disabled-state, the plugin that modifies the state last will win.
44
BuyButtonStateSynchronizer allows multiple plugins to agree with each other on the disabled-state of the buy button.
@@ -18,7 +18,7 @@ Instead of modifying the buy-button's disabled-state like this:
1818
export default class MyPlugin extends Plugin {
1919
init() {
2020
...
21-
this.buyBtn = document.getElementsByClassName("btn-buy").item(0);
21+
this.buyBtn = document.querySelector(".btn-buy");
2222
...
2323
}
2424

@@ -34,7 +34,7 @@ a compatible plugin should do this:
3434
export default class MyPlugin extends Plugin {
3535
init() {
3636
...
37-
this.buyBtn = document.getElementsByClassName("btn-buy").item(0);
37+
this.buyBtn = document.querySelector(".btn-buy");
3838
...
3939
}
4040

composer.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
{
2-
"name": "zwohansel/buybuttonstatesynchronizer",
3-
"version": "2.2.0",
2+
"name": "codebarista/buybuttonstatesynchronizer",
3+
"version": "3.0.0",
44
"description": "Allows multiple plugins to control the buy button state.",
55
"type": "shopware-platform-plugin",
66
"license": "MIT",
77
"authors": [
88
{
9-
"name": "ZwoHansel",
10-
"homepage": "https://zwohansel.de/"
9+
"name": "Codebarista",
10+
"homepage": "https://codebarista.de/"
1111
}
1212
],
1313
"require": {
14-
"shopware/core": "~6.4",
15-
"shopware/administration": "~6.4",
16-
"shopware/storefront": "~6.4"
14+
"shopware/core": "~6.5",
15+
"shopware/administration": "~6.5",
16+
"shopware/storefront": "~6.5"
1717
},
1818
"autoload": {
1919
"psr-4": {
20-
"BuyButtonStateSynchronizer\\": "src/"
20+
"Codebarista\\": "src/"
2121
}
2222
},
2323
"extra": {
24-
"shopware-plugin-class": "BuyButtonStateSynchronizer\\BuyButtonStateSynchronizer",
24+
"shopware-plugin-class": "Codebarista\\BaristaBuyButtonStateSynchronizer",
25+
"copyright": "Codebarista",
2526
"label": {
2627
"de-DE": "Buy-Button-State Synchronizer",
2728
"en-GB": "Buy-Button-State Synchronizer"
2829
},
2930
"description": {
30-
"de-DE": "Ermöglicht das sperren bzw. entsperren Kauf-Buttons durch mehrere Plug-ins.",
31+
"de-DE": "Ermöglicht das Sperren bzw. Entsperren des 'In den Warenkorb'-Buttons durch mehrere Plug-ins.",
3132
"en-GB": "Allows multiple plugins to control the buy button state."
33+
},
34+
"manufacturerLink": {
35+
"de-DE": "https://codebarista.de/",
36+
"en-GB": "https://codebarista.de/"
3237
}
3338
}
3439
}

icon.xcf

15 KB
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Codebarista;
4+
5+
use Shopware\Core\Framework\Plugin;
6+
7+
class BaristaBuyButtonStateSynchronizer extends Plugin
8+
{
9+
}

src/BuyButtonStateSynchronizer.php

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/Resources/app/storefront/dist/storefront/js/barista-buy-button-state-synchronizer.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Resources/app/storefront/dist/storefront/js/buy-button-state-synchronizer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Resources/config/plugin.png

7.48 KB
Loading

0 commit comments

Comments
 (0)