GST Pro - GST Invoice India

Custom Code Embed B2B Fields

Updated Apr 13, 20261 min read

On this page (2)

If the standard B2B setup's does not meet your requirements you can collect the GST Number and Company Name directly from customers by adding custom fields to your Shopify cart page. This ensures that the required details are captured during checkout and reflected in GST Pro for accurate invoicing.

Add Custom Fields to Cart

Insert the following code inside the cart <form> tag in your Shopify theme:

<p class="cart-attribute__field gst-invoice__field gst-invoice__field--company">   <label for="company_name">Company Name</label>   <input class="gst-invoice__input" id="company_name" type="text" name="attributes[company_name]" value=""></p><p class="cart-attribute__field gst-invoice__field gst-invoice__field--gst">   <label for="gstin_number">GST Number</label>   <input class="gst-invoice__input" id="gstin_number" type="text" name="attributes[gstin_number]" value=""></p>

How It Works

When customers enter their details, the values are stored as cart attributes (company_name and gstin_number) during checkout. GST Pro automatically detects these attributes and updates the customer’s GST details, ensuring accurate B2B invoicing without manual effort.

Helpful context

The Company Name field is optional, and these fields must be placed within the cart <form> element to function correctly.

d supporting details here.

References

Related articles

Still stuck?

Ask a follow-up and we'll see it came from “Custom Code Embed B2B Fields”.

Opens chat with your question and a link to this article.