Scenario
Some situations call for removing the Dollar sign ($) from the webstore's item price.
Solution
- Navigate to Commerce > Site Builder > Customize Text
- Customize Text Group: Click Customize
- Click Messages
- Find Price: {1} in the Default Text column
- Customization: Enter the following code:
-
<script>
var str = "<%=getCurrentAttribute('item','salesPriceHTML')%>";
var res = str.replace("$" , ""); {
document.write("Price test:" + res);
}
</script>
-
- Click Save