Edit Code on Order Confirmations - Remove pricing

Topic summary

A user needs to remove all pricing information from Shopify order confirmation emails because their products don’t have prices. They attempted to edit the code but encountered errors.

Solution Provided:
A PageFly representative shared extensive Liquid template code that removes pricing elements from the order confirmation email while maintaining other essential information like order number, customer details, and delivery information.

Follow-up Requests:

  • The original poster asked if it’s possible to keep the quantity subtotals while still hiding prices
  • They also requested removal of the word “Discount”

Current Status:
The helper clarified that all pricing elements have already been removed from the provided code. To restore quantity subtotals, the user would need to search through the code from the beginning to selectively add that element back. The current solution appears to meet the primary requirement of hiding all dollar amounts.

Summarized with AI on November 22. AI used: claude-sonnet-4-5-20250929.

Hi all! My products do not have a price so I need the order confirmation to also not show any $$. I have tried to edit the code but keep getting an error message. Can anyone assist?

Thank you.

Hi @kacey49 ,

This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
You can replace your code by below code:

{% capture email_title %}
  Thank you for your purchase! 
{% endcapture %}
{% capture email_body %}
  {% if has_pending_payment %}
    {% if buyer_action_required %}
      You’ll get a confirmation email after completing your payment.
    {% else %}
      Your payment is being processed. You'll get an email when your order is confirmed.
    {% endif %}
  {% else %}
    {% if requires_shipping %}
    {% case delivery_method %}
        {% when 'pick-up' %}
          You’ll receive an email when your order is ready for pickup.
        {% when 'local' %}
          Hi {{ customer.first_name }}, we're getting your order ready for delivery.
        {% else %}
          We're getting your order ready to be shipped. We will notify you when it has been sent.
      {% endcase %}
        {% if delivery_instructions != blank  %}
          

**Delivery information:** {{ delivery_instructions }}

        {% endif %}
       {% if consolidated_estimated_delivery_time %}
         

           Estimated delivery **{{ consolidated_estimated_delivery_time }}**
         

       {% endif %}
    {% endif %}
  {% endif %}
{% endcapture %}

  
  
  
  
  
  

  
    <table>

      
        
          <table>

  
    
      

        <table>

          
            

              <table>

                <tr>

                  <td>

                    {%- if shop.email_logo_url %}
                      
                    {%- else %}
                      # 
                        {{ shop.name }}
                      
                    {%- endif %}
                  

</td>

                    <td>

                      
                        Order {{ order_name }}
                      
                    

</td>

                </tr>

              </table>

            
          
        </table>

      
    
  
</table>

          <table>

  
    
      
        <table>

          
            
              
            ## {{ email_title }}
            

{{ email_body }}

            {% assign transaction_count = transactions | size %}
  {% if transaction_count > 0 %}
    {% for transaction in transactions %}
      {% if transaction.show_buyer_pending_payment_instructions? %}
        

 {{transaction.buyer_pending_payment_notice}} 

        

        
            {% for instruction in transaction.buyer_pending_payment_instructions %}
              
            {% endfor %}
            
            {% for instruction in transaction.buyer_pending_payment_instructions %}
              
            {% endfor %}
          <table>

          <tr>
<td>

{{ instruction.header }}

</td>
<td>

Amount

</td>

          </tr>

          <tr>
<td>

{{ instruction.value }}

</td>
</tr>

        </table>
        

      {% endif %}
    {% endfor%}
  {% endif %}

            {% if order_status_url %}
              <table>

  <tr>

    <td>

 

</td>

  </tr>

  
    
      <table>

        <tr>

          <td>

View your order

</td>

        </tr>

      </table>
      {% if shop.url %}
    <table>

      <tr>

        <td>

or Visit our store

</td>

      </tr>

    </table>
{% endif %}

    
  
</table>

            {% else %}
              {% if shop.url %}
    <table>

      
        
          <table>

            <tr>

              <td>

Visit our store

</td>

            </tr>

          </table>
        
      
    </table>
{% endif %}

            {% endif %}

            
          
        </table>
      
    
  
</table>

          {% assign gift_card_line_item = line_items | where: "gift_card" %}
          {% if gift_card_line_item.first %}
            <table>

  
    
      
        <table>

          <tr>

            <td>

              ### Gift card
            

</td>

          </tr>

        </table>
        <table>

          <tr>

            <td>

              
              

 You’ll receive separate emails for any gift cards.

            

</td>

          </tr>

        </table>
      
    
  
</table>
          {% endif %}

          <table>

  
    
      
        <table>

          <tr>

            <td>

              ### Order summary
            

</td>

          </tr>

        </table>
        <table>

          
            
              
            

  {% for line in subtotal_line_items %}
  {% endfor %}
<table>

    
      <table>

        <tr>
<td>

          {% if line.image %}
            
          {% endif %}
        

</td>

        <td>

          {% if line.product.title %}	
            {% assign line_title = line.product.title %}	
          {% else %}	
            {% assign line_title = line.title %}	
          {% endif %}

          {% if line.quantity < line.quantity %}
            {% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity  %}
          {% endif %}

          {{ line_title }} × {{ line_display }}

          {% if line.variant.title != 'Default Title' %}
            {{ line.variant.title }}

          {% endif %}

          {% if line.selling_plan_allocation %}
            {{ line.selling_plan_allocation.selling_plan.name }}

          {% endif %}

          {% if line.refunded_quantity > 0 %}
            Refunded
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
                
                  
                  
                    {{ discount_allocation.discount_application.title | upcase }}
                  
                
              {% endif %}
            {% endfor %}
          {% endif %}
        

