Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Customers should able to download User specific pricefile for shopify plus b2b catalog on a button click from front end based on there login
If there are multiple prices assigned to a customer lowest price which is assigned to that customer should be there in downloaded excel file
Excel has prices from 1st 10 pricelist of 250 products of each pricelist as attached sheet
P.s We are using using shopify Plus and pricefile are there for b2b customers. We have only b2b store
How can I limit the pricelist to the current logged-in user's pricelist only, with all products from that customer's company's location only?
@Saurabhjg wrote:Customers should able to download User specific pricefile for shopify plus b2b catalog on a button click from front end based on there login
If there are multiple prices assigned to a customer lowest price which is assigned to that customer should be there in downloaded excel file
Excel has prices from 1st 10 pricelist of 250 products of each pricelist as attached sheet Subway BOGO Code
P.s We are using using shopify Plus and pricefile are there for b2b customers. We have only b2b store
How can I limit the pricelist to the current logged-in user's pricelist only, with all products from that customer's company's location only?
To limit the pricelist to the current logged-in user's pricelist only, you can use Shopify's GraphQL Admin API. Here's a high-level approach:
Retrieve User-Specific Pricelist: Use the GraphQL query to fetch the pricelist assigned to the current user's company location.
Filter Products: Ensure the query filters products based on the user's company location.
Generate Excel File: Use the filtered pricelist data to generate and download the Excel file.
Here's a sample GraphQL query to get you started:
query GetUserPricelist($userId: ID!) {
user(id: $userId) {
company {
locations {
id
pricelists(first: 10) {
edges {
node {
id
products(first: 250) {
edges {
node {
id
title
price
}
}
}
}
}
}
}
}
}
}
You'll need to replace $userId with the actual user ID and integrate this query into your front-end logic to handle the button click and file download.
Hi victoria88paul ,
Thank you for your reply. I created custom metafield in company location metafield definitions with namespace as custom and key as catalogname how can I access /filter out in graphql and how can I access it in liquid
do I need to store that variable in client side code and pass it server side code?
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025