Home / Prestashop Module Tutorials / Ap Page Builder / Ap Page Builder Tutorial: Create Field to Insert Youtube Video in Product page
Create field to insert Youtube video in Product Page
Create field to insert Youtube video in Product Page

Ap Page Builder Tutorial: Create Field to Insert Youtube Video in Product page

Hi

I will guide you on how to insert youtube video in the product page of Ap Pagebuilder Prestashop Module.

Step 1:

Access back-office > Ap PageBuilder > Ap Module Configuration.

Create a new field with text: video

Step 2:

Access file /modules/appagebuilder/appagebuilder.php

find  function hookActionObjectProductUpdateAfter

in this function find the code

$form = Tools::getValue(‘form’);

replace it to

$form = $_REQUEST[‘form’];

i don’t know why prestashop can not get form with function Tools::getValue.

I can not edit it to $_REQUEST[‘form’] because i have to validate this module to upload to addon

Step 3:

access product you want to insert video and input video code

Step 4:

find code in tpl file

FInd all file tpl with code product_description_short

then add this code like my image.

I use code src=”https://www.youtube.com/embed/{$product.video} for video

About Leo Theme

Check Also

Leotheme Black Friday 2022

Prestashop Theme and Module Black Friday and Cyber Monday Sales Leotheme 2022 30% Off

Prestashop Leotheme Black Friday 2022 Promotion! Dear valued customers, Black Friday and Cyber Monday Sales …

Leave a Reply