[Technical] How to use vendor from Order entity
#4302
lucasferraro
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With the implementation of Business Account we've created the entity
BusinessRestaurantGroupwhich holds all the restaurants that are included in the Platform Catering agreement. The idea withBusinessRestaurantGroupis that it has all the setup/configuration for all the restaurants to be applied for each order (fulfillment, delivery fees, etc.)With that in mind then we changed the
getVendormethod inOrderentity so that in case of a Business Account order we return theBusinessRestaurantGroupassociated and with it, we could calculate delivery fees for example.But then, we realized that
getVendormethod is also used to show information about the vendor of the Order like the name, the address, or even the ID to build the path to the vendor page. But for Business Account we face a problem because for configuration/setup information we want theBusinessRestaurantGroupdata, but for name, ID, address, etc we want to have them from the Restaurant where the user/employee has made the order.With that in mind, I've created this PR where now we can use a new method
getSetupVendorto get the data related to setup/configuration and the existinggetVendormethod will keep its original implementation and should return the "real" vendor information, i.e. for Business Account it will return the restaurant.Beta Was this translation helpful? Give feedback.
All reactions