diff --git a/composer.json b/composer.json index b868e9e..df8db71 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "slinicraftet204/notifyifavail", "description": "benachrichtigt Kunden, sobald ein Produkt wieder verfügbar ist", - "version": "0.1.501", + "version": "0.1.507", "type": "shopware-platform-plugin", "license": "MIT", "authors": [ diff --git a/src/Resources/public/js/notify-me.plugin.js b/src/Resources/public/js/notify-me.plugin.js index 455fdb9..e108432 100644 --- a/src/Resources/public/js/notify-me.plugin.js +++ b/src/Resources/public/js/notify-me.plugin.js @@ -7,9 +7,11 @@ export default class NotifyMe extends Plugin { this.submitButton = document.getElementById('submit-notify'); this.registerEvents(); + console.log("Hello this is NotifyMe Plugin JS init"); } registerEvents() { + console.log("Hello this is NotifyMe Plugin JS registerevents"); if (this.notifyButton) { this.notifyButton.addEventListener('click', () => this.submitForm(true)); } @@ -20,11 +22,13 @@ export default class NotifyMe extends Plugin { } validateEmail(email) { + console.log("Hello this is NotifyMe Plugin JS validateEmail"); const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailRegex.test(email); } submitForm(isLoggedIn) { + console.log("Hello this is NotifyMe Plugin JS submitForm"); let email; const productId = this.notifyButton.dataset.productId; diff --git a/src/Resources/snippets/de-DE.json b/src/Resources/snippets/de-DE.json index 581530c..ad7104e 100644 --- a/src/Resources/snippets/de-DE.json +++ b/src/Resources/snippets/de-DE.json @@ -1,6 +1,6 @@ { "NotifyIfAvail": { - "notify_me": "Benachrichtigen, wenn verfügbar", + "notify_me": "Benachrichtigen, wenn wieder verfügbar", "email_placeholder": "Geben Sie Ihre E-Mail-Adresse ein", "success_message": "Sie werden benachrichtigt, sobald der Artikel verfügbar ist." } diff --git a/src/Resources/views/storefront/component/buy-widget/buy-widget.html.twig b/src/Resources/views/storefront/component/buy-widget/buy-widget.html.twig index 79cbd86..74e5621 100644 --- a/src/Resources/views/storefront/component/buy-widget/buy-widget.html.twig +++ b/src/Resources/views/storefront/component/buy-widget/buy-widget.html.twig @@ -1,26 +1,30 @@ +{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %} + {% block buy_widget_price %} -
Produkt verfügbar? {{ product.available ? 'Ja' : 'Nein' }}
+Lagerbestand: {{ product.stock }}
- {% if app.customer %} - - - {% else %} - - - - {% endif %} -