How mekkumar/module-drag-actions works
Kumar_DragActions is a Magento 2 storefront extension for drag- and swipe-based product actions. Customers discover a product through the floating interface, choose an action, optionally configure eligible products, and submit it to a controller that invokes Magento’s cart, wishlist, or compare functionality. The README documents layout injection, frontend rendering, admin controls, and the supported action flows. The sampled sources confirm controller dispatch and configuration rendering; unsampled layout, templates, and settings are represented only where documented, so some links cite the README.
Main entry points: Execute.php Action endpoint · drag-actions.js Drag and swipe UI · DragActions.php Action block · Configure.php Configure endpoint
Components 16
Storefront interaction
- Layout injection
view/frontend/layout - Action block
Block/DragActions.php - Action templates
view/frontend/templates - Drag and swipe UI
view/frontend/web/js/drag-actions.js - Overlay styling
view/frontend/web/css
Product configuration
- Configure endpoint
Controller/Product/Configure.php - Configuration block
Block/Product/Configure.php - Configuration form
view/frontend/templates/product/configure.phtml
Action processing
- Action endpoint
Controller/Action/Execute.php
Admin settings
- Admin configuration
etc/adminhtml/system.xml - Settings helper
Helper/Data.php
Other components
- Storefront customer
- Product repository
- Magento cart
- Magento wishlist
- Magento compare
Connections 16
- Storefront customer → Drag and swipe UI: uses
README.md - Layout injection → Action block: injects
README.md - Action block → Action templates: renders
README.md - Action templates → Drag and swipe UI: initializes
README.md - Drag and swipe UI → Overlay styling: shows overlay
README.md - Drag and swipe UI → Configure endpoint: requests configuration
view/frontend/web/js/drag-actions.js - Configure endpoint → Product repository: loads product
Controller/Product/Configure.php - Configure endpoint → Configuration block: creates block
Controller/Product/Configure.php - Configuration block → Configuration form: renders
- Drag and swipe UI → Action endpoint: submits action
README.md - Action endpoint → Product repository: loads product
Controller/Action/Execute.php - Action endpoint → Magento cart: adds or removes
Controller/Action/Execute.php - Action endpoint → Magento wishlist: saves item
Controller/Action/Execute.php - Action endpoint → Magento compare: adds product
Controller/Action/Execute.php - Admin configuration → Settings helper: configures
README.md - Action block → Settings helper: reads settings
Block/DragActions.php