Widgets¶
Click on Online Stores > Themes > Customize.
Click on Action > Edit code.
Search for ‘product-template’ (it might be different with your template) > Click on that template to edit it.
Search for ‘add cart’ section inside the template, products.product.add_to_cart
, then add the below code snippet above that section > Save.
{% assign tamara_lang = request.path | slice: 1,2 %}
{% if tamara_lang != 'en' %}
{% assign tamara_lang = 'ar' %}
{% endif %}
<div style="margin: 15px 0" class="tamara-product-widget" data-price="{{product.price | money_without_currency | remove: ','}}" data-currency="{{shop.currency}}" data-payment-type="installment" data-lang="{{ tamara_lang }}"></div>
<script charset="utf-8" src="https://cdn.tamara.co/widget/product-widget.min.js"></script>
<script>
setTimeout(() => {
if (window.TamaraProductWidget) {
window.TamaraProductWidget.init({ lang: 'en' })
window.TamaraProductWidget.render()
}
}, 300)
</script>

Details on how to integrate different types of widgets into your e-commerce platform are available here.