Giter Club home page Giter Club logo

pdk's People

Contributors

dependabot[bot] avatar edielemoine avatar floriansdv avatar gravendeeljochem avatar joerivanveen avatar mark-ernst avatar myparcel-bot[bot] avatar richardperdaan avatar semantic-release-bot avatar wthijmen avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pdk's Issues

APCu installed but not enabled throws exception in php-di

What went wrong?

When the APCu extension is present but not enabled, an error is thrown in the ContainerBuilder.

Reproduction steps

  1. Have apcu extension but not enabled (?)
  2. Attempt to use the pdk
  3. Get error

Relevant log output

Fatal error: Uncaught Exception: APCu is not enabled, PHP-DI cannot use it as a cache in /xxx/vendor/php-di/php-di/src/ContainerBuilder.php:138

Stack trace:

#0 /xxx/pdk/src/Base/Factory/PdkFactory.php(88): MyParcelNL\DI\ContainerBuilder->build()
#1 /xxx/pdk/src/Base/Factory/PdkFactory.php(34): MyParcelNL\Pdk\Base\Factory\PdkFactory->setupContainer()
#2 /xxx/pdk/src/Base/PdkBootstrapper.php(57): MyParcelNL\Pdk\Base\Factory\PdkFactory::create()
#3 /xxx/pdk/src/Base/PdkBootstrapper.php(41): MyParcelNL\Pdk\Base\PdkBootstrapper->createPdkInstance()

// Rest of the stack trace omitted

thrown in /xxx/vendor/php-di/php-di/src/ContainerBuilder.php on line 138

Duplicate carriers when using PostNL custom contracts

@EdieLemoine: When fetching carriers from the MyParcel API, when PostNL custom contract carrier is enabled, multiple postnl carriers are returned. This causes problems all over the place. We need to correct this manually before saving these carriers in the PDK.

Original myparcelnl/prestashop issue content

Version check

  • My version of the plugin is v4.0.0-beta.0 or above.

PrestaShop version

8.1.5

PHP version

8.1.28

What went wrong?

I have tried to test the myparcelnl on stock PrestaShop 8.1.5 installation.

It seems that there is an issue when trying to save the API key for the first time (and after deleting the API key and setting it up again the issue occurs too).

Error log is below.

From what I can understand, the issue is that PostNL Carrier is duplicated (I don't know why) and the PostNL (Custom contract) use the same name. CarrierCollection which is used in the process of setting up new carriers contain seven MyParcelNL\Pdk\Carrier\Model\Carrier objects and three of them have the same name:

[0] => MyParcelNL\Pdk\Carrier\Model\Carrier Object
    (
    [cloned:protected] => 
    [attributes:protected] => Array
            (
                [externalIdentifier] => 
                [id] => 1
                [name] => postnl
                [human] => PostNL
                [contractId] => 
                [enabled] => 1
                [isDefault] => 1
                [label] => 
                [optional] => 0
                [primary] => 1
                [type] => main
[1] => MyParcelNL\Pdk\Carrier\Model\Carrier Object
    (
    [cloned:protected] => 
    [attributes:protected] => Array
            (
                [externalIdentifier] => 
                [id] => 1
                [name] => postnl
                [human] => PostNL
                [contractId] => 
                [enabled] => 1
                [isDefault] => 1
                [label] => 
                [optional] => 0
                [primary] => 1
                [type] => main
[2] => MyParcelNL\Pdk\Carrier\Model\Carrier Object 
    (
    [cloned:protected] => 
        [attributes:protected] => Array
            (
                [externalIdentifier] => 
                [id] => 1
                [name] => postnl
                [human] => PostNL
                [contractId] => <redacted>
                [enabled] => 1
                [isDefault] => 1
                [label] => 
                [optional] => 0
                [primary] => 1
                [type] => custom

There is one more bug (duplicated PostNL) in the configuration page too (screenshot below) that is probably related to this issue.

Reproduction steps

  1. Install the plugin on stock PrestaShop 8.1.5
  2. Go to the configuration page
  3. Save the API key - error
  4. Refresh
  • Configuration page now shows in the Carriers tab two PostNL tabs.

Relevant log output

accountUpdate ERROR handler ApiException: An exception occurred while executing 'INSERT INTO ps_myparcelnl_carrier_mapping (carrier_id, myparcel_carrier, date_upd, date_add) VALUES (?, ?, ?, ?)' with params [6, "postnl", "2024-04-24 13:33:08", "2024-04-24 13:33:08"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'postnl' for key 'myparcel_carrier'
    rn https://domain.com/modules/myparcelnl/views/js/backend/admin/dist/index.iife.js:15
    doRequest https://domain.com/modules/myparcelnl/views/js/backend/admin/dist/index.iife.js:21
index.iife.js:21:1018
    log https://domain.com/modules/myparcelnl/views/js/backend/admin/dist/index.iife.js:21
    error https://domain.com/modules/myparcelnl/views/js/backend/admin/dist/index.iife.js:21
    Xy https://domain.com/modules/myparcelnl/views/js/backend/admin/dist/index.iife.js:21

Additional context

image

Pickup locations not visible or exported

What went wrong?

When a customer chooses a pickup location, this is not visible in the backend as well as not exported to MyParcel.

Original message

Binnen de checkout kan een klant een afhaalpunt selecteren. Ondanks de selectie wordt het afhaalpunt niet meegenomen in de bestelling en niet zichtbaar in de backend. Ook na het exporteren wordt het afhaalpunt niet geëxporteerd.

Reproduction steps

  1. Create order, choose a pickup location
  2. Open order, see no pickup location
  3. Export order
  4. See pickup location is not exported

Relevant log output

No response

Additional context

Originally reported by @christiantraets (myparcelnl/woocommerce#1050)

Insurance for EU and ROW

What problem does this feature solve?

In the old plugin, it was possible to insure shipments to both EU and ROW regardless of the purchase amount. Customers would like to see this option available again in the new version of WooCommerce.

Old version screenshot:
image

New version screenshot:
image

What should the solution look like?

An individual insurance field for the field for EU Shipments and optionally for ROW.

image

Relevant log output

No response

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.