Drupal 10 update

Created on 11 January 2023, almost 2 years ago
Updated 6 September 2023, about 1 year ago

Problem/Motivation

More projects will be moved to Drupal 10 moving forward so it would be good if the module could be updated accordingly.

Steps to reproduce

Check the module status using upgrade-status - this shows that the module is not compatible with Drupal 10 yet.

Proposed resolution

Update the module code and yml files to support Drupal 10.

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇳🇱Netherlands roaldnel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to RTBC over 1 year ago
  • 🇳🇱Netherlands Johan den Hollander

    The patch applied correctly. And I still have the option to select the Pickup shipping method.

  • 🇩🇪Germany sleitner

    @Siegrist please get a D10 version released.

  • 🇭🇺Hungary djg_tram

    @sleitner Last year, Siegrist and I worked together on a modified version of the module that changes its functioning in some ways. I have four submodules ( https://www.drupal.org/project/commerce_shipping_pickup_foxpost and others) that build upon this module as a programmer's API, implementing the actual pickup providers. We agreed that, considering the low number of actual users, making breaking changes is probably acceptable at this stage. Basically, this module would no longer be a standalone module (although it does contain a sample) but provides the foundation for submodules to build upon. At least, I hope my recollection is correct, anyway, I still use this modified variant of commerce_shipping_pickup in my projects (I'll copy fragments of the modified README in the next post).

    My submodules are D10-compliant and the main module can be made, too, with very small amount of work, I'll test it in the coming days. Starting from that, I'd suggest to @Siegrist and y'all to use this transition to D10 as a point to make this change. I'm willing to take whatever part is necessary in it, maybe if Siegrist picks it up again from where we left back then, or maybe allowing me the status to upload the new version.

    If Siegrist doesn't happen to react in the near future, I could also upload it somewhere, GitHub or elsewhere, if any of you is interested and willing to experiment with this approach. I also need the functionality going on, so I'm willing to take part in any shape or form to move it forward. :-)

  • 🇭🇺Hungary djg_tram

    From the modified README:

    # Commerce Shipping Pickup

    Provides the framework for shipping methods for pickup services and parcel machines.

    **This module only provides the framework. In order to use actual pickup service operators,
    install at least one dependent pickup service module (usually named _Commerce Shipping Pickup
    Some-Service-Name)_.**

    ## Developing dependent pickup service modules

    The user-friendly way is to create one module per operator,
    and a module can provide more than one actual service. For easy discoverability,
    the suggested name is in the format _Commerce Shipping Pickup Your-Service-Name_
    (with the short, module name `commerce_shipping_pickup_yourservice`). If you have a module
    with multiple services of your country's national postal company, you probably want to name
    the module by country and company. If you have a separate operator with a single specific
    service name, you may want to use that. At any rate, use a name that you know
    the site builders will easily find.

    ### Shipping methods

    You need to inform `Drupal Commerce` about your services by creating a shipping method for each.

    Extend `PickupShipping` with your shipping method. This class provides the same functionality
    as the usual flat rate shipping methods: a rate label, a description and an amount).
    If you need your own configuration or rate calculation logic, override the appropriate functions.

    `PickupShipping` implements `PickupShippingInterface` and has two abstract functions
    that you **must** override (or you get an exception). `buildFormElement()` provides
    the pickup point selection interface to the user and `populateProfile()` gets back
    the necessary information from this interface about the user's selection and stores it
    into the shipping profile in the order. Follow the documentation in the interface
    to understand the connection between the inline form and the storage of the pickup point.

    See the `commerce_shipping_pickup_demo` sub-module for a minimal sample.

  • 🇭🇺Hungary djg_tram

    And the documentation referred to above: basically, we have two different approaches: list and online selector. Providers normally use either or both:

    • they can provide a list of available pickup points, indexed by some identifier. In this case, the user is shown a list to chose from.
    • they can provide an online selector, usually a map, to be embedded mostly as an IFRAME, that the user can use to select a pickup point.

    The module handles both cases and has the documentation to describe them. In addition, existing submodules like the ones I mentioned can be used to follow how this works in real life.

  • 🇭🇺Hungary djg_tram

    No need to upload it, it's already up in a fork -- I completely forgot and without the link in the issue at https://www.drupal.org/project/commerce_shipping_pickup/issues/3246790 I'd probably never find it again. :-)

    Anyway, it has its branch to browse at https://git.drupalcode.org/issue/commerce_shipping_pickup-3246790/-/tree...

  • 🇩🇪Germany sleitner

    Then you should open a 2.x branch with the modified version of the module. This would help everybody to build submodules for it.

  • 🇭🇺Hungary djg_tram

    Yes, that should be the best way forward but we need @Siegrist for this...

  • 🇭🇺Hungary djg_tram

    @sleitner I didn't mean to do it in the first place but maybe a fork under a different name? I really didn't want to make it look like hijacking :-) bt I've already tried to contact Siegrist before without success...

  • 🇭🇺Hungary djg_tram

    @sleitner @Siegrist -- OK, another week has passed. I started a new project at https://www.drupal.org/project/commerce_shipping_pickup_api and started to move my own modules to depend on it. I'd be glad to see new submodules to appear. :-)

Production build 0.71.5 2024