Update formatting of shipping estimator results on cart page

Hi, I’m using Prestige theme and when I use the shipping estimator on my cart page, the results are not formatted properly. I’d like to remove the extra line and comma (red arrow below), and I’d like it to display as $4.31 instead of USD 4.31 (green arrow below.) Can you suggest how to do this? I’d like to make the change myself. Thank you!!

store: persistencegoods.com

pwd: PersistencE

1 Like

Hi! To fix this, just open assets/theme.js and update the code.

Find this line:

  let formattedShippingRates = shippingRates.map((shippingRate) => {
    return `<li>${shippingRate["presentment_name"]}: ${shippingRate["currency"]} ${shippingRate["price"]}</li>`;
  });

Replace it with:

  let formattedShippingRates = shippingRates.map((shippingRate) => {
    return `<li>${shippingRate["presentment_name"]}: $${shippingRate["price"]}</li>`;
  }).join("");