The Client had a requirement to add an additional functionality to their website which is to show “Frequently bought products”. The client wanted us to show those products at the bottom of the shopping page which were most frequently bought by customers and sort them as per the quantity bought previously.
Solution / Approach:
Following technologies have been used to implement this additional functionality:
- Python for backend logic writing.
- XML for view.
Firstly, Snippet has been created with the help of XML for frontend view. Snippet is a technical term for a minor region of re-usable source code or machine code. For the website functionality, i.e. showing products at the bottom of the shopping page which were often bought by customers, Controllers were created which were written in Python. ‘Controllers’ are used to configure the frontend modules. These frontend modules come integrated with the backend modules.
There are various building blocks available for the product description and window customization which can be done by the user, based on the block operations, style and the options. Few of the options which are already available are Viewed Products, Products Search, Popup, Facebook, Form, Countdown, Google Map, Dynamic Products, etc.
So, a customized building block named “Frequently bought products” was developed. With the help of this building block users can simply drag and drop the block to the website and add quick functionality for the website.
With the help of XML a customized Toggle was also created which is shown on the top of the website page (Page, Customize, Promote). On clicking the customize button various toggle options are shown. So by turning the Frequently bought products toggle option on, Frequently bought products are added to the website.
Following is the screenshot of the website where the Frequently Bought Products are shown. These are the recently purchased products sorted by the mostly(quantity) purchased products showing first. Odoo Admins can show/hide this “Frequently Bought Products” block on screen by dragging it from the building block and also can control this block by the toggle option provided under Customize button.
For any query, contact email@example.com.