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

Update docs #6

Draft
wants to merge 2 commits into
base: 0.2
Choose a base branch
from
Draft

Update docs #6

wants to merge 2 commits into from

Conversation

vvasiloi
Copy link
Contributor

@vvasiloi vvasiloi commented Mar 12, 2021

TODO:

  • example of one-to-many relationship between Product and Supplier
  • example of supplier pricing

Also there are no tests for supplier pricing.

@mbabker
Copy link
Member

mbabker commented Mar 15, 2021

I've never come back around to it since the client I'm using this plugin with has a single currency store, but #4 (comment) has the gist of the implementation for all the supplier pricing stuff (including the stubs for things that really should be included here). Basically, there's a form extension and a form type missing to just make the pricing portion of the plugin somewhat work.

What we originally spec'ed out for the Sylius build we started this plugin for didn't quite pan out for the client, so we never got to a point where the pricing portion of the plugin was actually implemented. That part of the code could probably be dumped completely at this point in favor of the native channel pricing data structure until a proper plan is laid out.

@vvasiloi
Copy link
Contributor Author

In the project I use the plugin I actually use only the supplier pricing and ignore the association between the product and the supplier.
I use it alongside the channel pricing to manage the product variant cost and calculate the profit.
Since the BabDev\SyliusSupplierPlugin\Model\SupplierPricing already has an association with both the supplier and the product variant, the association between the product and the supplier became redundant in my case.
I'm not sure if this is a common use case though.

@mbabker
Copy link
Member

mbabker commented Mar 16, 2021

Glad someone found a use for the pricing part of this 😄

Truthfully, I don't think there is a "right" or even "common" use case for what the plugin is doing right now. We're basically using the supplier field on products as a way for the client to keep track of which items are provided by which of their partners and then the contact on those suppliers receives an email notification for each order since this is an internal store for the company and their partners to handle orders for internal marketing items.

I don't have the notes anymore for what the plugin was going to be if we reached "feature complete", but my vague memory suggests that the data model should be pretty complete for what we were going to do, and then obviously with the code in the state it's in now the product<->supplier relation is pretty much enabled on install but the supplier-pricing<->product-variant relation needs some effort, but there aren't really any integrations beyond the admin suppliers section or the form extensions so the rest of it is pretty much up to the plugin consumer's decisions on how to use.

@mbabker
Copy link
Member

mbabker commented Mar 16, 2021

(Also if you're doing a frontend integration, I'd say https://github.com/odiseoteam/SyliusVendorPlugin is probably a better starting point, but for something that's more of an admin integration this plugin is probably good enough to get folks going; like I said before we haven't done anything more with the Sylius build we created this plugin for so I never really made it a priority to properly "finish" it or add more functionality just because our business use case hasn't demanded it, and this is legitimately the only OSS resource I have that is 100% a business requirement that I don't personally use in my own work or other projects)

@vvasiloi
Copy link
Contributor Author

I asked for feedback from plugin users in Sylius Slack, let's hope someone responds.
In the meantime, I will put up a simple use case for the supplier pricing.
I'm pretty sure that if the supplier pricing is used, the product <-> supplier relationship becomes redundant in most (if not all) cases.

@vvasiloi
Copy link
Contributor Author

No feedback from others. No idea how to move it forward. 😅

@mbabker mbabker changed the base branch from master to 0.1 November 21, 2023 20:31
@mbabker mbabker changed the base branch from 0.1 to 0.2 November 21, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants