-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Items not getting displayed #19
Comments
Hello, make sure you are sending correct JSON file i.e. it should be a proper array of objects. You can find some working examples here https://github.com/itemsapi/itemsapi-example-data/tree/master/items. |
Hi @cigolpl, thanks for your quick reply, below is the JSON which i am sending. please have a look at it and tell me what all things can be done to get an output.
] As, of now i am giving you 4 objects but in real i'm sending more than 100 objects. so , please check whether the JSON is valid or any other issue? Thank you |
The only one problem which I see - the array should list a flat objects. Instead of: {
"id": 55454453431502,
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh",
"variants": [{
"id": 6642,
"product_id": 8402,
"title": "vjbbgf",
"price": "80.00",
"sku": "gggfgf",
"position": 1,
"grams": 0,
"inventory_policy": "gfhgf",
"compare_at_price": "40.00",
"fulfillment_service": "bcvdbvd",
"inventory_management": "dkjdk",
"option1": "dkcdjkcd",
"option2": null,
"option3": null,
"created_at": "2017-06-08T13:18:04+05:30",
"updated_at": "2017-06-08T13:18:04+05:30",
"taxable": true,
"barcode": "",
"image_id": null,
"inventory_quantity": 10,
"weight": 0,
"weight_unit": "g",
"old_inventory_quantity": 10,
"requires_shipping": true
}]
} It should works: {
"id": 55454453431502,
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh",
"variants_id": 6642,
"variants_product_id": 8402,
"variants_title": "vjbbgf",
"variants_price": "80.00",
"variants_sku": "gggfgf",
"variants_position": 1,
"variants_grams": 0,
"variants_inventory_policy": "gfhgf",
"variants_compare_at_price": "40.00",
"variants_fulfillment_service": "bcvdbvd",
"variants_inventory_management": "dkjdk",
"variants_option1": "dkcdjkcd",
"variants_option2": null,
"variants_option3": null,
"variants_created_at": "2017-06-08T13:18:04+05:30",
"variants_updated_at": "2017-06-08T13:18:04+05:30",
"variants_taxable": true,
"variants_barcode": "",
"variants_image_id": null,
"variants_inventory_quantity": 10,
"variants_weight": 0,
"variants_weight_unit": "g",
"variants_old_inventory_quantity": 10,
"variants_requires_shipping": true
} Probably it's not super convenient but this is how it works.. Once you want to generate catalog with itemsapi it's good if you make some data pre-processing. |
Hi @cigolpl , thanks for the answer, but still its not working, can you suggest me with some other way so that i can make it work. Thank You |
@parshureddy06 let's try this: [{
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}, {
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh"
}] Once it's working you can go into Try to not use |
Hi @cigolpl, this is working fine, but if i add image field to it, it's not working fine, say |
Let's try [{
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"image": "https://cdn.shopify.com/s/files/1/1849/4447/products/AKRC13c.jpg?v=1496908011",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh",
},
{
"title": "hdbhcjdv",
"vendor": "kjvfjlkvfd",
"product_type": "vklfkvlkfd",
"tags": "vfdbjh,dsvsdhjs,dshsdj,dhsghsd,dshjhds,dshfjdsh",
"image": "https://cdn.shopify.com/s/files/1/1849/4447/products/AKR12d.jpg?v=1496909699"
}] You can also use |
Also |
@cigolpl , is it constrained to accept only few number of key-value pairs, if so how many? |
and what all the data-types it accepts? and will it accept empty and null values? |
@parshureddy06 I think it accepts lot of key-value, not sure how many but probably even more than hundreds. Not sure how about null values. Empty string should be fine. |
Hello, i am trying to deploy my project through heroku, this is my first thing which i am doing since i am a beginner, when i upload my json, i am able to see the view but i am not getting the items displayed, please can you give me a proper guidance like how to implement this .
This is the view which i am getting
I am unable to get the items displayed, here i am sending 10 items in an array which is valid.
Please report me with the issue, and provide me a proper guidance,
Thank you
The text was updated successfully, but these errors were encountered: