We are using Fresh Relevance to add product recommendation carousels to our website. For each product card we are showing the price, and we need it to be in this format: $1,111. It currently looks like this: $1111. We want to add in the comma.
I’ve been editing the template for the carousel (I’m familiar with html, css, jquery), but I can’t figure out what language the price part of the template is in:
<div class="{{safeid}}__product-price">
<a href="{{ mergeField(fields.redirectURL, { product: product })|set_ga_tracking(
utm_campaign=mergeField(fields.utmCampaign, {}),
utm_medium=mergeField(fields.utmMedium, {}),
utm_source=mergeField(fields.utmSource, {})) }}" target="_blank">
{{ product.uv|format_currency(product.curr,0) }}
</a>
</div>
It’s the 6th line that I’m trying to edit. I think it is using Babel and I found some documentation online for the ‘format_currency’: https://babel.pocoo.org/en/latest/api/numbers.html#babel.numbers.format_currency
I’ve tried numerous things, and I end up breaking the template every time. I need to keep the
(product.curr,0)
part because we need to remove the decimal part of the price.
I’ve reached out to Fresh Relevance support (their dev turn-around time is a bit long), and I am hoping someone here can help me out.