feat: Add YouTube video support and update admin templates
- Introduced a new YouTube tech integration in `youtube.min.js` for enhanced video playback. - Created new admin template files for managing video settings, including `index.php` and `steasyvideo-pro.tpl`. - Updated hook templates (`device_mode.tpl`, `forquickview.tpl`, `header.tpl`, `miniature.tpl`, `miniature_tb.tpl`, and predefined templates) to include video functionality. - Implemented caching headers in several PHP files to improve performance. - Ensured all new templates include proper licensing information and copyright notices.
This commit is contained in:
22
modules/steasyvideo/controllers/front/ajax.php
Normal file
22
modules/steasyvideo/controllers/front/ajax.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*/
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class StEasyVideoAjaxModuleFrontController extends ModuleFrontController
|
||||
{
|
||||
public function initContent()
|
||||
{
|
||||
$id_product = (int)Tools::getValue('id_product');
|
||||
$product = new Product($id_product, false, Configuration::get('PS_LANG_DEFAULT'), $this->context->shop->id);
|
||||
$video_data = $this->module->getVideosByProduct($product);
|
||||
ob_end_clean();
|
||||
header('Content-Type: application/json');
|
||||
die(json_encode($video_data));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user