commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Drupal Commerce Provider

Open soft4net opened this issue 2 years ago • 5 comments

@todo

@see: https://www.drupal.org/project/commerce @see: https://www.drupal.org/project/commerce_api

soft4net avatar Nov 27 '21 12:11 soft4net

How to write a commerce provider for drupal ?

Flutter-Stack avatar Jun 25 '22 04:06 Flutter-Stack

Please use links i have posted this is a main source of information. Yet another useful link is: https://www.drupal.org/docs/contributed-modules/commerce-api Hopefully i will dig into this topic soon.

soft4net avatar Jun 27 '22 07:06 soft4net

I am working on it right now.

Display of localized individual product, product attribute, product category / brand (designer) listing, search by title, sort by price, sort by date is already done.

I guess the PR will be made as soon as I complete the Shopping cart and Checkout parts of the Nextjs Commerce drupalcommerce plugin.

drugan avatar Jul 22 '22 08:07 drugan

Great to hear that, thank you! I assume you are aware of project https://next-drupal.org which provides very convenient API to get data from Drupal JSON API endpoints i think this might be helpful: https://next-drupal.org/docs

soft4net avatar Jul 22 '22 09:07 soft4net

The https://next-drupal.org/ is a cool tool but unfortunately it does not provide any Drupal Commerce related API.

It might be used to fetch the Drupal Commerce products or any other entities but again in its core all its methods use the generic javascript fetch() function.

At the same time the Nexts Commerce use the https://www.npmjs.com/package/@vercel/fetch in its core. So we get automatic cache handling, retry fetch and other things out of the box.

Example. Something similar is implemented in the drupalcommerce plugin for JSON:API.

Anyway, I've decided to depend on the https://www.npmjs.com/package/next-drupal in the drupalcommerce plugin.

At the moment just the the getAccessToken() is used but because the plugin is just a basic functionality / display options implementation so the nex-drupal might be used for further Nextjs Commerce drupalcommerce decoupled site customization.

drugan avatar Jul 22 '22 10:07 drugan

Hey there! Thank you for opening this issue. We have decided to take Next.js Commerce in a new direction and will be closing out current PRs and issues due to this change. Please see this PR for more details: https://github.com/vercel/commerce/pull/966

leerob avatar Apr 18 '23 02:04 leerob