I need to build an e-store. I am thinking of using spree gem instead of building everything from scratch but I have not used spree before. One of my requirements is to have two kinds of user and app should be able to show and apply prices based on that user. For eg. if a user is a wholesale buyer app should display lower price and if user is normal user it should show different price. Can this be readily done in spree?
Can I have two different kinds of user in spree?
266 Views Asked by roxxypoxxy At
1
There are 1 best solutions below
Related Questions in RUBY-ON-RAILS
- UIWebView Screen Fitting Issue
- ios responsive design not working (too wide in portrait orientation)
- Setting View orientation to portrait is ignored
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?
- How to generate request format for WCF web service method for Mac and iPhone
- Difference between gethostname() and [NSProcessInfo hostName]?
- How to force close ipad/iphone keypad when input element is not focused using JS?
- iOS app rejected because of in-app purchase
Related Questions in E-COMMERCE
- UIWebView Screen Fitting Issue
- ios responsive design not working (too wide in portrait orientation)
- Setting View orientation to portrait is ignored
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?
- How to generate request format for WCF web service method for Mac and iPhone
- Difference between gethostname() and [NSProcessInfo hostName]?
- How to force close ipad/iphone keypad when input element is not focused using JS?
- iOS app rejected because of in-app purchase
Related Questions in SPREE
- UIWebView Screen Fitting Issue
- ios responsive design not working (too wide in portrait orientation)
- Setting View orientation to portrait is ignored
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?
- How to generate request format for WCF web service method for Mac and iPhone
- Difference between gethostname() and [NSProcessInfo hostName]?
- How to force close ipad/iphone keypad when input element is not focused using JS?
- iOS app rejected because of in-app purchase
Related Questions in SPREE-AUTH-DEVISE
- UIWebView Screen Fitting Issue
- ios responsive design not working (too wide in portrait orientation)
- Setting View orientation to portrait is ignored
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?
- How to generate request format for WCF web service method for Mac and iPhone
- Difference between gethostname() and [NSProcessInfo hostName]?
- How to force close ipad/iphone keypad when input element is not focused using JS?
- iOS app rejected because of in-app purchase
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I worked on a project that used Spree and required extensive customization. Spree allows you to customize almost anything, though some customization is harder than others.
Spree does allow you to have multiple types of users quite easily. In fact, it doesn't assume much of anything about your user model. You can use the Devise gem or create your own user model. In either case, let's say you add a boolean called is_wholesale to your user model. Alternatively, you could use Spree's built-in roles functionality (see this link for more information).
The trickier part of your question is how exactly wholesale pricing works. If wholesale buyers get a fixed percentage discount off of retail prices (e.g., 20% off each item), then implementing this feature with Spree is quite easy. Just create a custom promotion (see this guide) with a fixed discount percentage and only make it available to your users with the is_wholesale boolean or correct Spree role. You could also customize the Spree product and category views to show the discounted price to wholesale buyers.
That said, if you want each product to truly have two prices (not just a fixed discount percentage), things get a lot more complicated. My experience (though of course I haven't tried it), is that would require mucking around with a lot of different Spree internals (e.g., the Spree product model, cart items, admin interface) and will lead to a lot of hair-pulling.