web counter

Sunday, December 19, 2021

Multiple Odoo with Single Vue Storefront at geminate consultancy Services

 

Odoo Mudule for Vue Storefront

Geminate comes with the advanced feature of "Multiple Odoo Instances" connection with "Single Vue Storefront" which provides a lot of flexibility and saves a lot of server cost and maintenance effort as we dont need to maintain multiple vue storefront instances for multiple odoo servers. so no more one to one connection between single odoo and single vue storefront, enjoy the power of multiple audio with single vue storefront with Geminate Connector .

Why Odoo?

Odoo is unusual among eCommerce integration options in that it offers ERP, eCommerce, and CMS functionality without the need for extra software. Odoo is a suite of open-source Odoo Integration business software that address all of a company's needs, according to its official website: CRM, eCommerce, accounting, inventory, point of sale, project management, and so on. Overall, Odoo's distinct value proposition is that it is both simple to use and completely integrated.


Why Vue Storefront?

Vue Storefront provides a user experience that is similar to that of a native mobile app:


  • A look and feel that is consistent with the platform's native appearance and feel, which means:

  1. On the home screen, there is an app icon.

  2. The app can operate in full screen mode.

  • Because the app caches layouts and content, loading times are reduced after the Service Workers are installed. The mobile app strives to respond to user input as quickly as possible, avoiding the use of the internet as much as feasible.

  • Push notifications can be used to re-engage users.


Vue Storefront eliminates the hassle of maintaining multiple native development projects — for example, one for Android and one for iOS – by providing a single platform that reduces development expenses. Furthermore, by allowing Server-Side Rendering for the first webpage load, we can emphasize the importance of SEO in the eCommerce market and provide a solution that can be crawled by search engines.


Changing Vue Storefront's default architecture


Vue Storefront's architecture incorporates a NoSQL/ElasticSearch database back-end by default. However, the recommended architecture for this project eliminates the Elastic Search data store in favor of directly integrating the front-end with the Odoo back-end to prevent the maintenance of two different data stores. As a result, the new architecture is built on the idea that the front-end should be able to crawl the Odoo back-end API directly, as shown in the picture below.


Search Adapter


The magnificence known as Search Adapter is a client-facet code that's accountable of retrieving the subsequent information from the back-end:


  • Product

  • Attribute

  • Category

  • Tax rule

As a result, this elegance is accountable of loading the product list that looks on the house display and class pages, now no longer handiest while the consumer makes a search. While the default Search Adapter supplied through Vue Storefront retrieves statistics from the ElasticSearch back-cease, this venture makes use of a RESTful API the use of JSON layout as back-end.


Changes that should be completed to be able to obtain an operating verbal exchange among the front-end and the Odoo back-end are available in this repo:


Odoo module

The API improvement of this assignment is packaged as an Odoo module, which consists through the subsequent elements:


  • Controllers

  • Business objects

  • Data files

  • Static web data


Controllers

They are declared as Python training that cope with requests with the aid of using extended the Controller magnificence from odoo .http package. In the case of this project, there are 3 Controllers:


PublicAPIController

  • Handles requests which do now no longer use person authentication.

  • Examples: retrieve products, signal up, etc.


PrivateAPIController

  • Handles requests which could use consumer authentication (it is able to both be required or optional).

  • Examples: upload product to cart, edit profile, etc.

TokenAPIController

Handles requests approximately producing or invalidating authentication tokens. It gets the credentials of the user – electronic mail and password – after which returns the computed token.


Business objects

They are declared as Python training extending Model elegance from odoo. Fashions package deal, which integrates them into the automatic patience system (database). In the case of this project:

• AccessToken is a brand new version created to encapsulate the attributes of every authentication token, which includes its lifetime and the associated user.
• User version has been explicitly created with the intention to increase the present User version to feature the associated identity tokens.

Data files

In the case of this project, it is composed in an XML record affirming configuration data (module parameterization). It is named "ir_config_param.xml" inner the "data" folder and consists of a parameter, that's the wide variety of seconds of life of the authentication token.


Static web data

They are static assets, which include images, CSS documents or JavaScript documents that may be utilized by the internet interface or Odoo website. In the case of this project, they may be placed interior the "static" folder, which incorporates the "description" assets, which can be used to show the module inside the Odoo management panel.


Installation of the Odoo module

  1. odoo-addons - modules you need for Odoo;
    • packages/api-client - communicates with a backend;
    • packages/composables - exposes composable functions used to retrieve data using api-client and to map them to universal data formats using getters;
    • packages/theme - nuxt project that glues everything together. It extends our core theme and uses composables to retrieve data.

Installation of Vue Storefront

Note that the Odoo module just includes the needed API.:

Remember to set useExactUrlsNoProxy to true, if you are not using ImageMagick or similar.In order to set up a production environment, it is recommended to follow this instruction. Otherwise, in case you are just developing, just run yarn in order to install the dependencies and then yarn dev in order to compile and run the front-end in your browser.

For further installation support and procedure, please get in touch on contact@geminatecs.com


Compatibility

  • Odoo v13

  • Vue Storefront v1.9.2

1 comment:

  1. Really good work there. Informative and helpful. Appreciate it. But might be looking for Odoo eCommerce Development Company in California

    ReplyDelete

Need to Know About ODOO APPS for Mobile ERP

Portability and approachability are critical parts of the modern planet. Mobile phones are individual of the devices used to approach this c...