How do I call recently viewed products, top selling products, most viewed products, featured products, into my module?
I'm working on building a completely open-source boilerplate theme module for Odoo 8.0 that will feature a number of useful e-commerce features for B2B and B2C users out of the box. I'm trying to figure out how to pull certain lists/values from the database such as the following:
- Recently viewed products (by the current user)
- Top selling products (pulled from sales reports for that company/website)
- Most viewed products (for product pages most often viewed overall)
- Featured products (I think this can be acommplished in a similar manner to 'alternative products')
- Products on sale (check all products that are on special as compared to the list price for that customer)
- BOM Products (eg. parts connected to a given product that are published on the frontend)
however I am not sure where to start with a few of these (eg. recently viewed products for current user). Has anyone else figured out how to implement any of these?
I'm looking to build a few views for each item such as a slider using Owl Carousel (http://owlgraphic.com/owlcarousel/index.html), tabbed views, and normal list and grid views and will be building them into a module. Building the views is not a problem, however I am a little lost when it comes to calling some of this data/lists from the database or user's session data.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 10/25/14, 6:32 AM|
|Seen: 1144 times|
|Last updated: 3/16/15, 8:10 AM|