Creating the size guide

We have been asked to add a functionality that shows the size guide on a product view page. This is to appear as a new tab next to the existing Details, More Information, and Reviews tabs. The content of the size guide tab is to be the same for all products containing the size attribute. We also need it to be editable from Magento admin.

Let's take a moment to think about our approach here:

  • To be the same for all products and editable from Magento admin needs the CMS block
  • The CMS block needs setup script for creating the size guide block
  • To Appear as a new tab next to the existing tabs requires a catalog_product_view.xml layout update

Assuming we have defined registration.php, composer.json, and etc/module.xml

Get Magento 2 Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.