OFFLINE-GmbH / oc-mall-plugin

:convenience_store: E-commerce solution for October CMS
https://offline-gmbh.github.io/oc-mall-plugin
MIT License
169 stars 114 forks source link

Virtual products and variants #600

Closed panakour closed 3 years ago

panakour commented 4 years ago

Is there any reason in which virtual products not support variants?

Lets say a ticket product (an event) that should has various variations depending on the date of the event.

tobias-kuendig commented 4 years ago

If I remember correctly, it was done to keep the implementation small (I guess some virtual product support is better than none?). There is no other technical reason and I feel like it would make sense to add variants to virtual products as well.

tobias-kuendig commented 3 years ago

I'm closing this issue due to inactivity. If you need any further assistance feel free to reply.

If someone wants to implement this feature Pull Requests are always welcome.

chocolata commented 8 months ago

Hi,

I just came across this. In my case the shop is selling memberships. There is one membership with three variants, because there are three types of memberships. The product description remains the same for the three memberships, so I guess it would be logical to do it that way.

I'm not using the virtual file though. Would it suffice to disable shipping and not use the Is virtual flag then and instead just uncheck the "shippable" flag?

chocolata commented 8 months ago

Just investigated further and it seems that disabling the "shippable" flag still applies shipping costs to the order. That shouldn't happen, right?

So both in the cart and in the quickcheckout I see the default shipping method price added to the total. And the shipping method selector is present.

Variants or no variants: the issue seems to persist.

When I go over the code, I see that only the is_virtual flag is used not to unset the shipping method. Is this something we can change?

chocolata commented 8 months ago

Hi, I created a pull request to allow variants even when is_virtual is set to true.

I personally am not using the file download function, so that should be thoroughly tested. Could you kindly consider this?

As an alternative, we might reconsider the is_shippable flag, and have products without this flag not require a shipping method.

What are your thoughts?

chocolata commented 6 months ago

Hi @tobias-kuendig , did you have a chance to review this?

SamBrishes commented 6 months ago

Hello @chocolata, I've some time left today, I'll take over the review.

SamBrishes commented 6 months ago

Pushed to develop

I have made a few more adjustments, mainly targeting the product files when using different variants. However, could successfully test variants on digital products with and without product files attached.

PS.. Product Files can now also be limited to specific variants

image

chocolata commented 6 months ago

Looks fantastic! Thanks Sam!

Could we also review the functionality of the "shippable" flag? My clients are finding it unclear when to select this option, particularly for events or memberships. Despite unchecking the "shippable" option, the checkout process still includes shipping costs. It appears that only the "is_virtual" flag exempts an item from shipping charges, which seems counterintuitive. Could we have a look at this behavior and see if it would be beneficial to change it?

SamBrishes commented 6 months ago

Definitely, I'll have a look at it soon. (Moved to new issue #1115 )

chocolata commented 6 months ago

Much appreciated... Thanks a bunch!