How ndizigiye/drecomm_productvideo works
This Magento extension lets administrators attach video URLs to products or upload videos to YouTube, manage their status, and show product videos on the storefront. The admin controller owns save, delete, and status actions; its form and grid provide the management UI. Storefront blocks retrieve product-associated videos and support YouTube/Vimeo thumbnails, while the helper handles URL parsing and YouTube upload/deletion. The README is brief, and unsampled configuration/layout files suggest further Magento wiring, so those links are not asserted here.
Main entry points: Global.php Video helper · VideoController.php Video actions · Form.php Video form · Grid.php Video grid
Components 20
Admin management
- Video actions
app/code/community/Drecomm/ProductVideo/controllers/Adminhtml/VideoController.php - Edit container
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Edit.php - Video form
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Edit/Form.php - Video grid page
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video.php - Video grid
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Grid.php - Product tabs
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Tabs.php - Grid renderer
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Renderer.php - Upload form scripts
js/video/form.js
Video services
- Video helper
app/code/community/Drecomm/ProductVideo/Helper/Global.php - Gmail validation
app/code/community/Drecomm/ProductVideo/Model/GmailValidate.php - YouTube service
- Vimeo thumbnail API
Storefront display
- PrettyPhoto viewer
js/video/jquery.prettyPhoto.js - Product video block
app/code/community/Drecomm/ProductVideo/Block/VideoView.php - Video templates
app/design/frontend/base/default/template/video/video.phtml
Video persistence
- Video resource
app/code/community/Drecomm/ProductVideo/Model/Resource/Video.php - Video collection
app/code/community/Drecomm/ProductVideo/Model/Resource/Video/Collection.php - Video model
app/code/community/Drecomm/ProductVideo/Model/Video.php - Magento video table
Other components
- Store admin
Connections 24
- Store admin → Video actions: manages videos
app/code/community/Drecomm/ProductVideo/controllers/Adminhtml/VideoController.php - Video actions → Edit container: creates edit UI
app/code/community/Drecomm/ProductVideo/controllers/Adminhtml/VideoController.php - Video actions → Video model: saves and deletes
app/code/community/Drecomm/ProductVideo/controllers/Adminhtml/VideoController.php - Video actions → Video helper: uses upload features
- Edit container → Video form: renders
- Video form → Video helper: requests upload token
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Edit/Form.php - Video form → Video model: loads video
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Edit/Form.php - Video form → Upload form scripts: uses validation scripts
- Video grid page → Video grid: hosts grid
- Video grid → Video collection: queries product videos
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Grid.php - Video grid → Video actions: routes mass actions
app/code/community/Drecomm/ProductVideo/Block/Adminhtml/Video/Grid.php - Product tabs → Video grid page: adds product tab
- Grid renderer → Video grid: formats grid values
- Video helper → Video collection: checks video status
app/code/community/Drecomm/ProductVideo/Helper/Global.php - Video helper → YouTube service: uploads and deletes
app/code/community/Drecomm/ProductVideo/Helper/Global.php - Video helper → Vimeo thumbnail API: fetches thumbnails
app/code/community/Drecomm/ProductVideo/Helper/Global.php - Gmail validation → YouTube service: validates credentials
app/code/community/Drecomm/ProductVideo/Model/GmailValidate.php - Product video block → Video collection: loads product videos
app/code/community/Drecomm/ProductVideo/Block/VideoView.php - Product video block → Video helper: parses video IDs
app/code/community/Drecomm/ProductVideo/Block/VideoView.php - Video templates → Product video block: renders video data
- Video templates → PrettyPhoto viewer: opens video viewer
- Video resource → Magento video table: maps video table
app/code/community/Drecomm/ProductVideo/Model/Resource/Video.php - Video collection → Video resource: uses resource mapping
- Video model → Video resource: uses resource mapping