Closed mlocati closed 8 months ago
You are correct in your description.
I've had a similar request in the past, but I explained to the client how it starts to get potentially quite complex when you've got both kinds of product in the same cart. So I think I convince them to handle shipping a different way.
But if you believe you have a neat/generic way to handle this I'd certainly welcome the addition, it only adds to the flexibility.
Yep, I know it's rather complex. But you know, the customer is always right 😉
What about these new options?
Don't apply this shipment method if all the products belong to any of the following groups: ...
Apply this shipment method only if all the products belong to any of the following groups: ...
That makes sense. I would word them:
"Don't offer this shipping method if any product is in any of the following groups" An example might be a very large item, that can't be shipped with express shipping.
"Only offer this shipping method if any product is in any of the following groups" An example might be a 'pickup' option, that is only offered if someone includes in their order a product that can't be shipped
So for 'orders containing products discounted by 50% or 70%, the shipment costs 7€ for any order amount', you would:
So you'd actually need three shipping options
What about orders with mixed products (discounted and not discounted)?
Shipment methods using "Don't offer this shipping method if any product is in any of the following groups" wouldn't be offered.
So, we'd need 4 options:
When the store owners edit the shipping method, I'd add two fields:
Label: Applicability based on product groups
Field: a <select>
element with the 4 options above, plus a default "Don't care" option
Label: Product groups
Field: list of product groups (hidden if the <select>
above is "Don't care")
That would cover everything.
I don't think you need all four options for your client's particular problem, but if you are adding them, it probably makes sense to add the other options anyway.
A pull request is on its way 😉
A pull request is on its way 😉
Here it is: #838
I have this request from a customer of mine:
BUT
Community Store already allows implementing 1. and 2.
But I don't see a way to implement 3. That's correct? If so, I'd submit a pull request that adds these two info to the shipping methods: a. apply this shipping method only for orders that don't contain any product belonging to one or more of the following groups: ... b. apply this shipping method only for orders that contain one or more product belonging to one or more of the following groups: ...