commercebuild Success Portal commercebuild Success Portal

  • Home
  • Submit a Ticket
  • Updates
  • Login
  • Contact Us
Home / Tutorials / How to add additional information to a transaction invoice

How to add additional information to a transaction invoice

646 views Less than a minute 0

If the transaction detail page does not have a grid setup, please follow these instructions to include additional information such as your TIN or GST/HST number:

1. In the admin dashboard, go to System > Modules > Custom Tags.

2. Click the New button.

3. Select “Footer – directly after </body> and before >/html>” from the Position dropdown and “All” from the Page Type dropdown.

4. Copy and paste the below code snippet and click Save.

<script>
$(document).ready(function(){
   if (window.location.href.indexOf("/transhistory")  != -1) {
      var label = "GST number";
      var number_value = "9917USA290050S9";
      var font_size = "1em";
      var font_weight = "bold";	  
      $('.main-table tbody tr:nth-child(3) td:eq(0)').append("<p><span style='font-size:"+font_size+";font-weight:"+font_weight+";'>"+label+": </span><span style='font-size:"+font_size+";'>"+number_value+"</span></p>");
   }
});
</script>
Feel free to modify the variables to reflect the data point you wish to add, as well as font weight and font size.

This is how your code will look:


This is how it will look on your invoice template:

For guidance on how to add custom JavaScript code, see our tutorial on How to Add a JavaScript Snippet.

webstore Tutorials

About Latika

View all posts by Latika →

Related Articles

  • How to Enable reCAPTCHA on Custom Forms
  • Adding a custom message to the shipping step at checkout
  • How to configure Stripe as a payment method
  • SQL Server Change Tracking Query for Sage 300 and X3

Popular Articles

  • Enable Firewall Rules and a JavaScript Browser Challenge 2247 16
  • Enable Cloudflare Rate Limiting 2134 0
  • How to Add a JavaScript Snippet 1994 8
  • IP Allowlist 1945 0
  • Signing up for Cloudflare and Configuring Your Domain 1812 4

New Articles

  • Error when adding a new user: Email is already in use 676 0
  • How to Check commercebuild Payments Version 913 0
  • How to Enable reCAPTCHA on Custom Forms 820 0
  • Manually posting an order 970 0
  • Adding a custom message to the shipping step at checkout 785 0
© commercebuild 2022. All rights reserved.