Montreal-based Shopify experts cooking some Shopify apps.
Most of the themes available on the Themes Marketplace have premade configurations ready to be activated in one click with the Carter app. But some don't have, or sometimes you, merchants, want more than our basic integration. That's why we created custom templating, allowing you to add your own code to our carter snippet, directly in your theme.
This section provides some useful information if you want to extend Carter beyond the normal configurations functionality.
You can define a global function named tbn_after_code_applied(data). Carter will call this function after each applies. Example below:
<script>
function tbn_carter_after_code_applied( data ) {
console.log("Applied data from carter is",data);
}
/*
Applied data from carter is
{
code: "TEST_CODE"
code_applied: true
code_applying: false
has_tooltip: true
nice_amount: "$12.40 off total order price"
normal_amount: "- $12.40"
}
*/
</script>
Carter also exposes a global function to apply a discount code programatically tbn_carter_apply_code("mycode"). The app will apply the code and update the tooltip. Make sure you call the function after our script tag was loaded. You can check if the script was loaded like this:
<script>
if (window.TABARNAPP_CD_LOADED === true || (typeof tbn_carter_apply_code === "function")){
tbn_carter_apply_code("mycode").then((data)=>{
console.log("Applied data from carter is",data);
});
} else {
console.log('carter app was not loaded yet.');
}
</script>
Some merchants are already using this feature to create some pretty amazing user-experience.
Tabarnapp's mission is to help you get the most of each visit on your Shopify store.
E: support@tabarnapp.com