Description
DealCraft runs a wheel, scratch card or mystery box on your shop. You choose the chance to win and the budget; the game stops handing out prizes when the budget is spent. This plugin connects it to your checkout:
- A winning code typed into the normal coupon field is checked with DealCraft and applied: a percentage, a fixed amount, a free product, or free delivery.
- The code is checked again when the order is placed, so a code spent a moment ago is refused before the payment is taken.
- When the order is paid the code is marked used. When the order is cancelled, refunded or fails, the code is given back to the customer.
- Optionally, the game pop-up is added to every page from your public key.
No coupons are created in WooCommerce. Your own coupons keep working exactly as before.
Prizes
- Percent off and amount off apply to the whole cart.
- Free item: set the prize’s “Your product code” in DealCraft to the product’s SKU in WooCommerce. One unit of that product becomes free.
- Free delivery: create a custom prize and set its product code to
free_shipping. - Any other custom prize is handed over by you from the DealCraft dashboard; the coupon field tells the customer to contact the shop.
Amounts are read in the shop’s currency with two decimals.
External services
This plugin connects your shop to DealCraft (https://dealcraft.io), a hosted service that runs the games and keeps the reward codes. It does nothing until you paste your DealCraft keys into WooCommerce Settings DealCraft.
- Checking and spending codes. When a customer enters a code in the coupon field, places an order, or an order is paid, cancelled, refunded or fails, the plugin sends the code, the order value and an order reference (wc–
) from your server to the DealCraft API, authenticated with your secret key. The settings page also makes one request to confirm the key works. No customer name, email, address or payment data is sent. - The game pop-up. When a public key is set, each page of your shop loads the DealCraft script (https://dealcraft.io/w.js) in the visitor’s browser. The script shows the game and talks to DealCraft directly to decide and record the result, including device signals used to stop the same visitor winning repeatedly.
DealCraft terms of service: https://dealcraft.io/en/terms DealCraft privacy policy: https://dealcraft.io/en/privacy
Installation
- Plugins Add New, search for “DealCraft”, then Install and Activate.
- Create a free account at https://dealcraft.io and build a game. Dashboard Integrations Create key. Copy the secret key (sk_live_…) and the public key (pk_live_…).
- WooCommerce Settings DealCraft. Paste both keys and save. The page says whether the key works.
- Open any page of your shop with ?deal_preview=1 at the end of the address to see the game at once.
Use a test key (sk_test_…) first: codes are checked for real but never spent, and every order gets a note saying what would have happened.
FAQ
-
I take cash on delivery. When is the code spent?
-
Choose “Completed” under “Mark a code used when the order is”. The code is then spent only when you complete the order.
-
I already pasted the DealCraft script into my theme.
-
Leave it, or remove it and use the public key field instead. The script runs once either way.
-
My speed plugin delays scripts.
-
WP Rocket, LiteSpeed Cache and Autoptimize are told to leave the DealCraft script alone. For any other optimiser, exclude
/w.jsfrom combining, deferring and delaying. -
What if DealCraft cannot be reached?
-
A code that cannot be checked is refused; a cart is never discounted on a guess. Marking a paid order’s code as used is retried every five minutes, up to six times, and noted on the order.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“DealCraft” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “DealCraft” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.4.5
- A prize claimed with an empty cart is kept and taken off with the first item.
0.4.4
- Russian translation (ru_RU).
- The pop-up is 480px wide by default, the card at its full width.
0.4.3
- Translations load on init. WordPress.org builds take theirs from translate.wordpress.org.
0.4.2
- Listed on WordPress.org as “DealCraft”. Tested with WordPress 7.1 and WooCommerce 11.2.
0.4.1
- Spanish translation. Every Spanish-speaking WordPress site (es_ES, es_MX, es_AR and the rest) shows the plugin in Spanish.
0.4.0
- One tap from a win to the cart. The game shows “Claim my prize”: the product the shopper was looking at goes in the cart, the code is applied by itself (a free item is added with it) and the cart opens. Nobody copies or types a code.
- A prize with a minimum purchase the cart does not reach yet is saved, not refused, and applied by itself once the cart reaches it.
- A cart that falls below a prize’s minimum later (the camera taken out, the free gift left) no longer shows “coupon is invalid – removed”: the code is kept, the free unit leaves the cart instead of staying at full price, and both come back when the cart reaches the minimum again.
0.3.2
- New setting: Pop-up width. Passed to the game script as data-width, so the pop-up can be widened (480 shows the glass card at its full width).
0.3.1
- A free item won in the game is added to the cart when its code is entered, instead of the code being refused as “not applicable” until the shopper found and added the item themselves.
0.3.0
- A reward with a minimum purchase is refused until the rest of the cart, not counting the reward, reaches it. A free item alone in a cart is no longer free.
- A code already on another order that has not been cancelled, refunded or failed is refused, so an instalment order waiting for the bank cannot share its code with a second order.
0.2.1
- A fixed amount won in another currency is refused at the cart instead of being taken off in the shop’s.
- A repeat win by network alone no longer blocks a code; only the same device does.
0.2.0
- New versions appear under Dashboard Updates.
- The game script is excluded from WP Rocket, LiteSpeed Cache and Autoptimize, which could delay it until a visitor clicked.
0.1.0
- First release.
