Download the PHP package mage2kishan/module-productgallery without Composer

On this page you can find all versions of the php package mage2kishan/module-productgallery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-productgallery

Magento 2 Product Gallery

Panth Product Gallery replaces the default image gallery on the Magento 2 product detail page with a gallery that is configured from the admin. It offers horizontal, vertical and grid thumbnail layouts, inner zoom on hover, a fullscreen lightbox with an image counter and keyboard navigation, and prev/next arrows on the main image. When the module is enabled, a plugin on Magento\Catalog\Block\Product\View\Gallery swaps the output of the standard gallery block for the module's own template; when it is disabled, Magento renders its default gallery again.

The module is aimed at merchants who want a different gallery layout on the product page without theme work. It ships two templates: one for Hyva (Alpine.js and Tailwind CSS) and one for Luma (vanilla JavaScript). The active theme is detected through Panth_Core and the matching template is selected automatically.

Product page: kishansavaliya.com/magento-2-productgallery.html

Features

Compatibility

Platform Versions
Magento Open Source 2.4.4 to 2.4.8
Adobe Commerce 2.4.4 to 2.4.8
PHP >= 8.1 (from composer.json)
Themes Hyva (Alpine.js template) and Luma (vanilla JavaScript template)

Composer constraints for Magento packages: magento/framework ^103.0, magento/module-catalog ^104.0, magento/module-store ^101.0, magento/module-backend ^102.0, magento/module-widget ^101.0, magento/module-config ^101.0.

Requirements

Installation

setup:di:compile is only needed in production mode. setup:static-content:deploy -f is listed because the module ships a LESS file under view/frontend/web/css/source/ for Luma.

Check that the module is enabled:

Configuration

Go to Stores > Configuration > Panth Extensions > Product Gallery. The section is also reachable from the admin menu under Panth Extensions > Product Gallery > Configuration. All settings can be set at default, website and store view scope.

General Settings

Setting Default What it does
Enable Module Yes Enables the gallery replacement. When set to No, the plugin and the collection observer do nothing and Magento's default gallery is shown.

Gallery Layout

Setting Default What it does
Thumbnail Layout Horizontal Thumbnails (Below Main Image) Chooses how thumbnails are displayed relative to the main image: horizontal strip below, vertical column on the left, or a grid with all images visible.

Zoom

Setting Default What it does
Enable Zoom Yes Enables inner zoom on hover over the main gallery image.

Lightbox

Setting Default What it does
Enable Lightbox Yes Opens a fullscreen lightbox when the main image is clicked.
Show Image Counter Yes Shows a "1 / 5" counter in the lightbox. Only shown when "Enable Lightbox" is Yes.
Keyboard Navigation Yes Enables arrow key and zoom key handling in the lightbox. Escape always closes the lightbox. Only shown when "Enable Lightbox" is Yes.

Navigation

Setting Default What it does
Show Navigation Arrows Yes Shows prev/next arrows (44 px tap targets) on the main image when the current image set has more than one image. Without infinite loop the arrow at either end is shown disabled.
Enable Swipe Yes Enables touch swipe navigation on the main image.
Infinite Loop No When Yes, prev/next wrap around from the last image to the first and back.

Design & Colors

This group has no fields. It explains that gallery colours and sizes come from etc/theme-config.json, which is registered with the Panth\Core\ViewModel\ThemeConfig view model from Panth_Core. The file defines CSS variables such as --gallery-primary, --gallery-thumb-active-border, --gallery-zoom-bg, --gallery-lightbox-bg and --gallery-border-radius, which are used by the Luma LESS file.

Config paths:

etc/config.xml also sets defaults that have no admin field and are read through Helper\Data: layout/thumb_position (bottom), layout/main_image_width and layout/main_image_height (700), layout/thumb_width and layout/thumb_height (72), layout/visible_thumbs (5), zoom/zoom_type (inner) and zoom/zoom_level (3, clamped to 2 to 5). The main image and thumbnail sizes, and the thumbnail width and height attributes, are taken from these values.

Default behaviour after installation: the module is enabled, the horizontal layout is used, zoom, lightbox, counter, keyboard navigation and arrows are on, and infinite loop is off.

Usage

