New version of the module

Created on 11 January 2024, 11 months ago

Hello everyone!

I hope you're all doing well. I wanted to share some exciting news about an ongoing fix I'm currently working on - a comprehensive overhaul of the Shopify E-commerce module. This fix involves a few important aspects:

Refactoring and adhering to coding standards: I'm addressing issues such as Phpstan and Drupal coding standards, including implementing dependency injection, and ensuring the codebase is clean and maintainable.

Integration with Shopify PHP SDK: I'm working on connecting the API callbacks with the official Shopify PHP SDK (Rest & Storefront) to enhance the module's functionality and improve overall performance.

This overhaul not only addresses the blocking issues for the Drupal 10 upgrade of the module but also aims to enhance the overall experience with the module.

In order to ensure a seamless transition and successful implementation, I would greatly appreciate your guidance on the best approach to commit these changes to the repository. We can discuss whether it should be committed as a development version or as a new version of the module. Additionally, I'm eager to get in touch with the current maintainers of the module to discuss these changes and seek their help in creating the new version of the codebase. By doing so, we can contribute this valuable functionality back to the Drupal and Shopify communities.

I'm looking forward to collaborating with all of you on this project. Your insights and expertise will be crucial in making this overhaul a success.

Thank you for your support and I'm excited to work together on this!

🌱 Plan
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Remco Hoeneveld

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

Merge Requests

Comments & Activities

  • Issue created by @Remco Hoeneveld
  • πŸ‡§πŸ‡·Brazil dungahk BalneΓ‘rio CamboriΓΊ

    Hi Remco,

    Thank you for raising this. I believe https://www.drupal.org/u/matroskeen β†’ has started this work as part of https://www.drupal.org/project/shopify/issues/3374457 πŸ“Œ Create a new class Shopify with getClient() method Fixed

    I'm not sure how far is he in the implementation, but he created the 2.0.x branch with his changes.

    Can you try contacting him directly? Either via https://www.drupal.org/user/3426249/contact β†’ or Drupal Slack.

  • πŸ‡ΊπŸ‡¦Ukraine Matroskeen πŸ‡ΊπŸ‡¦ Ukraine, Lutsk

    Hi Remco,

    You're very welcome to collaborate and submit your code suggestions to dedicated issues. Feel free to use 2.0.x branch, that I created but haven't had time to make something real.

    Unfortunately, I'm not available to actively collaborate and review the code, since I'm in the army now.
    You can try involving other community members to review the code. If you add some automated tests to cover new changes, that would be even better.

    Let me know if you need anything else to start working.
    Thanks!

  • πŸ‡³πŸ‡±Netherlands Remco Hoeneveld

    Thank you for the response guys! Appreciate it, will make a MR / PR this weekend with the changes needed. Ill also look into automated tests.

    With friendly greetings

    Remco

  • Pipeline finished with Failed
    10 months ago
    #79994
  • Pipeline finished with Failed
    9 months ago
    #105592
  • First commit to issue fork.
  • Pipeline finished with Failed
    9 months ago
    #105593
  • Merge request !36Draft: Resolve #3414025 "D10 updates" β†’ (Open) created by ccjjmartin
  • Pipeline finished with Failed
    9 months ago
    #105599
  • Pipeline finished with Failed
    9 months ago
    #105600
  • πŸ‡ΊπŸ‡ΈUnited States ccjjmartin Austin, TX

    ccjjmartin β†’ changed the visibility of the branch 3414025-d10-updates to hidden.

  • πŸ‡ΊπŸ‡ΈUnited States ccjjmartin Austin, TX

    ccjjmartin β†’ changed the visibility of the branch 3414025-d10-updates to active.

  • Pipeline finished with Failed
    9 months ago
    #105647
  • Pipeline finished with Failed
    9 months ago
    #105648
  • πŸ‡ΊπŸ‡ΈUnited States rondog469

    @ccjjmartin I think we're trying to move away from "donutdan4114/shopify" in favor of Shopify's official API.

  • πŸ‡¨πŸ‡¦Canada Noregrebt

    Really happy to hear that you are picking up this project! I have a site still on Drupal 9 since this is a blocker to upgrade. Is this something we can expect in the near future or will this be several months away still?

  • πŸ‡³πŸ‡±Netherlands Remco Hoeneveld

    You can expect this in the near future! Will be working to get this up and running in the summer.

  • πŸ‡¬πŸ‡§United Kingdom smaz England, UK

    @noregrebt & anyone else not able to update to D10:

    After initially installing the module with composer in D9, I:
    * moved the module to the /web/modules/custom folder
    * applied this MR as a patch https://git.drupalcode.org/project/shopify/-/merge_requests/33/diffs - you can download it as a patch from the 'code' dropdown button top right
    * removed the module from composer
    * added the module to my git repository

    This allowed me to update to D10 & it's been about 8 months, have had no issues.

  • An installation method with Composer as an alternative to the method described in #15

    Step 1:

    composer require mglaman/composer-drupal-lenient
    

    Step 2:

    composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/shopify"]'
    

    Step 3: past patch( currently MR36) in composer.json

    "drupal/shopify":{
                    "New version of the module-issues-3414025":"https://git.drupalcode.org/project/shopify/-/merge_requests/36.patch"
                }
    

    Step 4:

    composer require 'drupal/shopify:2.0.x-dev@dev'
    
  • MR!36 tested with Drupal 10.3

    Error:

    Error: Call to a member function getResources() on null in Drupal\shopify\Form\ShopifyWebhooksAdminForm->buildForm() (line 38 of /var/www/html/d103test/web/modules/contrib/shopify/src/Form/ShopifyWebhooksAdminForm.php).
    
    #0 [internal function]: Drupal\shopify\Form\ShopifyWebhooksAdminForm->buildForm()
    #1 /var/www/html/d103test/web/core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array()
    #2 /var/www/html/d103test/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->retrieveForm()
    #3 /var/www/html/d103test/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #4 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #5 /var/www/html/d103test/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #6 /var/www/html/d103test/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #7 /var/www/html/d103test/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #8 /var/www/html/d103test/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #9 /var/www/html/d103test/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #10 /var/www/html/d103test/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #11 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
    #12 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #13 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #14 /var/www/html/d103test/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #15 /var/www/html/d103test/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #16 /var/www/html/d103test/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #17 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #18 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #19 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #20 /var/www/html/d103test/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #21 /var/www/html/d103test/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #22 /var/www/html/d103test/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #23 {main}
    
  • Hello, thanks so much for all of your work on this.

    I was able to successfully install the module on a D10 site following the steps in #16.

    However, I'm seeing an error that the namespaced class Shopify\PrivateApp can't be located. I believe this is because that comes from donutdan's library and not the official Shopify API package that replaces it in this patch: https://git.drupalcode.org/project/shopify/-/merge_requests/36.patch

    Are there any updates I'm missing that make the module compatible with the new API library or is it still in progress?

    Thanks!

  • Hello! Would just like to confirm if this is covering the Deprecation of Checkout APIs from Shopify? One of our projects was using the Shopify eCommerce v8.x-1.x and we are updating this to the latest 2.0 version to test the changes and in preparation for the deprecation of the said APIs. I saw that the latest patch mentioned here contains changes for creating a new class Shopify with getClient() method. Just want to confirm if these changes or what we are aiming here adheres to the changes needed to move to the Storefront API? Thanks!

    Tried the steps from #15 🌱 New version of the module Active and this is working on our end, we were able to install the latest version with changes from MR36 patch. Thanks for the update on this issue, appreciate it!

Production build 0.71.5 2024