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

[Solver] Slideshow and menu do not work in mobile

Hi Everyone. If you got error with your site: Can not show LeoSlideShow via Appagebuilder. …

Leave a Reply

Your email address will not be published. Required fields are marked *