On the product page, Plugin\HideDefaultGallery runs as an afterToHtml plugin on Magento\Catalog\Block\Product\View\Gallery. It acts only on the blocks named product.media (Hyva) and product.info.media.image (Luma), builds the image list for the current product, and re-renders the block with the module template. If the product has no enabled images, or rendering fails, the original gallery HTML is returned. No layout XML overrides are needed; the layout files shipped with the module are intentionally empty.

Layouts: the horizontal and vertical layouts show a main image with a strip of clickable thumbnails (below or on the left) and, optionally, arrows; thumbnails are only rendered when the product has more than one image. On Hyva the grid layout lists all images in a 2-column grid (3 columns from the md breakpoint) without a separate main image, and clicking a grid item opens the lightbox. On Luma the grid layout renders the same grid (2 columns on phones, 3 columns from 768 px) and rebuilds it when a swatch changes the images. Grid items are buttons when the lightbox is enabled, so they can be reached and opened with the keyboard. The vertical layout shows the thumbnail column on the left from 1024 px on Hyva and from 768 px on Luma; on narrower screens the thumbnails move below the main image. Thumbnails mark the current image with aria-current, and when a thumbnail or the main image has focus the arrow keys (plus Home and End on thumbnails) move between images. The main image is rendered by the server with its width and height attributes and fetchpriority="high", so it appears before JavaScript runs and does not shift the layout.

Zoom: while the cursor moves over the main image, the large image is shown scaled by the zoom level (3 by default) with the origin following the cursor. There is no lens or overlay zoom mode in the templates. Zoom only reacts to a mouse pointer and stops over the arrows, so taps on touch screens do not leave the image zoomed.

Lightbox: shows the large image size (product_page_image_large), the current position counter, prev/next arrows, zoom in/out buttons and a close button; clicking the backdrop closes it. On touch screens the image can be swiped left or right. The lightbox is a labelled dialog: focus moves to its close button, Tab stays inside it and focus returns to the main image on close; the main image itself opens the lightbox with Enter or Space. Keyboard handling is a keydown listener on the document that is only emitted when "Keyboard Navigation" is Yes. Escape closes the lightbox even when keyboard navigation is off, and the prev/next controls are hidden when there is only one image. The lightbox always wraps around at the ends regardless of the "Infinite Loop" setting, which only affects the main image navigation.

Templates can be overridden in a theme in the usual way by placing a copy under Panth_ProductGallery/templates/gallery.phtml or Panth_ProductGallery/templates/hyva/gallery.phtml. Both templates read their data from the block: panth_gallery_images, panth_gallery_config and panth_gallery_viewmodel (an instance of Panth\ProductGallery\ViewModel\Config), which the plugin sets before rendering.

Widget: etc/widget.xml declares the "Panth Product Gallery" widget backed by Block\Widget\Gallery, with a single "Template" parameter ("Default Gallery"). The block renders the gallery for the product currently in the catalog registry and outputs nothing when no product is loaded, so it is only useful on pages where a product is set.

Optional alt text integration: the alt and title of each image are read from getGalleryImagesJson() of the core Magento\Catalog\Block\Product\View\Gallery block (the caption and, when present, title keys). Plugin\HideDefaultGallery uses the gallery block it wraps; Block\Gallery creates a core gallery block for the current product. Any module that rewrites that JSON, for example an image SEO module with an after-plugin on getGalleryImagesJson(), therefore also changes the alt and title in this gallery. Without such a module the caption is the image label, or the product name when no label is set. If the JSON cannot be read or does not match the product's media gallery, the image label or product name is used.

Developer Notes

Uninstallation

The module creates no database tables. Values saved under panth_productgallery/* in core_config_data remain after removal and can be deleted manually if required.

Support

Documentation

See USER_GUIDE.md. It covers installation, verifying the module is active, configuration, gallery layouts, zoom, lightbox and navigation settings, widget usage, theme customization and troubleshooting.

License

Commercial software license. See LICENSE.txt in this repository.

Changelog

See CHANGELOG.md.

Links


All versions of module-productgallery with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
magento/framework Version ^103.0
magento/module-catalog Version ^104.0
magento/module-store Version ^101.0
magento/module-backend Version ^102.0
magento/module-widget Version ^101.0
magento/module-config Version ^101.0
mage2kishan/module-core Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mage2kishan/module-productgallery contains the following files

Loading the files please wait ...