Change text on Add to Cart Button to include a space

Topic summary

Issue: After adding the product price to the Add to Cart button, the label displayed as “Add to Cart$xx.xx” with no space. Attempts to add spaces in theme content (e.g., after a colon) were stripped.

Proposed fixes:

  • In Liquid, include a trailing space inside the button label before the price: {{ 'Add to Cart ’ }}{{ product.price | money }}. This ensures a literal space.
  • If appended via JavaScript, concatenate with a space: 'Add to Cart ’ + productPrice.
  • Alternative suggestion: insert a non‑breaking space entity after the label (e.g.,  ), ensuring visible spacing.
  • One reply suggested minor formatting around the money filter (removing an extra space before | money), but this is not the core fix.

Outcome: The OP confirmed the simple trailing-space solution worked.

Other notes: Some responders requested the store URL/password to investigate, but this was unnecessary for the fix. Images were shared to illustrate the issue, but they aren’t required to apply the solution.

Status: Resolved; no further actions pending.

Summarized with AI on December 20. AI used: gpt-5.

Hi @camalia , kindly share your store URL. Thanks!