Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Digital Products to Craft Commerce as Product Type #65

Open
aloco opened this issue Jun 2, 2021 · 1 comment
Open

Integrate Digital Products to Craft Commerce as Product Type #65

aloco opened this issue Jun 2, 2021 · 1 comment

Comments

@aloco
Copy link
Contributor

aloco commented Jun 2, 2021

Description

Hi we are using Digital Products along with Products from Craft Commerce. We don´t really distinguish between Commerce Products and Digital Products, they share almost the same fields and are shown mixed together in search results, product slider and so on.

We often run into the situation where we need two relation fields on an entry like a shop over view page -> one for Digital Products and one for Commerce Products. Therefore it is difficult for an editor if the editor wants to create a List of Products in a specific order, mixed with Digital Products and Commerce Products. We are using Matrix or Supertable Fields as kind of "wrapper" to overcome this.

It is also difficult to query for both Product Types, we often end up in doing something like this

use craft\commerce\elements\Product;
use craft\digitalproducts\elements\Product as DigitalProduct;

$products = Product::find()->all();
$digitalProducts = DigitalProduct::find()->all();
$mergedProducts = array_merge($products, $digitalProducts);

I think it would be very awesome if those Digital Products are somehow integrated into Craft Commerce native so they can be used side by side in an easier way. I understand that Digital Products might be out of scope of Commerce Core, but since both are Purchasables there might be better ways in querying them side by side than in my example. It would also help if we could pick Digital Products and Commerce Products within one custom field like different Product Types in Commerce. What is your opinion on this?

@MattWilcox
Copy link

Same issue, we can't really do a simple "recent products" or "search products" in Twig with these separated out as they are. Unless I'm missing some strategy that will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants