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?
289 views Asked by roxxypoxxy At
1
There are 1 answers
Related Questions in RUBY-ON-RAILS
- How to display legend box in tooltip text for amCharts 5 in Rails application?
- how to integrate cashfree payment gateway in ruby on rails project
- RSpec Capybara throwing Selenium error when trying to click a button with browser confirm
- rails minitest not picking up fixture properly, instance variable not percolating
- Duplicate GET requests - Rails & Heroku
- How to stub out current_user in JWT model for Rspec?
- NameError in Home#index
- Verifying Google Identity OAuth2 token with Ruby
- Error WebMock::NetConnectNotAllowedError in testing with stub using minitest in rails (using Faraday)
- why is mission_control-jobs erroring with load path error?
- Rescuing validation errors from a polymorphic association
- New error on random number assigned to local variable , Rails
- How to fix error in model with gem lockbox
- Images uploaded via Active Storage not displaying in Active Admin or on certain devices
- controller test_methods generating two errors intermittently
Related Questions in E-COMMERCE
- Issue with Quantity Increment in Django E-commerce Cart
- Cloudinary image issues in react/django project
- How to update orders customer in real-time in laravel?
- How to retrieve product/order return information via PrestaShop 8 API?
- Choosing Backend for Multilingual E-commerce with Nuxt 3, MongoDB, GraphQL
- Discount on optional products or product bundles in odoo v17
- Is a CDN service worth it for storing images or can I use the MongoDb and my server to serve them?
- Square payment gateway in e-commerce site
- cart icon on top bar not showing added products in my WordPress site
- How can an AI agent make a purchase?
- Error in node module while extending theme msdyn365
- Storefront api not showing changes on checkout page, want to remove auto apply of store credit on my bigcommerce store
- how to create ACL for microservice
- SAP B1 WOOCOMMERCE Plugin
- Website Technical Issue - Traling Slash Issue - Page Speed
Related Questions in SPREE
- Unable to Authenticate User in a custom controller using Spree / spree_auth_devise Gem - API only
- How to fix the issue where the variant is not finding the product while normalizing cart in framework/spree of V1?
- IIS reverse proxy using ARR returning 502.3 Bad Gateway - Operation Timed Out for some requests
- I have to implement Doorkeeper in a spree based application to generate client Id and client secret key from admin panel
- Rails Url_For Wrong Link Being Used
- IIS 10 Bad Request - Invalid URL code 400
- NoMethodError in Spree::Api::V2::Storefront::CheckoutController#complete how to solve this in spree 4.6 storefront api
- I want to override the api method for /spree_oauth/token in spree 4.4
- Sidekiq worker is giving error "no implicit conversion of Symbol into Integer excluded from capture: DSN not set"
- ActiveStorage with Apartment gem only checks public schema to load files instead of tenant schema
- Uncaught ReferenceError: Spree is not defined
- Nextjs routing without prefixes Spree Commerce
- Spree Can't add new preference with rails 7 app from a gem
- How to get the content of the string being replaced with deface library, before the replacement
- Rails app didn't start - uninitialized constant Rails::Command::Actions::APP_PATH (NameError)
Related Questions in SPREE-AUTH-DEVISE
- Unable to Authenticate User in a custom controller using Spree / spree_auth_devise Gem - API only
- I have to implement Doorkeeper in a spree based application to generate client Id and client secret key from admin panel
- undefined local variable or method `permitted_task_attributes’ for #<Api::V1::TasksController
- How can I extend my controller from installed Spree gem's controller?
- Error Updating Spree User Custom Attributes
- Why is Spree not rendering my changed template?
- Problem: spree shows basic auth, users accounts is not worked
- How can I make login and sign up function using Spree API?
- How to get Token with spree API v2 SDK
- Receive CanCan::AccessDenied error after modifying source code
- Running rails g spree:auth:install abort with "... wrong number of arguments (given 3, expected 2)"
- Adding Image In The Spree Sign Up Form
- The asset ' ' is not present in the asset pipeline
- Spree Forgot password
- Spree Auth Devise Redirection Trying to Access /admin
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?
Popular Tags
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)
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.