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

Facing issue due to vendor association in orders #12026

Open
pardeep-bluebash opened this issue Apr 23, 2024 · 1 comment
Open

Facing issue due to vendor association in orders #12026

pardeep-bluebash opened this issue Apr 23, 2024 · 1 comment

Comments

@pardeep-bluebash
Copy link

I have setup a new Spree app with Spree multi vendor gem. I have encoutered an issue while accessing the vendor admin panel where it shows only orders for that vendor. I got error like vendor_id is not present in the spree_orders table. I have checked in the multi vendor gem and I have not found any support for vendor_id in the orders table. After debugging I have found that the issue is coming due to the vendor association that has been added in the orders model in spree core here - core/app/models/spree/order.rb.

if defined?(Spree::VendorConcern) include Spree::VendorConcern end

I am not sure why it is added directly in the spree core, there may be a reason I am not aware of but now the issue is happening because the vendor association is now added directly in spree core and multi vendor gem does not have support for it. Even If I add vendor ID to orders table it will still not be feasible because an order can have multiple vendors that's why we have it in line_items and shipments.

May be I have missed something here. So I just want to ask if this is really an issue or am I missing something here?

Would be glad to hear from you guys. Thank you in advance.

@damianlegawiec
Copy link
Member

Hey @pardeep-bluebash

Feel free to submit a PR removing this from Spree::Order model, thanks!

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

No branches or pull requests

2 participants