I want to get the logged in customers id of the shopify store in my shopify remix app to dynamically change the price of the product according the customers. Is there any way to achieve this
Hi @bootsgridDev , thank you for posting here!
You can easily dynamically change the price of the product according to the customers (logged-in or non-logged-in customers) with Snap B2B Wholesale
- WHOLESALE PRICING: custom price with multiple rules, edit price by product list
- PRICE DISPLAY: display unique prices only for logged-in/tagged customers
If my answer is helpful, please let me know by accepting the Solution and giving a Like !!!
@bootsgridDev I found a solution for retrieving the customer ID in a Shopify Customer Account UI Extension app.
To get the authenticated customer’s ID, add the following code in the JavaScript file located in the src folder:
const customerId = api.authenticatedAccount?.customer?.current?.id;
- api.authenticatedAccount provides authentication details of the currently logged-in account.
- .customer accesses the customer-related information.
- .current refers to the authenticated customer.
- .id retrieves the unique identifier of the customer
1 Like