I’m setting up a loyalty system using the LoyaltyLion app, where customers earn 1 point for every £1 spent. Customers can then redeem these points as discounts during checkout via a “Redeem points at Checkout” field I added to the Shopify checkout page. This redemption only works if the Shopify discount system is enabled.
For B2B customers (those belonging to a company), when they log in using Shopify’s new login method, the discount code field is hidden by default because Shopify disables discounts for B2B accounts. As a result, the LoyaltyLion redeem points feature didn’t work for these B2B customers.
After requesting Shopify to enable discounts for B2B customers, the LoyaltyLion redeem points field started working. However, the discount code input field also became visible at checkout, allowing B2B customers—who are already seeing discounted prices—to enter additional discount codes and reduce prices further. This creates a major issue.
Therefore, I want to hide the discount code field only for B2B customers logging in via the new Shopify login, while keeping the Shopify discount system enabled to ensure LoyaltyLion’s points redemption continues to function properly.
I am assuming Shopify considers a customer B2B if they belong to a company AND if they logged in via shopify Customer Account (Not via legacy login).
I am considering creating an app using CLI
And running validation there.
Has anyone acheived something similar or know how to do this? I am looking for advice.