All Collections
Canteen Shopify App
How to put "Fee" as a sub-total
How to put "Fee" as a sub-total
Updated over a week ago

If you would like to hide the product fee in the cart products list and show it as a sub-total you can do that by modifying the theme.


IMPORTANT - THIS IS NOT SUPPORTABLE by the Sasquatch Team. If you need our help it is a paid professional service. Each theme is unique and we offer this information only to guide you.



By default the Fee will show in the product list of the cart. Some store owners want this to display next to the sub-total. You can accomplish this by modifying your theme. Note - you cannot adjust the checkout screen as it is controlled by shopify.


Now the code changes. Most likely you will be modifying the cart.liquid


Where the FOR loop starts

<!-- SASQUATCH -->

<!-- Captures all fee amounts into a new variable called fees to be displayed later by the subtotal -->
{% if item.product.type == 'fee rule' %} {% assign fees = item.original_line_price | plus: fees %}{% endif %}


<!-- Adds a new CSS class if the product type is fee rule. This is used later so we can hide the product in the cart listing -->
{% if item.product.type == 'fee rule' %}
<div class="cart__product {{item.product.type}}" style="border: display: none;">
{% else %}
<div class="cart__product">
{% endif %}

<!-- END SASQUATCH -->


Output the sub-total by the total
โ€‹

<!-- SASQUATCH -->
<!-- Add subtotal amount and output above the cart total -->
<p class="cart__footer-message">Fee <span class="money">{{ fees | money }}</span></p>
<!-- End SASQUATCH -->


Quick Note:

Shopify doesn't allow for the checkout page to be modified. You can only modify the cart and mini-cart areas of your theme. Below is a screenshot example of how the fee will display in the checkout.


IMPORTANT - THIS IS NOT SUPPORTABLE by the Sasquatch Team. If you need our help it is a paid professional service. Each theme is unique and we offer this information only to guide you.


Did this answer your question?