Saas application using spree commerce and ruby on rails

Post by
Damini Patel

spree

Project summary

Store Owner can register through the web and create his own store to sell the products he/she has. he/she can select the theme from a variety of predefined themes.

Storify Supports Multi-Tenant, shop wise different tenant (domain), Support Multiple Themes Store wise, the store owner can change the theme of the store, the store owner can add products to his store and sell it on his store online. a product might have different variant sizes, colors, etc.

Store manager can manage his

  • customers 

  • orders

  • products 

  • shipping options

  • payment gateways [ predefined ]

  • tax rates

  • stock transfer

  • stock location

  • store credit

  • permission roles 

  • Analysis (Finance, product, Trending Search, User in graph)

It’s a complete package for the store manager.

Each store owner will be able to host his store/web store to sell products.

we will be assigning different roles to the users like

Roles:

SuperAdmin

  • Role with this permission can do everything
  • Manage the access and level of responsibility of all users on sites
  • Manage site features including access to themes and privacy settings
  • Create new users, new role and new store also assigning Role to User
  • Managing  Roles Permissions
  • Edit product, a user without being added as a user
  • Reset passwords and change users’ profile details

Customers

  • Customers who show the product also purchases the product
  • They return the product
  • Show their order
  • Also, edit their details

Guest Users

  • Customers who show the product also purchases the product
  • They return the product
  • Show their order

Admin side:

     

 

Store frontend side

Problem

For Multitanent(Domain) can't get a solution that how it is working and created using store login and how  to manage products, users, orders, permission roles, theme store wise And change logo, some section of the theme by admin side don't know theme change by admin and how to work that Need to setup separate payment integration for each store

Solution

  • For Multitanent(Domain) we have used "apartment" gem and using that we create multiple stores and manage all work store wise.
  • we change theme store wise using that gem
  • manage the role of that store while creating a store
  • Setup separate payment integration with PayTM for each store (Give URL to blog of our PayTM integration)

 

 def create_apartment
     Apartment::Tenant.create(@store_login.sub_domain)
end

def create_spree_user
    @store_login.encrypted_password = @store_login.decode_password
    Apartment::Tenant.switch(@store_login.sub_domain) do
        user = Spree::User.create!( email: @store_login.email,

                                                    password: @store_login.encrypted_password,

                                                    sub_domain: @store_login.sub_domain, 

                                                    theme: @store_login.theme)
        post_processing(user)
    end
end

Published
Jan 11, 2020
Damini Patel
Jr. Ror Developer

CONTACT US

We are open for new challenges and we help you reach your goals!