Period in price

Tourist
31 0 1

Hello,

I have a problem. It shows me a dot in the price. How to fix it?

 

www.caccesories.com
pass: mat
0 Likes

Hello 

Have you done any customization on product-unit-price.liquid file.

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
Tourist
31 0 1

@oscprofessional no, can you say how to do it?

0 Likes

Share your product-unit-price.liquid file code here or mail me.

Email: pallavi@oscprofessionals.com

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
Shopify Expert
403 28 76

I don't see a way to do that with liquid:

https://help.shopify.com/en/manual/payments/currency-formatting

https://help.shopify.com/en/themes/liquid/filters/money-filters

 

So I think your solution would be to remove the " . " from the price variable when displaying it.

 

Something like this should do it:

 

{{ product.price | money_without_currency | remove: "." }}


Try replacing your product price variable with that (do this on a backup theme first and preview before publishing).

 

Since your cents are in a different element, the first and second parts of the price might be separated, so in that case you'll probably want to use the remove filter where the full price is getting assigned.

Founder of Speed Boostr (Shopify optimization and dev agency).
Creator of Order Automator (app that auto fulfills orders, adds tags, emails).
Creator of Shopify Analyzer (free performance analysis tool).
I also build custom apps and automated solutions.
Enjoy the adventure!
0 Likes
Tourist
31 0 1
@Joesldeas Where does it change?
0 Likes
Tourist
31 0 1

@oscprofessional 

{%- unless available -%}
  {%- if variant.title -%}
    {%- assign available = variant.available -%}
  {%- else -%}
    {%- assign available = true -%}
  {%- endif -%}
{%- endunless -%}

<div class="product-price-unit {% if available and variant.unit_price_measurement %} product-price-unit--available{% endif %}" data-unit-price-container>
  <span class="visually-hidden">{{ 'products.product.unit_price_label' | t }}</span>
  {%- capture unit_price_separator -%}
    <span aria-hidden="true">/</span><span class="visually-hidden">&nbsp;{{ 'general.accessibility.unit_price_separator' | t }}&nbsp;</span>
  {%- endcapture -%}

  {%- capture unit_price_base_unit -%}
    <span>
      {%- if available and variant.unit_price_measurement -%}
        {%- if variant.unit_price_measurement.reference_value != 1 -%}
          {{- variant.unit_price_measurement.reference_value -}}
        {%- endif -%}
        {{ variant.unit_price_measurement.reference_unit }}
      {%- endif -%}
    </span>
  {%- endcapture -%}
  <span data-unit-price>{{ variant.unit_price | money }}</span>
  {{- unit_price_separator -}}
  <span data-unit-price-base-unit>{{- unit_price_base_unit -}}</span>
</div>
0 Likes

@bialas6666,

Go to your theme.scss file and remove below css

#productPrice-product-template span:first-child sup::before {
	content: '.';
}

 

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
Tourist
31 0 1

@oscprofessional I did. Works in the product card. Does not work in directories.

0 Likes
Tourist
31 0 1

@JoesIdeas Where does it change?

0 Likes