How to show tax inclusive and exclusive prices across all product pages in Shopify Venture theme

I’m working with the Shopify Venture theme and trying to display both tax-inclusive and tax-exclusive pricing throughout my store. Right now I have it working on the main product page but need help extending it to other areas.

Current setup in my product template file:

First, I calculate the tax-inclusive amount:

{% assign tax_percentage = 0.15 %}
{% assign original_cost = product.price %}
{% assign tax_cost = original_cost | times: tax_percentage %}
{% assign total_with_tax = original_cost | plus: tax_cost %}

Then I display it with:

<div class="tax_inclusive_display"> {{ total_with_tax | money }} including tax </div>

This works perfectly on individual product pages, showing the inclusive price below the standard exclusive price. However, I need this same functionality to appear on other pages like the shopping cart and collection pages. What’s the best approach to make this tax calculation available site-wide instead of just on single product pages?

To implement tax-inclusive and tax-exclusive pricing across all pages in the Shopify Venture theme, consider creating a reusable snippet named tax-calculator.liquid within your snippets folder. This will centralize your tax calculation logic. On your collection and cart pages, you can include this snippet by using {% include 'tax-calculator' %}. Remember, for cart pages, use line_item.price instead of product.price for accurate calculations. To enhance flexibility, pass the price as a parameter, such as {% include 'tax-calculator', price: product.price %}, and reference it in the snippet with {{ price }}. It’s essential to rigorously test the functionality, especially with variant products, to ensure that all calculations perform as expected.

Drop your tax calc logic straight into the venture theme’s price.liquid snippet. Since most product displays already pull from that file, your tax math will show up everywhere - collections, cart, you name it. Way easier than building new snippets or messing with javascript when venture’s already got everything set up.

Try creating a global variable in your theme’s settings_schema.json for the tax percentage, then use JavaScript to handle calculations dynamically. I did this for a client who needed different tax rates by region and it worked great. Add the tax percentage to your theme settings, then combine liquid variables with JavaScript to calculate prices on-the-fly across collection pages, cart drawer, and product cards. For the cart, you’ll need to edit either cart-drawer.liquid or cart.liquid depending on your setup. Make sure the calculation runs whenever prices update, especially during AJAX cart updates. This beats using snippets since you can change tax rates without touching code files. Just test it thoroughly with discount codes - they can mess with the base price calculations.

Just use Venture’s built-in product card structure - it already handles prices consistently. Instead of tweaking multiple templates, focus on product-card.liquid since that controls collection page pricing. For cart stuff, hit up cart-item.liquid - that’s where line item calculations happen. I’ve had better luck adding a custom filter to the main liquid file rather than hardcoding calculations everywhere. Create something like {{ item.price | tax_inclusive_price }} and define it once. You’ll stay consistent without copy-pasting code all over. Watch out though - your tax calculation needs to play nice with Shopify’s discount system since it can mess with custom price mods.

I ran into the same thing when customizing pricing across different theme templates. Instead of editing individual pages, modify your theme’s global liquid objects - that’s the key. Check if Venture uses a centralized pricing setup in product-form.liquid or similar base files. You can add your tax calculation directly to product-price.liquid (if it exists) or modify the main product.liquid template that other pages pull from. For cart stuff, update both the main cart template AND any AJAX cart components - they usually use separate liquid files. Use item.price on cart pages instead of product.price. Definitely test with different product variants since they sometimes handle pricing differently than simple products.