Mystery Gift Box for WooCommerce allows you to sell loot boxes (like in video games) that contain high-value prizes in your WooCommerce shop.
Installation ↑ Back to top
1. Download the mystery-gift-box-for-woocommerce.zip file from your WooCommerce account.
2. Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
3. Install Now and Activate the extension.
More information at: Install and Activate Plugins/Extensions.
Setup and Configuration ↑ Back to top
General Settings ↑ Back to top
- To allow customer to purchase mystery gift box products, go to Mystery Gift Box > Settings > General and select Enable Mystery Gift Box option.
- To allow customer to purchase mystery gift box products along with other products on the same transaction/order, enable Allow Mystery Gift Box Purchase with Other Products option.
- Once the customer completes a mystery box purchase with successful payment, a new WooCommerce order will be generated for processing the gift products. Select the default order status of this order in the Default Order Status of Gift Product Order when Generated option.
- You can hide specific payment methods if the customer has added mystery box product to the cart. The selected payment gateways in Payment Methods to be Hidden for Mystery Gift Box Purchase option will be hidden in checkout page.
Display Settings ↑ Back to top
- In single product page, you can show the price range of the list of gift products which the customer may get on purchasing the mystery box. Select Show in Gift Products Price Range Message option. You can customize this message in Mystery Gift Box > Settings > Messages > Single Product Page Message Customization option.
- To show the list of available gift products in single product page, select Show in List of Gift Products option.
Restrictions ↑ Back to top
- If you want to restrict customers from purchasing the mystery box product, then in Show Mystery Gift Products for option, select the users/user roles to restrict as per your needs.
- To allow Guest users to purchase mystery box products, then enable Allow Guest Users to Purchase Mystery Gift Box Products option.
- By default, customers can purchase a mystery gift box product any number of times. If you want to limit the customer from purchasing a mystery box product, then select Limited in Mystery Box Purchase Per Product Per Customer option and set the limit in Mystery Gift Box Purchase Per Product Limit Per Customer option.
Localization ↑ Back to top
In this section, you can customize all the labels displayed in the frontend.
Messages ↑ Back to top
In this section, you can customize all the messages displayed in the frontend.
Creating a Mystery Gift Box Product ↑ Back to top
- To create a mystery gift box product, go to Products > Add New and set the Product Type as Mystery Gift Box.
- Configure the product details as per your requirement(Price, Inventory, Shipping, etc).
- Then, go to the Mystery Gift Box section.
- In the Product Selection Method option, select the algorithm used for selecting the Gift product. The workflow of each Algorithm is as follows,
Completely Random: In this method, the product(s) will be randomly picked and will be to the customer.
Current Stock: In this method, the product with the highest current stock will be given to the customer. If the stock of a gift product is set as “Unlimited”, then it will be picked up first for giving to the customer.
Priority: In this method, you have to give priority to each gift product that you have set. The product with the highest given priority will be picked up first and given to customers until the stock is reduced to 0. The next product will be picked up only after the current stock of the highest priority given product is reduced to 0.
The lower the number, the higher the priority. For Example: If you have set the priority as “1” for a gift product, it will be picked up first.
Note: In all these methods, if you give more than 1 product as a gift for the customer for purchasing a mystery gift box, then multiple quantities of the same gift product will not be given to the customer(except in a case such that if you are going to give more gift products than the list of available gift products which you have set).
- In the Number of products to be gifted for one mystery box purchase option, set how many products you want to gift the customer for purchasing the mystery box.
- In the List of Gift Products, click Add New button to add a gift product. Search for the product which you want to give as a gift product. You can add any number of gift products.
- Publish the product.
While configuring the inventory, please make sure that the inventory of the Mystery Gift Box Product is always less than the inventory of the Gift products linked to the Mystery Gift Box.
Usage ↑ Back to top
- Once the mystery gift box has been configured, the product will be ready for purchase.
- On the single product page, the list of gift products in the mystery gift box along with the price range will be displayed.
- An email will be sent to the user once the purchase is completed. This email will have information about the gift product which the customer will be receiving.
- The Mystery Gift Box Purchases made by the user will be listed in the “Mystery Box Purchases” section on the My Account page.
- The Mystery Gift Box purchases will be displayed in a table for the admin to process the orders.
Translation ↑ Back to top
Mystery Gift Box for WooCommerce is translation ready, meaning you can edit the po files by which you can translate the text to any language. Steps to perform the translation are as follows. For example, a translation to French.
- Download and install Poedit
- Open the file mystery-gift-box-for-woocommerce > languages > mystery-gift-box-for-woocommerce.pot using Poedit.
- Create a new translation file by clicking Create new translation button.
- Choose the Source text and set its corresponding French text in Translation Text Area.
- Save the changes.
- Save the file name as mystery-gift-box-for-woocommerce-fr_FR.po.
- Then go to WordPress dashboard > Settings > General and select the Site Language as French.