thenifemi / PetShop

Pet Shop is an e-commerce application for Android built with Flutter (iOS to come soon).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Json

vipuluthaiah opened this issue · comments

I want to work..on fetching the json from online...how can i do this??

Online from where? sorry I don't understand your question

Hi @vipuluthaiah, have you ever worked with JSON APIs?

the process of updating the products..in u r app is lil hard..Is there a better way to update the products???

i successfully imported all the json to firebase
image
image

The credentials.dart file is intentionaly not included. Create your own credentials file with your own API Keys.

i am confused here..Which api we need to add?? here

You need to add your own Google Places API key, your own storage bucket link.

it would b really great it you show u r code..u can blur the api keys ...i just want wanna see var names ..

p.s it would b great if u guide me which features i should work on ur project

const PLACES_API_KEY = 'your_own_google_places_api_key';
const FIREBASE_STORAGE_BUCKET = 'your_own_firebase_ storage_location_key';

You could try working on the search feature.

FIREBASE CONNECTED BUT NOT ABLE TO LOAD PRODUCTS

IT WAS GIVING ME ERROR
image
so

image

i am still confused about the
const FIREBASE_STORAGE_BUCKET = 'your_own_firebase_ storage_location_key';
i used this url
image

FOR PLACES I USED THIS
as323

if i am missing out ..help me out:D

Did you add your google-services.json file to the project?

yesss
it is connected to firebase

i am stilll not clear about the which link u r talking about
const FIREBASE_STORAGE_BUCKET = 'your_own_firebase_ storage_location_key';
FIREBASE_STORAGE_BUCKET url?

image
this url right??

firebase is connected
image

image
i have the products

I think I understand now. The images for the products are stored in my firebase storage bucket. you need to add your own images to your bucket, then add the links to the products in firestore.

u want to say to add images to
Storage rather den cloud firestore??

should i do this manually or we have a script to do that?

adwAwD13
should i add images to realtime database or Storage??

I did everything manually actually. The actual images go in the Storage Bucket and the link to the Images go in Cloud Firestore

got it
is there any other easy way to do it?

I am not sure. Maybe using an external API

i am still confued which url i should pass in the code?
232442
image

am i doing it right??

AQ
i am passing this url..also i only pushed only two json data to firestore ...also i used image link from storage..I added the images and used that link in cloud firestore...

image
what am i missing out???

Stilll i am not able to load the products

Please try starting fresh, adding everything one at a time by following the instructions in the repo's readMe.

sure i will do that

but u dint say me..which exact url u r saying?
const FIREBASE_STORAGE_BUCKET = 'your_own_firebase_ storage_location_key';
where can i find it???

The storage bucket where you keep your images in Firebase storage.

You can try
credentials.dart file

const PLACES_API_KEY = 'Elaf__LIKE_YOUR_API_KEY_ajfl4jlafjjaljl';
const FIREBASE_STORAGE_BUCKET = "your_sorage_bucket.appspot.com"; ///(open your google_services.json file and see your_storage_bucket link. just copy it and places to FIREBASE_STORAGE_BUCKET )

Next create your cloud_functions and import.js file, Hit upload foodProducts.json file
##thanks to --thenifemi