Adding video on product page PrestaShop


In this short tutorial we will show you how to add YouTube video to a description (product, cms) section in PrestaShop. This time no ftp client or code editor is required. We will make changes on PrestaShop 1.7 but similar effect can be reached on PrestaShop 1.6.
prestashop wideo


First of all log into PrestaShop administration panel and go to Preferences->General. Switch option “Allow iframes on HTML fields” and “Use HTMLPurifier Library” to No. Click Save button.

prestashop video

Now navigate to place where you want to insert your YouTube video. We will go to one of products description. Click “edit” and find description section with icon representing source code.

prestashop video

After clicking it you will see a pop up window with a html code.
prestashop video

In a separate browser card go to youtube and find a video witch you want to be embedded. Right click on it and choose “Copy embeded code”.

prestashop video

Go back to PrestaShop administration panel and paste YouTube code into products description source code. Remember to save everything.

We are almost done, but you can play with some settings. First of all you can try to make your video “more” responsive. To do so you can set width=”100%” and height=”auto”. If result does not suits you, you can try some additional solution here and here or you can play with height settings (height=”300”). You can also switch off default autoplay option by deleting it.

<iframe width="1280" height="720" src="https://www.youtube.com/embed/-m_HB1_2Bek" frameborder="0" allow="encrypted-media"></iframe> 


 

In order to ensure maximum convenience to users when using the website, this page uses cookie files. Detailed information is available in our Privacy Policy. Click " I agree", so that this information is no longer shown