How to remove .00 decimals from the one-time purchase option?

Topic summary

Goal: Remove .00 on one-time purchase prices (e.g., $8.00 → $8) while preserving decimals for non-integers (e.g., $7.20 stays $7.20).

Context: Prices on the product page may be generated by the ReCharge subscriptions app. If so, theme-based formatting changes will not apply.

Tried/Proposed:

  • Change currency formatting (Admin > Settings > Store details > Store currency) from {{ amount }} to {{ amount_no_decimals }}. Outcome: removes all decimals, which is not desired.
  • Use {{ money_without_trailing_zeros }} to drop only .00. Outcome: did not work; prices still show with decimals, likely because the app overrides theme formatting.
  • Insert custom JavaScript in theme.liquid before . Outcome: suggestion incomplete; no code provided.

Status: Unresolved. The key blocker is whether ReCharge controls the price rendering.

Next steps:

  • Confirm if ReCharge outputs the price and contact their support for formatting options.
  • If theme controls the price, implement a working solution that uses money_without_trailing_zeros or targeted JS to only strip trailing .00 from one-time purchase prices without altering values like $7.20.

Notes: Liquid variables/filters are central to the solution.

Summarized with AI on January 6. AI used: gpt-5.

Hey,

  1. In your Shopify Admin go to online store > themes > actions > edit code and search theme.liquid file.
  2. In your theme.liquid file, find the (press CTRL + F on Windows or command + F on Mac)
  3. paste this code right above the tag:

1 Like