Skip to content

Commit 69f6fb2

Browse files
authored
Merge pull request #94 from gabriela-lubkowska/master
Fix build in admin and fix extensions overriding
2 parents 3583aad + d9d3dfa commit 69f6fb2

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bitbag/shopware-inpost-plugin",
33
"description": "InPost integration for Shopware",
4-
"version": "1.2.3",
4+
"version": "1.2.4",
55
"type": "shopware-platform-plugin",
66
"license": "MIT",
77
"authors": [

src/Resources/public/administration/css/bit-bag-shopware-in-post-plugin.css

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/public/administration/js/bit-bag-shopware-in-post-plugin.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/views/storefront/component/shipping/shipping-method.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{% endif %}
1515

1616
{% if (shipping.id is same as(context.shippingMethod.id)) and technicalName == constant('BitBag\\ShopwareInPostPlugin\\Factory\\ShippingMethodPayloadFactoryInterface::SHIPPING_KEY') %}
17-
{% if page.extensions['BitBagShopwareInPostPlugin.inpost.inPostEnvironment'] == constant('BitBag\\ShopwareInPostPlugin\\Api\\WebClientInterface::PRODUCTION_ENVIRONMENT') %}
17+
{% if page.extensions[constant('BitBag\\ShopwareInPostPlugin\\Config\\InPostConfigServiceInterface::SYSTEM_CONFIG_PREFIX')]['inPostEnvironment'] == constant('BitBag\\ShopwareInPostPlugin\\Api\\WebClientInterface::PRODUCTION_ENVIRONMENT') %}
1818
<link rel="stylesheet" href="https://geowidget.inpost.pl/inpost-geowidget.css"/>
1919
<script src="https://geowidget.inpost.pl/inpost-geowidget.js" defer></script>
2020
{% else %}
@@ -37,7 +37,7 @@
3737

3838
<div class="data-inpost-plugin-map-container" data-inpost-plugin-map>
3939
<inpost-geowidget onpoint="afterPointSelected"
40-
token="{{ page.extensions['BitBagShopwareInPostPlugin.inpost.inPostWidgetToken'] }}"
40+
token="{{ page.extensions[constant('BitBag\\ShopwareInPostPlugin\\Config\\InPostConfigServiceInterface::SYSTEM_CONFIG_PREFIX')]['inPostWidgetToken'] }}"
4141
language="pl"
4242
config="parcelCollect"></inpost-geowidget>
4343
</div>

src/Subscriber/CartConvertedSubscriber.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public function checkoutConfirmPageLoaded(CheckoutConfirmPageLoadedEvent $event)
105105
$salesChannelId = $event->getSalesChannelContext()->getSalesChannelId();
106106
$configService = $this->inPostConfigService->getInPostApiConfig($salesChannelId);
107107

108-
$event->getPage()->setExtensions([
109-
$systemConfigPrefix . '.inPostWidgetToken' => $configService->getWidgetToken(),
110-
$systemConfigPrefix . '.inPostEnvironment' => $configService->getEnvironment(),
108+
$event->getPage()->addArrayExtension($systemConfigPrefix, [
109+
'inPostWidgetToken' => $configService->getWidgetToken(),
110+
'inPostEnvironment' => $configService->getEnvironment(),
111111
]);
112112
}
113113

0 commit comments

Comments
 (0)