Magento 2 integration module | Read-only mirror of https://github.com/swisspost-yellowcube/magento2-yellowcube — Die Schweizerische Post AG. Issues & pull requests at the source.
  • PHP 97.5%
  • HTML 2.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sascha Grossenbacher 7a743e2cd9 Update version to 1.0.4
2019-08-13 12:45:51 +02:00
Block/Adminhtml Coding standard fixes, restore missing Source class 2019-05-07 09:21:56 +02:00
Controller/Adminhtml Make stock class not abstract 2019-06-24 12:07:23 +02:00
etc Update version to 1.0.4 2019-08-13 12:45:51 +02:00
Helper Introduce shipping status 2019-05-24 14:06:57 +02:00
Model Improved error handling in WAR process 2019-08-13 12:44:11 +02:00
Observer Submit ART if lot management is enabled, add tests for changes 2019-06-07 14:14:27 +02:00
Setup Implement ART response checks, store reference and response errors on products, tests, show status in product grid 2019-05-10 14:43:08 +02:00
Tests Remove leftover method call 2019-07-02 14:51:50 +02:00
Ui/Component/Listing/Columns Keep lot schema change 2019-05-27 13:54:18 +02:00
view Added resend mass action 2019-06-07 14:14:24 +02:00
21942.diff Added mysql-mq patch 2019-03-27 16:31:15 +01:00
composer.json Update required version of yellowcube-php 2019-06-07 14:24:37 +02:00
LICENSE.txt Initial commit. Converted from magento-yellowcube, minimal updates to allow compilation 2019-03-14 14:23:40 +01:00
README.md Update Readme.md 2019-06-07 14:32:38 +02:00
registration.php Coding standard fixes, restore missing Source class 2019-05-07 09:21:56 +02:00

Magento 2 integration module for YellowCube from Post AG - Switzerland

License

This extension is licensed under OSL v.3.0 Some classes and javascript contain a MIT license.

System requirements

  • Magento CE >= 2.3
  • PHP >= 7.1 (as required by Magento 2.3)
  • PHP Soap, DOM Library, mbstring,
  • Cron enabled and configured for Magento 2

This relies on the new MessageQueue component in Magento 2.3 to synchronize data asynchronously. It defaults to the MysqlMq implementation, which has a known issue: https://github.com/magento/magento2/issues/21904.

Alternatively, override it to use the RabbitMQ adapter. @todo: Define how.

The store locale must be set to a locale supported by YellowCube (DE/FR/IT/EN-GB).

Installation

  • composer require swisspost-yellowcube/magento2-yellowcube
  • ./bin/magento module:enable Swisspost_YellowCube
  • ./bin/magento setup:upgrade

To add the Patch for MysqlMq:

composer require cweagans/composer-patches

# Add inside extra:

        "patches": {
            "magento/module-mysql-mq": {
                " MysqlMq: Use new MessageQueue Config interface, update unit tests #21942": "https://raw.githubusercontent.com/swisspost-yellowcube/magento2-yellowcube/master/21942.diff"
            }
        }
        
composer update --lock


Configuration

In Menu Stores > Configuration > Sales > Shipping Methods. enable YellowCube and configure it based on the received information.

In Menu Stores > Stocks, create a Stock that contains at least the automatically created YellowCube source.

Important: After code changes and deployments, the message queue processor that magento automatically starts on cron must be restarted.

User Manual / Configuration Manual

@TODO

Custom shipping methods

The known shipping methods can be extend in app/etc/config.php, Example:

    'system' => [
        'default' => [
            'carriers' => [
                'yellowcube' => [
                    'methods' => [
                        'eco' => [
                            'label' => 'PostPac Economy CHANGED',
                            'code' => 'ECO',
                        ],
                        'extra' => [
                            'label' => 'Extra new option',
                            'code' => 'ECO EXTRA',
                            'real_code' => 'ECO',
                            'additional' => 'EXTRA',
                        ],
                    ],
                ],
            ],
        ],
    ],

It is also possible to export the whole configuration and then adjust it. See

Automated tests

Tu run tests, follow the steps on https://devdocs.magento.com/guides/v2.3/test/integration/integration_test_execution.html, set testsuites to:

<testsuite name="YellowCube">
    <directory suffix="Test.php">../../../vendor/swisspost-yellowcube/magento2-yellowcube/Tests/Integration</directory>
</testsuite>