Hi all,
I was wondering how to include the variant (or product) price within the Add to Cart button in Sense theme. Example in the screenshot.

A user seeks to display variant or product prices directly within the Add to Cart button on Shopify’s Sense theme, sharing a screenshot example.
Solution Provided:
A PageFly expert offers JavaScript code to be inserted before the </body> tag in theme.liquid. The code dynamically adds the price to the ATC button and updates when variants change. Custom CSS styling is also possible via the added class.
Implementation Issues:
Current Status:
The basic functionality is confirmed working, but users request fixes for the edge cases involving hidden price blocks and variant price updates. No follow-up solutions have been provided yet for these specific issues.
Hi all,
I was wondering how to include the variant (or product) price within the Add to Cart button in Sense theme. Example in the screenshot.

can you please send store url
I’m Richard Nguyen - CRO Expert at PageFly- Free Landing Page Builder.
You can add my code as follows: theme → Edit > Search “theme.liquid”. Then paste the code before the tag:
You can also customize the css for the added content with the class "custom-content "
If you find my comment useful, please let me know by giving it a Like. Thank you!
Richard - PageFly
It worked perfectly! Thank you @PageFly-Richard
Hi Richard,
Your code is definetly works BUT when I hide or remove Pricing block, it’s not shows the price on the ‘add to cart’ button.
I want to hide or remove it because I wanted to show the price just on the add to cart button.
Can you fix this too? Thanks.
I’ve been trying to figure this out for days now, and your solution work. Thank you so much!
Hi Richard, Can you advise if we can use this code to include the variant (or product) price within the Add to Cart button in Local theme.
This works, sort of ![]()
It needs a double click to update the price if the variant prices are different.
It hides if the product price block is hidden ![]()
Any solutions? ![]()
elin