Skip to content

Commit

Permalink
Merge pull request #100 from Paazl/release/1.14.1
Browse files Browse the repository at this point in the history
Release/1.14.1
  • Loading branch information
Marvin-Magmodules authored Mar 7, 2023
2 parents 14fc1c3 + 601c0e1 commit 363205d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 15 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/setup-di-compile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run setup:upgrade and setup:di:compile
name: Run setup:di:compile
on: [pull_request]

jobs:
Expand All @@ -16,16 +16,19 @@ jobs:
MAGENTO_VERSION: 2.4.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1

- name: Start Docker
run: PHP_VERSION=${{ matrix.PHP_VERSION }} MAGENTO_VERSION=magento${{ matrix.MAGENTO_VERSION }} docker-compose -f .github/workflows/templates/docker-compose.yml up -d
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}

- name: Create branch for Composer and remove version from composer.json
run: git checkout -b continuous-integration-test-branch && sed -i '/version/d' ./composer.json

- name: Upload the code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/ && docker exec magento-project-community-edition composer require paazl/magento2-checkout-widget:dev-continuous-integration-test-branch
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/

- name: Activate the extension and run setup:upgrade and setup:di:compile
run: docker exec magento-project-community-edition bash -c "php bin/magento module:enable Paazl_CheckoutWidget && php bin/magento setup:upgrade && php bin/magento setup:di:compile"
- name: Install the extension in Magento
run: docker exec magento-project-community-edition composer require paazl/magento2-checkout-widget:@dev --no-plugins

- name: Run setup:di:compile
run: docker exec magento-project-community-edition ./retry "php bin/magento setup:di:compile"
6 changes: 3 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
MAGENTO_VERSION: 2.4.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1

- name: Start Docker
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}
Expand All @@ -25,10 +25,10 @@ jobs:
run: git checkout -b continuous-integration-test-branch && sed -i '/version/d' ./composer.json

- name: Upload the code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/ && docker exec magento-project-community-edition composer require paazl/magento2-checkout-widget:dev-continuous-integration-test-branch
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/ && docker exec magento-project-community-edition composer require paazl/magento2-checkout-widget:@dev --no-plugins

- name: Activate the extension and run setup:upgrade
run: docker exec magento-project-community-edition bash -c "php bin/magento module:enable Paazl_CheckoutWidget && php bin/magento setup:upgrade"
run: docker exec magento-project-community-edition ./retry "php bin/magento module:enable Paazl_CheckoutWidget && php bin/magento setup:upgrade && php bin/magento setup:di:compile"

- name: Run tests
run: docker exec magento-project-community-edition bash -c "vendor/bin/phpunit extensions/*/Test/Unit"
8 changes: 6 additions & 2 deletions Console/Command/OrderSendCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use Magento\Framework\App\Area;
use Magento\Framework\App\State;
use Magento\Framework\Console\Cli;
use Magento\Framework\Exception\CouldNotSaveException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Sales\Api\OrderRepositoryInterface;
Expand Down Expand Up @@ -90,10 +91,11 @@ public function getInputList()
}

/**
* @param InputInterface $input
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|void|null
* @return int
* @throws LocalizedException
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand All @@ -119,5 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln("<error>Order ID {$item}: {$e->getMessage()}</error>");
}
}

return Cli::RETURN_SUCCESS;
}
}
13 changes: 11 additions & 2 deletions Model/Api/Converter/Checkout/ToShippingInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,18 @@ public function convert($response)
$info->setIdenfifier($this->arrayManager->get('shippingOption/identifier', $result));
$info->setPrice(floatval($this->arrayManager->get('shippingOption/rate', $result)));
$info->setOptionTitle($this->arrayManager->get('shippingOption/name', $result));
$info->setPreferredDeliveryDate($this->arrayManager->get('preferredDeliveryDate', $result));

if (!$prefferedDeliveryDate = $this->arrayManager->get('preferredDeliveryDate', $result)) {
$prefferedDeliveryDate = $this->arrayManager->get('shippingOption/deliveryDates/0/deliveryDate', $result);
}
$info->setPreferredDeliveryDate($prefferedDeliveryDate);

$info->setEstimatedDeliveryRange($this->arrayManager->get('shippingOption/estimatedDeliveryRange', $result));
$info->setCarrierPickupDate($this->arrayManager->get('pickupDate', $result));

if (!$pickupDate = $this->arrayManager->get('pickupDate', $result)) {
$pickupDate = $this->arrayManager->get('shippingOption/deliveryDates/0/pickupDate', $result);
}
$info->setCarrierPickupDate($pickupDate);

if ($info->getType() === DeliveryType::PICKUP) {
$info->setPickupDate($this->arrayManager->get('pickupDate', $result));
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "paazl/magento2-checkout-widget",
"description": "Paazl checkoutWidget for Magento 2",
"type": "magento2-module",
"version": "1.14.0",
"version": "1.14.1",
"keywords": [
"Paazl",
"Magento 2",
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<default>
<carriers>
<paazlshipping>
<version>v1.14.0</version>
<version>v1.14.1</version>
<active>0</active>
<sallowspecific>0</sallowspecific>
<price>0</price>
Expand Down

0 comments on commit 363205d

Please sign in to comment.