Virtual Wallet provides a lot of shortcodes you can use to display information to your customers. We’ll detail them here.
All Wallets
The following shortcodes are available for both the standard and the gems walllet.
Wallet Balance
Use this shortcode to display the current user’s balance
[wvw_wallet_balance]
In addition, there are some options you can use with this shortcode
- mode : Set the wallet type to display. Default value is the preferred mode
- wallet : Displays the standard wallet’s balance
- gems : Displays the gems wallet’s balance
- raw : (Optional) If set to ‘true’, the result will be a simple text. If not, the result will be embedded in a stylable DOM element
Wallet History
Use this shortcode to display the current user’s wallet transactions history
[wvw_wallet_history]
In addition, there are some options you can use with this shortcode
- mode : Set the wallet type to display. Default value is the preferred mode
- wallet : Displays the standard wallet’s balance
- gems : Displays the gems wallet’s balance
- count : Optional) Set the rows count to display on each page. Customers can show more results by clicking on a show more button at the bottom. Default value is 20
- excel : (Optional) If set, customers can export their wallet history to excel.
- header : (Optional) If set, it will display a header text before the wallet history
- btlabel : (Optional) If set, it replaces the default show more button export label
- excellabel : (Optional) If set, it replaces the default excel button export label
Product Cashback
Use this shortcode to display the cashback amount customers will receive when purchasing the product
[wvw_product_cashback]
In addition, there are some options you can use with this shortcode
- mode : Set the wallet type to display. Default value is the preferred mode
- wallet : Displays the standard wallet’s balance
- gems : Displays the gems wallet’s balance
- product : Optional) The product Id. If you don’t specify any, the shortcode will try to find the current product. Don’t specify this value if you place the shortcode in woocommerce’s product page
- raw : (Optional) If set to ‘true’, the result will be a simple text. If not, the result will be embedded in a stylable DOM element
- guest : (Optional) If set to ‘true’, shows the cashback value even for not logged in users. Default value is ‘true’
- test : You can display an extra text within the shortcode. The test option lets you select if you want to display that text only if the product gives cashback or not
- yes : Displays the text only if the product gives cashback
- no : Displays the text only if the product doesn’t give cashback
Here’s an example on how to use the above option
[wvw_product_cashback mode="gems" test="yes"]This text is visible only if the current product provides cashback[/wvw_product_cashback]
Cart Cashback
Use this shortcode to display the cashback amount customers will receive with his current cart
[wvw_cart_cashback]
In addition, there are some options you can use with this shortcode
- mode : Set the wallet type to display. Default value is the preferred mode
- wallet : Displays the standard wallet’s balance
- gems : Displays the gems wallet’s balance
- raw : (Optional) If set to ‘true’, the result will be a simple text. If not, the result will be embedded in a stylable DOM element
- guest : (Optional) If set to ‘true’, shows the cashback value even for not logged in users. Default value is ‘true’
- test : You can display an extra text within the shortcode. The test option lets you select if you want to display that text only if the cart gives cashback or not
- yes : Displays the text only if the cart gives cashback
- no : Displays the text only if the cart doesn’t give cashback
Here’s an example on how to use the above option
[wvw_cart_cashback mode="gems" test="yes"]This text is visible only if the current cart provides gems cashback[/wvw_cart_cashback]
Standard Wallet
This part presents shortcodes that are only available for the standard wallet
Use this shortcode to display the wallet partial payment tool.
[wallet_payment]
Maximum Wallet Amount on Cart
This shortcode will show the maximum amount of cart credit that must be used on this cart. This value is useful if you set some products to be only buyable with standard payment methods.
[max_wallet_on_cart]
In addition, there is an option you can use with this shortcode
- raw : (Optional) If set, the amount will be a simple text. Otherwise, it will be presented inside a stylable element
Minimum Wallet Amount on Cart
This shortcode will show the minimum amount of cart credit that must be used on this cart. This value is useful if you set some products to be only buyable with wallet credit.
[min_wallet_on_cart]
In addition, there is an option you can use with this shortcode
- raw : (Optional) If set, the amount will be a simple text. Otherwise, it will be presented inside a stylable element
Gems Wallet
This part presents shortcodes that are only available for the gems wallet
Gems to discount
Use this shortcode to display the gems to discounts tool. In addition, you can customize its appearance in the WooCommerce Tab.
[gems_to_discount]
Gems cart total
Use this shortcode to display the gems the customer owns and how much he will use on the current cart.
[gems_resume]
Gift Cards
This part presents shortcodes for the gift cards feature
Gift Card Redeem
With this shortcode, your registered customers can use a gift card code to credit their wallet. If customers don’t have an account, you can display a message instead.
[wvw_giftcard_use header="Gift Card" text="Enter your gift card code"]Your message for unregistered customers[/wvw_giftcard_use]
Here are the available options for this shortcode :
- header : (Optional) Set a title that will be displayed above the gift card form
- text : (Optional) Set a text that will be displayed above the gift card form
- success : (Optional) Set a text that will be displayed when the customer successfully applies the gift card code
- fail : (Optional) Set a text that will be displayed if the gift card code doesn’t work
Bought Gift Cards
With this shortcode, your registered customers can see all the giftcards they bought
[wvw_bought_giftcards]
Here are the available options for this shortcode :
- columns : (Optional) The Columns to display (comma separated). The order in which you specify the columns will be the grid columns order
If not specified, the shortcode will display the following columns : code, recipient, amount, expiration date and status
Here are the different options available :- code : The gift card’s code
- recipient : The gift card’s recipient email
- amount : The gift card’s amount
- expiration : The gift card’s expiration date if it exists
- status : The gift card’s status
- header : (Optional) The column headers (comma separated). Must be specified if you specified the columns option. The headers must respect the same order than the ones of the previous option
Bought Gift Cards
With this shortcode, your registered customers can see all the giftcards they received
[wvw_received_giftcards]
Here are the available options for this shortcode :
- columns : (Optional) The Columns to display (comma separated). The order in which you specify the columns will be the grid columns order
If not specified, the shortcode will display the following columns : code, amount, expiration date and action
Here are the different options available :- code : The gift card’s code
- amount : The gift card’s amount
- expiration : The gift card’s expiration date if it exists
- action : A button to use te gift card if not already consumed
- status : The gift card’s status
- header : (Optional) The column headers (comma separated). Must be specified if you specified the columns option. The headers must respect the same order than the ones of the previous option
- used : Select if you want to display already used gift cards or not. There are 2 possibilities :
- yes : (Default) Shows all gift cards
- no : Hide gift cards that have been used
Advanced Shortcodes
For users with more experience, these shortcodes will provide some extra possibilities
Conditional Display
Use this shortcode to show content to your customers only if they meet the required condition(s).
[wvw_conditional_display] The content to show [/wvw_conditional_display]
Here are the available options for this shortcode :
- mode : Set the wallet type to display. Default display is standard wallet. Possible values are :
- wallet : Default value. Will test the customer’s standard wallet
- gems : Will test the customer’s gems wallet
- atleast : (Optional) The customer must have at least this amount to see the content
- lessthan : (Optional) The customer must have strictly less than this amount to see the content
- authorized : Set which users can see the content
- both : Default value. Logged status does not matter.
- yes : Only logged in customers will see the content
- no : Only visitors will see the content