# FAQ's (Frequently Asked Questions)

### 1. How to add Firebase configuration?

Open `/src/environments/environment.ts` and add your Firebase configuration:

{% code title="environment.ts" %}
```
export const environment = {
  production: false,
  firebase: {
    apiKey: '<your-key>',
    authDomain: '<your-project-authdomain>',
    databaseURL: '<your-database-URL>',
    projectId: '<your-project-id>',
    storageBucket: '<your-storage-bucket>',
    messagingSenderId: '<your-messaging-sender-id>'
  }
};
```
{% endcode %}

### 2. Getting started with Algolia Registration and process.&#x20;

**Algolia** is a hosted full-text, numerical, and faceted search engine capable of delivering real-time results from the first keystroke.

1. Create an account on [Algolia](https://www.algolia.com/users/sign_up).&#x20;
2. &#x20;After Signup you are get the 14 days trial and also you can update the plans. **Reference Link :** [https://www.algolia.com/pricing](https://www.algolia.com/pricing)
3. Create an Index on Algolia Dashboard. \
   **Reference Link** :- [https://www.algolia.com/doc/guides/indexing/indexing-overview/#indexing-via-the-dashboard](https://www.algolia.com/doc/guides/indexing/indexing-overview/#indexing-via-the-dashboard)
4. Add your products fields with values under the Index.
5. Use the Algolia api key on your app and get the result.\
   Go to the src -> app -> pages -> Products -> ProductsList folder and open the ProductsList.component.html file.

{% code title="ProductsList.component.html" %}
```
<ais-instantsearch
    [config]="{
      appId: '<appId>',
      apiKey: '<apiKey>',
      indexName: '<indexName>'
    }">
</ais-instantsearch>
```
{% endcode %}

**Reference Like** : [https://community.algolia.com/angular-instantsearch/getting-started.html](https://community.algolia.com/angular-instantsearch/getting-started.html)

### 3. How to add more **Currency in Embryo?**

Go to the src -> app -> Global -> CurrencyDropDown folder and open the CurrencyDropDown.component.ts file. &#x20;

For example add a **France** currenc&#x79;**.** Add a object under the currencyArray like this :&#x20;

{% code title="CurrencyDropDown.component.ts" %}
```
currencyArray : any = [
      {
         code:"USD",
         name:"United States Doller",
         image:"assets/images/united-states.png"
      },
      {
         code:"EUR",
         name:"France",
         image:"assets/images/france.png"
      }
   ]
```
{% endcode %}

Get the currency code for this URL :- [https://en.wikipedia.org/wiki/ISO\_4217](https://en.wikipedia.org/wiki/ISO_4217)

#### Add a default currency in Embryo.&#x20;

Go to the src -> app -> Services folder and open Embryo.service.ts file.&#x20;

{% code title="Embryo.service.ts" %}
```
currency  : string = 'EUR';
```
{% endcode %}

### 4. How to add new menu in header and responsive sidebar **follow these steps:-**

1. Go to the src -> app -> Core -> menu -> menu-items folder and open the menu-items.ts file.
2. Add new object in the HeaderOneItems For example

{% code title="menu-items.ts" %}
```
const HeaderOneItems= [
  {
    state: "home",
    name: "HOME",
    type: "link",
    icon: "home"
  },
  {
    state: "",
    name : "SHOP",
    type: "sub",
    icon: "pages",
    children: [
      {  
        state: 'products/men/4', 
        name: 'PRODUCT DETAILS',
        type: 'link',
        icon: 'arrow_right_alt'
      },
      {  
        state: 'cart', 
        name: 'CART',
        type: 'link',
        icon: 'arrow_right_alt'
      },
      {  
        state: 'checkout', 
        name: 'CHECKOUT',
        type: 'link',
        icon: 'arrow_right_alt'
      },
      {  
        state: 'checkout/payment', 
        name: 'PAYMENT',
        type: 'link',
        icon: 'arrow_right_alt'
      }
    ]
  }
]
```
{% endcode %}

### 5. How I can disable the FIREBASE?

Follow these instructions to disable the firebase:-

1. Remove the firebase from the configuration src -> environments -> environment.ts

![](https://155188374-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNs6RvaAolHRJ3mnLo4%2F-LO3GH53Apv8A4M1-7HR%2F-LO3FU9KpDwYLVzu0cwP%2Fenvironments.png?alt=media\&token=33648719-e577-4452-a560-a17a818f6f6e)

2\. Remove the firebase code from module src -> app -> app.module.ts.

![](https://155188374-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNs6RvaAolHRJ3mnLo4%2F-LO3KKnZVUatSrRUeLMn%2F-LO3KQF1a_2llhvNXvCd%2F2018-10-05_1758.png?alt=media\&token=6de6cb5e-a927-470a-ba3b-51adeb836145)

![](https://155188374-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNs6RvaAolHRJ3mnLo4%2F-LO3KKnZVUatSrRUeLMn%2F-LO3KeA1Mva4RvrNTaxT%2F2018-10-05_1759.png?alt=media\&token=abbc3acb-b41e-48bf-8d10-f82e5c5295f8)



3\. Go to the src -> app -> Services -> Embryo.service.ts.  and remove firebase function and database from the file.

{% hint style="info" %}
Note:&#x20;

For understanding and using firebase json data structure(format ) please go to the following path.

&#x20;src -> assets -> data -> firebase.json

&#x20;
{% endhint %}

