Test Mode

Written by: Indresh Maurya
Date: 09-12-2021
Compatibility: Sellacious v2.0.0-Beta1+

Index
Introduction
Test Mode Permission
Test Mode Payment Methods
Test Mode Configurations
Test Mode Configurations for User
Test Mode Switch Module
Testing Sellacious
Testing In Admin/Seller View
Test Mode Emails
Restoring Test Order Stock

Introduction:

Test mode is a feature of sellacious in which we can test orders, emails and transaction without bringing a live site down. We can enable test mode for a user and can check the flow without disturbing the live site.

Test Mode Permission

In sellacious we can allow test mode used by two ways. Either we can allow test mode usage to a particular user group or we can allow it to a particular user only.

Allow test mode usage to a User Group: If we want to allow test mode usage to a user group this can be done same as we give any permission to user group.
To do so go to Settings->Permissions sellacious backend and select the particular user group from User Category dropdown and global in Component dropdown.
Screenshot%202021-12-09%20at%202.46.51%20PM
Now scroll down and enable Allow Test mode usage
Screenshot%202021-12-09%20at%202.47.44%20PM

Now test mode will be allowed to all the users in this category and they can use it in backend/fronted testing of sellacious which is described later in this chapter.

Allow test mode usage to a User : If we want to allow test mode usage to a particular user this can be done in their profile. A user who has permission to Edit Profile and Change Test mode permissions for others permission they can enable test mode usage in any user profile in user's profile edit View.

So if admin givesEdit Profile and Change Test mode permissions for others permission to a staff category
Screenshot%202021-12-09%20at%203.06.42%20PM
staff user in that staff category can enable test mode in any user's profile.
Screenshot%202021-12-09%20at%203.05.55%20PM
Note: If test mode is allowed in any category (by first method) staff can't enable or disable test mode usage for a user in that category and message will show that test mode is enabled for this user from global.
Screenshot%202021-12-09%20at%203.17.45%20PM

Test Mode Payment Methods:

In Sellacious a payment method can be in two mode, live and sandbox mode (test mode). This can be checked in list view of payment methods.
Screenshot%202021-12-09%20at%203.37.22%20PM
Also no. of payment method in sandbox mode can be seen in toolbar on all the pages
Screenshot%202021-12-09%20at%203.38.33%20PM
Note: Sand box payment method will be used in test mode of sellacious, for example if you are testing checkout in test mode only sand box payment methods will be available in payment step of checkout. So if you are testing sellacious there must be at least one sandbox payment method available. To know more about payment method refer to https://www.sellacious.com/documentation-v2#/learn/payment-methods

Test Mode Configurations:

Admin can provide test mode email and cron url to reset test mode order stock from Test mode tab under global configuration.
If admin email is provided here all the email of admin context will be delivered here when sellacious is being used in test mode.
NOTE: If email is not provided there will be no email for admin context in test mode.
Screenshot%202021-12-11%20at%2012.22.27%20PM

Test Mode Configurations for User:

A user who is allowed to use test mode will also have to configure test mode emails from backend/frontend profile edit.
There are two email fields provided for email on seller and client context.
Screenshot%202021-12-11%20at%2012.29.28%20PM
Screenshot%202021-12-11%20at%2012.31.12%20PM
If emails are provided here all the emails in seller and client context will be delivered on these addresses sellacious is being used in test mode.
NOTE: If email is not provided there will be no email for these context in test mode.

Test Mode Switch Module:

In frontend there is test mode/live mode switch is provided in sellacious toolbar module but if someone doesn't want to use sellacious toolbar module in the site, Test Mode Switch Module can be used in this case which shows just a switch for test/live mode.

Screenshot%202021-12-11%20at%2012.47.41%20PM

Testing Sellacious:

Testing Frontend Orders:
If test mode is enabled, user can test orders in frontend.

  1. First thing to do is enable test mode from test mode switch in toolbar or in test mode switch module.
    Screenshot%202021-12-11%20at%2012.47.41%20PM
  2. Now anything you will do in website will be recorded in test mode.
  3. Add product in cart and checkout. In summery step you will get option whether to deduct stock for this order or not.
    if you don't want to deduct stock for the item for this test order disable the button but if you want to test stock deduct also don't worry you can restore the stock of a test order later. We will talk about that feature later in this chapter.
    Screenshot%202021-12-11%20at%203.48.57%20PM
  4. Payment step in test mode will show only payment method which are on test mode/sandbox mode so make sure you at least have one payment method in sandbox mode.
    Screenshot%202021-12-11%20at%203.49.53%20PMScreenshot%202021-12-11%20at%203.50.17%20PM
  5. Once the order is placed you can see the order in my orders view when test mode is enabled.
    Screenshot%202021-12-11%20at%204.00.26%20PM

NOTE: To a buyer, anything related to test order like transaction, order, return exchange, downloads etc will be shown only when test mode is enabled. If test mode is disabled Live data will be shown in frontend.

Testing In Admin/Seller View:

A global switch is provided in sellacious backend which will be shown to admin or users who have permission to use test mode.
Screenshot%202021-12-11%20at%204.04.03%20PM
After switching to test mode, test data generated by test order like dashboard stats, orders, return and exchange request, delivery orders, reports, and communication logs will show in backend.
Screenshot%202021-12-11%20at%204.07.58%20PM
Here you can test processing of order, emails and other functions of sellacious without changing any live data.

Test Mode Emails:

As described earlier all the emails triggered during this testing will go to the emails provided in users test mode emals fields.
These emails and attachment along with these emails will be labelled as Test Mode for every contest of email. Also the subject of the email will indicating Test Order
Screenshot%202021-12-13%20at%209.39.10%20AM
Screenshot%202021-12-11%20at%204.17.21%20PM

Restoring Test Order Stock:

Stock deducted in test mode can be restored by three methods
1. From Backend orders view:
In orders view of backend, Restore stock button is provided. Clicking on it will restore stock of all the items in this order.
Screenshot%202021-12-11%20at%204.54.36%20PM
2. From Backend order Edit view:
Backend order Edit view, stock of individual items can be restored by selecting the items and clicking on restore stock button.
Screenshot%202021-12-11%20at%204.57.22%20PM
3. By using CRON Call:
If you want to restore stock of all the test orders by once it can be done by using cron call. Cron url can be created in Global Configuration-> Test Mode.
Screenshot%202021-12-11%20at%205.03.45%20PM
Enter the key and seve. If your website is https://xyz.com and key is 12345 then the cron url will be https://xyz.com/index.php?restore_stock_test_order_key=12345
run this url and all the test order stock will be restored.

Screenshot%202021-12-11%20at%205.05.58%20PM