Introduction
Embedding your customer's points balances into your store theme is a great way to make sure your customers know how many points they have. You can add this code anywhere your site allows you to modify the HTML.
β¨ Shopify merchants can now use our no-code app block to embed customer points directly into customer accounts: Embed points on customer account
Overview
Shopify
π Note: you'll need to enable the Javascript SDK setting in Smile Admin (Settings > Developer tools) in order for this to work.
If you're a Shopify merchant, use the following code:
{% if customer %} Your Points Balance: <span class="sweettooth-points-balance"></span> {% endif %}
π Pro Tip: Add this code into the theme.liquid or file for best results as this will allow the points balance to show on all pages of your store. Add this code to customers/ account.liquid for the points balance to show on the customer's account page when they are logged in.
BigCommerce
If you're a BigCommerce merchant, use the following code:
Your Points Balance: <span class="sweettooth-points-balance">(loading)</span>
Once you've added the code, it'll appear on your site depending on where you placed it, and replace the (loading) text with that customer's balance!
πNote:
Points cannot be embedded on the account, checkout, and sitemap pages in BigCommerce.
πNote: modifying this feature is not supported by the Smile team. If you need additional assistance to set up this feature, please contact your theme developer.
What's next?
Adjust customer points balance
β
βLearn more