-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Feature: Order item unit generation mode #15414
base: 1.13
Are you sure you want to change the base?
Conversation
…ulating taxes and shipment values by order item unit quantity
Bunnyshell Preview Environment deployment failedCheck https://github.com/Sylius/Sylius/actions/runs/6737013256 for details. Available commands:
|
Hi, I've had this case in one of my projects before, company was selling by tons, but price was defined per KG on variants, which lead to massive performance hits with thousands/tens of thousands of I don't have source codes under a hand to refresh my knowledge, but solution was not to use Additionally, I think there were times in sylius history, when So this can be considered as alternative solution. For the current PR, Given that sylius is ecommerce framework first and ecommerce app second, IMO we can/should support this in sylius-framework level, but not actually implement in sylius-app as app tends to be more of B2C specialized and leave wholesale solution up to end-users/some b2b plugin. For example sylius supports multiple partial payments per order, but has never implemented it in sylius-app, so I think this the same case. |
Hi @diimpp, thanks for your point of view. I agree with you - the wholesale belongs mostly to B2B cases, but it's the solution to resolve #10155. My intention is not to prepare Sylius to handle B2B cases, but resolve an issue, which happened when some users used the current mechanism, which doesn't scale. Regarding to non-unit solution, it's not quite easy to do so, as Sylius needs order item units i.e. for shipping cases. There is some cases we can handle on order item level (promotions, taxes). In some Sylius Plus cases like returns management and split shipping it also is based on order item unit. So, long story short, I just want to fix a performance bug only. |
… adding unit to item
A few cents from my end - the I do understand your point of view, many may in fact misrecognize this keyword. Top label synonyms by GPT:
|
Yep.problem with Sylius already exposes
There is a bit of mismatch as Model P.S. As for mentioned alert-box, it can mentioned, that |
Okay, so I think I can go with changing the "Wholesale" keyword everywhere to "Order Item Unit generation mode". I don't want to resolve the issue on order item level (allow to have no order item units in item), as there is next issue to be resolved: shipments, which bases on order item unit level. So there should be at least one order item unit to be consistent with that. But still I've got one issue with promotions and adjustments, which is not covered yet. @diimpp please review my comment 🙏 |
Co-authored-by: Dmitri Perunov <diimpp@gmail.com>
… into feature/wholesale-products
Hi, let's split our concerns into points: Best architecture for high quantity item optimization/approach: "Single OrderItemUnit vs No OrderItemUnits at all"
NamingWe have three points of interest over here,
It's important to note, that feature 1.Our biggest change with this feature is the way adjustments are applied, end-users need to be aware, that the way taxes are applied is no longer true and they won't get individual tax per unit. Single unit/no unit is just a side effect optimization business wise. So I believe this should be named as "Adjustment calculation (application) strategy" with alert box explaining what's this about similar to already existing
Other option is to ground naming in existing features, like 2.For example, promotion doesn't particularly advertise which level it will applied and uses With this feature it should be applied to item instead, no change in end-user naming. 3.It's only about in-code naming, a mode work or Questions
There is no conceptual issue with mismatch between Our options are
ResumeThis feature needs to be designed from adjustment application POV, where It needs to be tested with Invoice/Refund plugin, it needs to explicitly specify what we're loosing with item based tax application and specification should come from government rules on commerce calculus, which to my knowledge can be different per region. I hope it helps and adds some perspective 🙂 Footnotes |
Hi @diimpp, I agree with you. It should be done in another way, including redesigning the architecture etc. But there is a performance issue. which is unresolved from 4 years and blocks people from using the application in some cases. Changing it on they own in the right way you mentioned is an expensive cost, which would be "paid" by every client who have the case. And you're right. The PR is just a workaround to resolve one of the weakest link: performance issue from #10155 where people use bigger quantities in cart/checkout. Some pros from my side:
|
I forgot to add translations in admin panel 🤦♂️ I've added this with last commit. I think the PR is ready from my side to be merged, if you agree with the concept. |
Hello, what's the status of this PR ? |
Hi all! :) I'm preparing a new functionality, which will resolve an issue with attaching order item (unit) promotions into carts, when having a lot of quantity there. This is currently a VERY EARLY version of the feature, but I appreciate your comments on that.
The main idea is to introduce wholesale variant checkbox, which will result only one order item unit for that variant, independently from the quantity.
I hope you like it as I am! 🖖