Personalized checkout and custom promotions with Shopify Scripts
Is the "company" attribute accessible from Input.cart.shipping_address? Input.cart.shipping_address.company returns a no method error. This seems like something that should be accessible from the Shipping Address object, especially since it so closely resembles its Liquid counterpart which provides access to it.
My use case is to show specific business shipping options when shipping to a business, which is inferred by the entry of a company name. Any insight into accessing the company field would be helpful, otherwise consider this post a feature request 🙂
I'm looking for the same feature here: https://community.shopify.com/c/Technical-Q-A/Access-quot-Company-quot-field-or-a-custom-field-in-Sh...
Did you find anything yet?
Otherwise, if it's usable to you; you can activate Address Line 2, change it's labels to something company related and then access this field in Shopify scripts. Then you could toggle the shipping methods based on the input of this field.
I received a response from Shopify support saying they do not support accessing the company field from Shopify Scripts. I had to implement a front-end solution for my feature by initiating a change handler on "input#shipping_company_value", binding it on the "page:load" and "page:change" document events.
Clever solution with the Address 2 field 🙂
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025