Skip to content

Commit

Permalink
Merge pull request #12 from logeecom/feature/crset-25
Browse files Browse the repository at this point in the history
Release v1.0.1
  • Loading branch information
logeecom authored Feb 1, 2021
2 parents 4448d33 + d58bd16 commit ee3793c
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 15 deletions.
7 changes: 3 additions & 4 deletions Packlink/Controllers/Backend/PacklinkDefaultWarehouse.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Packlink\BusinessLogic\Country\WarehouseCountryService;
use Packlink\Infrastructure\Logger\Logger;
use Packlink\Infrastructure\ServiceRegister;
use Packlink\BusinessLogic\Country\CountryService;
use Packlink\BusinessLogic\Warehouse\WarehouseService;
use Packlink\Controllers\Common\CanInstantiateServices;
use Packlink\Utilities\Request;
Expand Down Expand Up @@ -75,12 +75,11 @@ public function searchAction()
*/
public function getCountriesAction()
{
/** @var \Packlink\BusinessLogic\Country\CountryService $countryService */
$countryService = ServiceRegister::getService(CountryService::CLASS_NAME);
/** @var WarehouseCountryService $countryService */
$countryService = ServiceRegister::getService(WarehouseCountryService::CLASS_NAME);
$supportedCountries = $countryService->getSupportedCountries();

foreach ($supportedCountries as $country) {
$country->registrationLink = str_replace('shopware', 'pro', $country->registrationLink);
$country->name = Translation::get("configuration/country/{$country->code}");
}

Expand Down
29 changes: 29 additions & 0 deletions Packlink/Controllers/Backend/PacklinkRegistration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Packlink\BusinessLogic\Country\CountryService;
use Packlink\Infrastructure\ServiceRegister;
use Packlink\Controllers\Common\CanInstantiateServices;
use Packlink\Utilities\Translation;
use Packlink\Utilities\Response;

class Shopware_Controllers_Backend_PacklinkRegistration extends Enlight_Controller_Action
{
use CanInstantiateServices;

/**
* Returns countries supported by Packlink.
*/
public function getCountriesAction()
{
/** @var \Packlink\BusinessLogic\Country\CountryService $countryService */
$countryService = ServiceRegister::getService(CountryService::CLASS_NAME);
$supportedCountries = $countryService->getSupportedCountries();

foreach ($supportedCountries as $country) {
$country->registrationLink = str_replace('shopware', 'pro', $country->registrationLink);
$country->name = Translation::get("configuration/country/{$country->code}");
}

Response::dtoEntitiesResponse($supportedCountries);
}
}
50 changes: 50 additions & 0 deletions Packlink/Resources/snippets/backend/packlink/configuration.ini
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ configuration/country/TR = "Turkey"
configuration/country/IE = "Ireland"
configuration/country/GB = "United Kingdom"
configuration/country/HU = "Hungary"
configuration/country/PL = "Poland"
configuration/country/CH = "Switzerland"
configuration/country/LU = "Luxembourg"
configuration/country/AR = "Argentina"
configuration/country/US = "United States"
configuration/country/BO = "Bolivia"
configuration/country/MX = "Mexico"
configuration/country/CL = "Chile"
configuration/country/CZ = "Czech Republic"
configuration/country/SE = "Sweden"
configuration/importingservices = "We are importing the best shipping services for your shipments."
configuration/takefewseconds = "This process could take a few seconds."
configuration/troublereceivingservices = "We are having troubles getting shipping services."
Expand Down Expand Up @@ -306,6 +316,16 @@ configuration/country/TR = "Türkei"
configuration/country/IE = "Irland"
configuration/country/HU = "Ungarn"
configuration/country/GB = "Vereinigtes Königreich"
configuration/country/PL = "Polen"
configuration/country/CH = "Schweiz"
configuration/country/LU = "Luxemburg"
configuration/country/AR = "Argentinien"
configuration/country/US = "Vereinigte Staaten"
configuration/country/BO = "Bolivien"
configuration/country/MX = "Mexiko"
configuration/country/CL = "Chile"
configuration/country/CZ = "Tschechien"
configuration/country/SE = "Schweden"
configuration/importingservices = "Die besten Versanddienste für Ihre Sendungen werden jetzt importiert."
configuration/takefewseconds = "Dieser Vorgang könnte einige Sekunden dauern."
configuration/troublereceivingservices = "Beim Abrufen der Versanddienste ist ein Problem aufgetreten."
Expand Down Expand Up @@ -488,6 +508,16 @@ configuration/country/TR = "Turquie"
configuration/country/IE = "Irlande"
configuration/country/GB = "Royaume-Uni"
configuration/country/HU = "Hongrie"
configuration/country/PL = "Pologne"
configuration/country/CH = "Suisse"
configuration/country/LU = "Luxembourg"
configuration/country/AR = "Argentine"
configuration/country/US = "États Unis"
configuration/country/BO = "Bolivie"
configuration/country/MX = "Mexique"
configuration/country/CL = "Chili"
configuration/country/CZ = "République Tchèque"
configuration/country/SE = "Suède"
configuration/importingservices = "Nous importons les meilleurs services de livraison pour vos envois."
configuration/takefewseconds = "Ce processus peut prendre quelques secondes."
configuration/troublereceivingservices = "Nous rencontrons des problèmes dans l’importation des services de livraison."
Expand Down Expand Up @@ -670,6 +700,16 @@ configuration/country/TR = "Turchia"
configuration/country/IE = "Irlanda"
configuration/country/GB = "Regno Unito"
configuration/country/HU = "Ungheria"
configuration/country/PL = "Polonia"
configuration/country/CH = "Svizzera"
configuration/country/LU = "Lussemburgo"
configuration/country/AR = "Argentina"
configuration/country/US = "Stati Uniti"
configuration/country/BO = "Bolivia"
configuration/country/MX = "Messico"
configuration/country/CL = "Chile"
configuration/country/CZ = "Repubblica Ceca"
configuration/country/SE = "Svezia"
configuration/importingservices = "Stiamo importando i migliori servizi di spedizione per le tue spedizioni."
configuration/takefewseconds = "Questo processo potrebbe richiedere qualche istante."
configuration/troublereceivingservices = "Si è verificato un problema durante l’acquisizione dei servizi di spedizione."
Expand Down Expand Up @@ -852,6 +892,16 @@ configuration/country/TR = "Turquía"
configuration/country/IE = "Irlanda"
configuration/country/GB = "Reino Unido"
configuration/country/HU = "Hungría"
configuration/country/PL = "Polonia"
configuration/country/CH = "Suiza"
configuration/country/LU = "Luxemburgo"
configuration/country/AR = "Argentina"
configuration/country/US = "Estados Unidos"
configuration/country/BO = "Bolivia"
configuration/country/MX = "México"
configuration/country/CL = "Chile"
configuration/country/CZ = "Republica checa"
configuration/country/SE = "Suecia"
configuration/importingservices = "Estamos importando los mejores servicios de mensajería para tus envíos."
configuration/takefewseconds = "Este proceso puede tardar unos segundos."
configuration/troublereceivingservices = "We are having troubles getting shipping services."
Expand Down
2 changes: 1 addition & 1 deletion Packlink/Resources/views/backend/packlink_login/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="pl-register-country-title-wrapper">
{s name="login/country"}Select country to start{/s}
</div>
<input type="hidden" id="pl-countries-url" value="{url controller=PacklinkDefaultWarehouse action="getCountries" __csrf_token=$csrfToken}" />
<input type="hidden" id="pl-countries-url" value="{url controller=PacklinkRegistration action="getCountries" __csrf_token=$csrfToken}" />
<input type="hidden" id="pl-logo-path" value="{link file="backend/_resources/images/flags/"}" />
<div class="pl-register-country-list-wrapper">
</div>
Expand Down
1 change: 0 additions & 1 deletion Packlink/Services/BusinessLogic/ConfigurationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
class ConfigurationService extends Configuration
{
const INTEGRATION_NAME = 'Shopware';
const DEFAULT_VERSION = '1.0.0';
const ECOMMERCE_NAME = 'Shopware';
const DRAFT_SOURCE = 'module_shopware';
const MAX_TASK_INACTIVITY_PERIOD = 60;
Expand Down
4 changes: 2 additions & 2 deletions Packlink/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "packlink/shopware",
"description": "Packlink Shipping Shopware plugin",
"type": "library",
"version": "1.0.0",
"version": "1.0.1",
"repositories": [
{
"type": "vcs",
Expand All @@ -13,7 +13,7 @@
"minimum-stability": "dev",
"require": {
"php": ">=5.6",
"packlink/integration-core": "2.1.3",
"packlink/integration-core": "2.3.0",
"ext-json": "*",
"ext-curl": "*",
"ext-zip": "*",
Expand Down
12 changes: 6 additions & 6 deletions Packlink/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Packlink/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label lang="de">Packlink</label>
<label lang="en">Packlink</label>

<version>1.0.0</version>
<version>1.0.1</version>
<copyright>(c) by Packlink Shipping S.L.</copyright>
<license>proprietary</license>
<link>https://pro.packlink.de/</link>
Expand Down
Binary file added PluginInstallation/1.0.1/Packlink.zip
Binary file not shown.
Empty file.

0 comments on commit ee3793c

Please sign in to comment.