ruby on rails - Can I have two different kinds of user in spree? -
i need build e-store. thinking of using spree gem instead of building scratch have not used spree before. 1 of requirements have 2 kinds of user , app should able show , apply prices based on user. eg. if user wholesale buyer app should display lower price , if user normal user should show different price. can readily done in spree?
i worked on project used spree , required extensive customization. spree allows customize anything, though customization harder others.
spree allow have multiple types of users quite easily. in fact, doesn't assume of user model. can use devise gem or create own user model. in either case, let's add boolean called is_wholesale user model. alternatively, use spree's built-in roles functionality (see this link more information).
the trickier part of question how wholesale pricing works. if wholesale buyers fixed percentage discount off of retail prices (e.g., 20% off each item), implementing feature spree quite easy. create custom promotion (see this guide) fixed discount percentage , make available users is_wholesale boolean or correct spree role. customize spree product , category views show discounted price wholesale buyers.
that said, if want each product have 2 prices (not fixed discount percentage), things lot more complicated. experience (though of course haven't tried it), require mucking around lot of different spree internals (e.g., spree product model, cart items, admin interface) , lead lot of hair-pulling.
Comments
Post a Comment