Functional description
Widgets
Widgets are displayed on all product pages and may be displayed in the user account: My shop / Models, placed below the corresponding product thumbnails.
Their objectives are to count and display the results.
Widget « Likes »:
This widget consists of three elements:
- « Heart » pictogram (on-off) can take different states described in the appendice - slide 3 An unregistered user clicking on this pictogram is sent to the authentication/registration page before being redirected to the product page – pictogram state: active.
- If the "heart" pictogram in its active state is clicked, it results in disabling it.
- The activation / deactivation of the pictogram updates accordingly the CustomerLike table.
- « Heart » pictogram (analytics) Hoverded, it displays the tooltip: "Like(s)" in the current language.
- « Likes » counter The instant likes counter are displayed under the "heart" (analytics) pictogram. This counter indicates the number of "heart" (on-off) pictograms activated by users and evolve over the course of activation (increases the counter) and deactivation of the pictogram (decreases the counter). Like numbers is computed from the CustomerLike table.
Widget « Downloads »:
This widget consists of two elements:
- "Downloads" pictogram (analytics) Hoverded, it displays the tooltip: "Download(s)" in the current language.
- "Downloads" counter The instant downloads counter is displayed under the "downloads" (analytics) pictogram. This counter indicates the number of products downloaded. It increases after each download if it is a free product or after each purchase (confirmation of payment) if it is a paying product. Events (in nopCommerce meaning) indicating that a command has been paid or amended after payment (refund, etc. ....) is listened to maintain the download counter stored in the ProductExt table.
Widget « Views » :
This widget consists of two elements:
- "Views" pictogram (analytics) Hoverded, it displayes the tooltip: "View(s)" in the current language.
- "Views" counter The "views" counter instantly track the number of views in the product page. The "views" counter evolves according to the loading of the product page. Views counter is stored in the ProductExt table.
Widget « Comments » :
This widget consists of two elements:
- "Comments" pictogram (analytics) Hoverded, it displays the tooltip: "Comment(s)" in the current language.
- "Comments" counter The "comments" counter instantly count the number of comments in each product page. The "comments" counter evolves each time a new comment is written. Comments number is computed from the ProductReview table.
Configuration interface
The configuration interface lets specify the following information:
- Place of the analytic widgets on the product page by means of a text field. - Place of the analytic widgets on the My Shop / Models page (user account) by means of a text field.
If a field is left blank, the widgets isn’t displayed.
Storage
Information needed to run the plugin is stored in two tables:
ProductExt
- Id
- ProductId (product id)
- DownloadsCount (number of downloads)
- ViewsCount (number of views)
The record associated to a product is created on first use (reading or updating) if it doesn’t exist.
CustomerLike
- Id
- CustomerId (customer id)
- ProductId (product id)
The above tables are neither created nor destroyed during the installation or uninstallation of the plugin. If the tables or one of its field is missing during the installation, an error message is displayed.