shopify Title instead of product id. API Python
I would like to find all the titles in my shopify store. I found this piece of code which give me the product id.
xxx = shopify.Product.find(limit=50, page=1)
What I am looking for is the title.........
xxx = shopify.Product.title(limit=50, page=1) xxx = shopify.Product.title(limit=50, page=1).title() xxx = shopify.title(limit=50, page=1) xxx = title(limit=50, page=1)
What I want to see on the output window.
'This is the title of the product' <- this is what I want to extract
What I get now is
product(322940174383) <- bad I want the title not product id
I edited my answer because I misunderstood your question. You have to iterate over your entire product list, you can do something like this:
p_count = shopify.Product.count() p_max_pages = int(p_count / 250) + 1 titles =  for page in range(1, p_max_pages + 1): products = shopify.Product.find(page=page, limit=250) for product in products: titles.append(product.title)
In the product object in the loop you can find all the properties listed in the Shopify Documentation (https://help.shopify.com/api/reference/product)
If you want to get products by title you should use
This returns the list of products that contains the string "My Product"
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.