Book Image

Magento 2 Development Cookbook

Book Image

Magento 2 Development Cookbook

Overview of this book

With the challenges of growing an online business, Magento 2 is an open source e-commerce platform with innumerable functionalities that gives you the freedom to make on-the-fly decisions. It allows you to customize multiple levels of security permissions and enhance the look and feel of your website, and thus gives you a personalized experience in promoting your business.
Table of Contents (13 chapters)
12
Index

Finalizing the theming


The frontend representation of the widget that we just created is not something that invites people to buy some products. It is just a list of the product names for a given category.

The last step of this chapter is to finalize the theming of the widget. We will create an HTML output that shows an image, name, and price of the given products.

With a jQuery plugin, we will convert the HTML output to a slider, so we can scroll through the products.

Getting ready

On the Internet, there are a lot of good JavaScript carousel plugins. In this recipe, we will use the following:

http://kenwheeler.github.io/slick/

For the code, we will build further on the things that are created in the previous recipes of this chapter. Ensure that you have the right files installed.

How to do it...

In the following steps, the last actions are described to complete the widget with a good-looking carousel:

  1. The first thing is to generate a good HTML output that is usable for the jQuery plugin. Add the...