定制 amadeco/module-quickview 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amadeco/module-quickview

最新稳定版本:v2.0.1

Composer 安装命令:

composer require amadeco/module-quickview

包简介

Magento 2 module for quick product preview without page reloading. Fully configurable, compatible with all product types and optimized for performance.

README 文档

README

Latest Stable Version License Magento PHP

SPONSOR: Amadeco

A highly configurable QuickView module for Magento 2 that allows customers to quickly preview product details without leaving the current page. Engineered for performance and strict adherence to modern Magento coding standards.

Features

  • Performance Optimized: Implements IntersectionObserver for lazy loading of QuickView buttons, reducing initial DOM impact.
  • Modern Architecture: Built on PHP 8.3 using strict typing, constructor promotion, and readonly properties.
  • Broad Compatibility: Supports all product types (Simple, Configurable, Grouped, Bundle, Downloadable, Virtual).
  • AJAX-Powered: Fast loading of modal content.
  • Fully Responsive: Adapts seamlessly to mobile and desktop viewports.
  • Theme Friendly: Extensive configuration options to target specific CSS selectors.
  • Seamless Integration: "Add to Cart" functionality without page reload.

Requirements

  • Magento: 2.4.6+ (Tested on 2.4.8)
  • PHP: 8.3 (Strict Requirement)
  • jQuery: (Included in Magento)

Installation

Using Composer (Recommended)

composer require amadeco/module-quickview
bin/magento module:enable Amadeco_QuickView
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy

Manual Installation

  1. Create directory app/code/Amadeco/QuickView in your Magento installation.
  2. Clone or download this repository into that directory.
  3. Enable the module and update the database:
bin/magento module:enable Amadeco_QuickView
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy

Configuration

Navigate to Stores > Configuration > Amadeco > Quick View.

  1. General Settings:
  • Enable/Disable the module.
  • Elements Selector: Define which product container triggers the button initialization (default: .product-item).
  • Button Container: Specify where to inject the button (default: .product-item-info).
  • Button Label: Customize the text (e.g., "Quick View").
  1. Modal Settings:
  • Set Modal Title.
  • Toggle visibility for Product Details, Reviews, and Downloadable Samples.
  • Enable/Disable "Go to Product" button.
  1. Theme Selectors:
  • Customize CSS selectors for Tabs and Review links to match your theme's structure.
  1. HTML Identifiers Replacement:
  • Advanced configuration to swap HTML IDs or Classes dynamically within the modal to prevent conflicts with the main page.

Customisation

The module is designed to be highly customizable. You can configure almost all behavior via Magento's Layout XML system, avoiding the need to write custom JavaScript for simple configuration changes.

Customizing via Layout XML (Recommended)

To change options like selectors, labels, or disable lazy loading, extend the layout in your theme (e.g., app/design/frontend/Vendor/Theme/Amadeco_QuickView/layout/default.xml).

Target the amadeco.quickview.init block and define arguments in jsLayout:

<?xml version="1.0"?>
<page xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="amadeco.quickview.init">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="lazy" xsi:type="boolean">false</item>
                    
                    <item name="modalTitle" xsi:type="string" translate="true">Fast Preview</item>
                    
                    <item name="selectors" xsi:type="array">
                        <item name="btnContainer" xsi:type="string">.custom-photo-container</item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

CSS Customization

The module includes minimal styling. You can extend the styling in your theme by targeting these classes: CSS

.quickview-button       /* The trigger button */
.quickview-wrapper      /* The main modal wrapper */
.quickview-media        /* Left column (Images) */
.quickview-main         /* Right column (Details) */

Contributing

Contributions are welcome! Please read our Contributing Guidelines.

Support

For issues or feature requests, please create an issue on our GitHub repository.

License

This module is licensed under the Open Software License ("OSL") v3.0. See the LICENSE.txt file for details.

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2025-03-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固