</td>

          
      </tr>
</table>
    
  </table>

            <table>

  
    <td>

</td>

    
      
        {% for discount_application in discount_applications %}
          {% if discount_application.target_selection == 'all' %}
            {% capture discount_title %}
              {% if discount_application.title %}
                {{ discount_application.title | upcase }}
              {% else %}
                Discount
              {% endif %}
            {% endcapture %}
            

          {% endif %}
        {% endfor %}

      <table>
<tr>

  <td>

    

      Discount
        
          
          {{ discount_title }}
        
    

  

</td>

</tr>
</table>
      {% assign transaction_size = 0 %}
      {% assign transaction_amount = 0 %}
      {% for transaction in transactions %}
        {% if transaction.status == "success" %}
        {% unless transaction.kind == "authorization" or transaction.kind == "void" %}
          {% assign transaction_size = transaction_size | plus: 1 %}
          {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
        {% endunless %}
        {% endif %}
      {% endfor %}

      {% unless payment_terms %}
      {% if transaction_size > 1 or transaction_amount < total_price %}
        

          {% for transaction in transactions %}
            {% if transaction.status == "success" and transaction.kind == "capture" or transaction.kind == "sale" %}
              {% if transaction.payment_details.credit_card_company %}
                {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
              {% else %}
                {% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}
              {% endif %}

            {% endif %}
            {% if transaction.kind == 'refund' %}
              {% if transaction.payment_details.credit_card_company %}
                {% assign refund_method_title = transaction.payment_details.credit_card_company %}
              {% else %}
                {% assign refund_method_title = transaction.gateway %}
              {% endif %}

              

            {% endif %}
          {% endfor %}
        <table>

          <tr>
<td colspan="2">

</td>
</tr>

          <tr>
<td colspan="2">

</td>
</tr>
</table>
      {% endif %}
      {% endunless %}
    
  
</table>

            
          
        </table>
      
    
  
</table>

          <table>

  
    
      
        <table>

          <tr>

            <td>

              ### Customer information
            

</td>

          </tr>

        </table>
        <table>

          
            
              
            
                {% if requires_shipping and shipping_address %}
                  
                {% endif %}
                {% if billing_address %}
                  
                {% endif %}
              <table>

              <tr>
<td>

                    #### Shipping address
                    {{ shipping_address | format_address }}
                  

</td>
<td>

                    #### Billing address
                    {{ billing_address | format_address }}
                  

</td>
</tr>

            </table>
            
                {% if company_location %}
                  
                {% endif %}
                {% if transaction_size > 0 or payment_terms %}
                  
                {% endif %}
              
                {% if requires_shipping and shipping_address %}
                  {% if shipping_method %}
                    
                  {% endif %}
                {% endif %}
              <table>

              <tr>
<td>

                    #### Location
                    

                      {{ company_location.name }}
                    

                  

</td>
<td>

                    #### Payment
                    

                      {% if payment_terms %}
                        {% assign due_date = payment_terms.next_payment.due_at | default: nil %}
                        {% if payment_terms.type == 'receipt' or payment_terms.type == 'fulfillment' and payment_terms.next_payment.due_at == nil %}
                          {{ payment_terms.translated_name }}

                        {% else %}
                          {{ payment_terms.translated_name }}: Due {{ due_date | date: format: 'date' }}

                        {% endif %}
                      {% endif %}
                      {% if transaction_size > 0 %}
                        {% for transaction in transactions %}
                          {% if transaction.status == "success" or transaction.status == "pending" %}
                            {% if transaction.kind == "capture" or transaction.kind == "sale" %}
                              {% if transaction.payment_details.credit_card_company %}
                                
                                ending with {{ transaction.payment_details.credit_card_last_four_digits }}

                              {% elsif transaction.gateway_display_name == "Gift card" %}
                                
                                ending with {{ transaction.payment_details.gift_card.last_four_characters | upcase }}

                              {% elsif transaction.gateway_display_name != "Shop Cash" %}
                                {{ transaction.gateway_display_name }}

                              {% endif %}
                            {% elsif transaction.kind == "authorization" and transaction.gateway_display_name == "Shop Cash" %}
                             
                            {% endif %}
                          {% endif %}
                        {% endfor %}
                      {% endif %}
                    

                  

</td>
</tr>

              <tr>
<td>

                      #### Shipping method
                        

                          {{ shipping_method.title }}
                        

                    

</td>
</tr>

            </table>

            
          
        </table>
      
    
  
</table>

          <table>

  
    
      
        <table>

          <tr>

            <td>

              
              

If you have any questions, reply to this email or contact us at [{{ shop.email }}](mailto:{{ shop.email }})

            

</td>

          </tr>

        </table>
      
    
  
</table>

        
      
    </table>
  

I hope it would help you
Best regards,

Richard | PageFly

This is amazing, you’re a genius! Is their a way to keep the subtotal of quantities? If not, this still is so great!!!

1 Like

Oh, and remove the word discount:)

Hi @kacey49 ,

Sorry, I already helped you delete them all. Now if you want to display the subtotal again, you need to search for the code to delete it from the beginning. I think the current solution is fine for now