Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 6.4.2
* Anpassung Rechnungskauf als gewerblicher Kunde

# 6.4.1
* Neue Konfigurationsoption für automatischen Einzug / Refund bei Statuswechsel

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG_en-GB.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 6.4.2
* Adaption Invoice as commerical customer

# 6.4.1
* New config setting to capture and refund on status change

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ For any issues or questions please get in touch with our support.
**Twitter**: [@UnzerTech](https://twitter.com/UnzerTech)

**Webpage**: https://unzer.com/

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unzerdev/shopware6",
"description": "Unzer payment integration for Shopware 6",
"version": "6.4.1",
"version": "6.4.2",
"type": "shopware-platform-plugin",
"license": "Apache-2.0",
"minimum-stability": "dev",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,26 @@ export default class UnzerPaymentPaylaterInvoicePlugin extends Plugin {
* @private
*/
_registerEvents() {
if (document.getElementById('unzerPaymentCompanyType')) {
document.getElementById('unzerPaymentCompanyType').addEventListener('change', (event) => this._toggleB2CForm(event));
}
this._toggleB2CForm();
this._unzerPaymentPlugin.$emitter.subscribe('unzerBase_createResource', () => this._onCreateResource(), {
scope: this
});
}

/**
* @private
*/
_toggleB2CForm() {
if (document.getElementById('unzerPaymentCompanyType').value === "sole") {
document.getElementById("unzer-payment-b2c-form").style.display = "block";
} else {
document.getElementById("unzer-payment-b2c-form").style.display = "none";
}
}

/**
* @private
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<select required="required"
form="confirmOrderForm"
name="unzerPaymentCompanyType"
id="unzerPaymentCompanyType"
class="form-control">
<option value=""
disabled="disabled"
Expand All @@ -41,7 +42,7 @@
{% endblock %}

{% block unzer_payment_frame_paylater_invoice_birthday %}
<div id="unzer-payment-b2c-form">
<div id="unzer-payment-b2c-form" {% if context.customer.activeBillingAddress.company is not empty %} style="display: {% if page.extensions[paymentDataExtensionName].unzerCustomer and page.extensions[paymentDataExtensionName].unzerCustomer.companyInfo and page.extensions[paymentDataExtensionName].unzerCustomer.companyInfo.companyType == 'sole' %}block{% else %}none{% endif %};" {% endif %}>
<label for="unzerPaymentBirthday" class="unzer-payment-label">
{{ "account.personalBirthdayLabel"|trans }}
</label>
Expand Down