Categories
CMS Magento Mastering Development

Update Magento2 Catalog Images on Swatch Selected

Basically i written my own gallery page so when ever a configurable product with color swatches is available , it is not showing different color images when user selects that particular swatch. <?php /** * * */ /** * Product media data template * * @var $block */ $gallery_images = json_decode($block->getGalleryImagesJson()); $_product = $block->getProduct(); $videoFile=$_product->getData(‘agreement_file’); […]

Categories
Development

Save/cancel prompt before closing modal (when modal has been closed by ESC/ click-backdrop)

When manually closing the modal, there is no problem. I simply create some prompt, and only when the prompt (sweetalert) is closed, i call the BsModalRef.hide() method. Now when the modal is being closed by bootstrap-built-in ESC-key and click-outside events, i can still subscribe to the BsModalService.onHide-event. But I dont know how to prevent the […]