Code

Snake Sales Booster

Snake Sales Booster

Description

With Snake Sales Booster, you can seat back and watch your sales rise sky-high!
Snake Sales Booster allows you to create pop-up windows on your WordPress site. The pop-up will contain the Snake Game with rules and discount pop-up. More points user scores – more discount your product will have. You can choose the exact amount of discount, as well as color and text for pop-up enabling you to attract the users, attention.
It is easy to use, and customizable through the admin panel. The discount amount that you specify in settings will be the maximum discount for user – this amount user receives when get maximum points (15) and win the game. For a user who scored points less, the discount will be proportionally less.

Default settings

Pop-up On/Off – on
Show after mouse leaves the window – enabled
Show on adding to shopping cart – enabled
Redirect Link – switched off
Pop-up Delay – 3 minutes
Discount Lifetime – 2 minutes
Show pop-up for user next time, days – 7 days
Title to play game – Do you want to win a discount? Play a Snake game!
Button “Disagree” – NO
Button “Agree” – YES
Rules – Rules of the game
1st Rule – Use the up, down, right and left buttons to control the snake
2nd Rule – Don`t run the snake into its own tail: you will die
3rd Rule – You can run through the walls
Button “Play” – Play
Title “Congratulations” – CONGRATULATIONS! You won:
Discount, % – 10
Description – Offer will be applied automatically to your cart
Button “Order” – Order now
Pop-up color – Red

Installation

1. You can move the `Snake Sales Booster.zip` archive file to the directory` / wp-content / plugins / `
2. Upload archive file to the menu in WordPress.
3. Activate the plugin through the ‘Snake Sales Booster’ menu in WordPress.
OR
1.You can move the ‘Snake Sales Booster’ folder to the directory `/ wp-content / plugins / `
2.Activate the plugin through the ‘Snake Sales Booster’ menu in WordPress.

Frequently Asked Questions

Q: How to enable our pop-up?
A: It is enabled by default. To check it, go to the WordPress menu, navigate to the Snake Sales Booster tab. Find ‘Pop-up On/Off’ field and click on checkbox.

Q: How to reset to default settings?
A: In Snake Sales Booster settings click on button ‘Reset to default settings’. Afterwards, click ‘Save changes’ if you wish to apply the changes.

Q: How to customize the pop-up?
A: In the input fields, you can add your own values. After that, click on the ‘Save changes’ button.

Q: How does the ‘Show after mouse leaves the window’ option work?
A: If enabled, when the user’s cursor leaves the window, a pop-up will appear. This feature can be enabled/disabled through the settings panel.

Q: How does the ‘Show after mouse leaves the window’ and ‘Show on adding to shopping cart’ functions work together?
A: If both of these options are enabled, only one pop-up will appear that of the action, which was triggered first. For instance, if the user adds an item to cart and then moves the cursor away from the window, only the ‘Show on adding to shopping cart’ will be triggered.

Q: How can I customize Snake Sales Booster?
A: All classes are made using universal style prefix ‘snake_sales_booster’. With it, developer can change the structure of styles to suit your needs. All constants, fields and their values are stored in a variable called SnakeSalesBooster. Name of Javascript object – ‘admin_settings’. It contains all the data of Javascript code.

Q: When user will get the discount?
A: When user finished a game, he will see a pop-up with a discount amount he won. Then this discount will be added automatically to his shopping cart.

Q: How is the discount calculated?
A: The discount is calculated depending on the maximum value you specify for it and how many points user scored in the game. For example, if you set a 10% discount, then when user scores 15 points, he will receive a 10% discount, if you score 10 points – 7% and so on. Discount is rounded to a higher value. This was made to avoid fractional numbers, because it isnТt look right, so we decided to round them. For example, if user scores 8 points, he will receive 5,3% discount, but actually discount will be 6% off.

Q: Does the discount applies to all products in a cart or to the only one?
A: The discount applies to all products in the user`s cart.

by
by
by
by
by
by