Inserting Video Player Instead Of A Link

Hello,



I need to override the Preview file link in product_file.tpl with code that inserts a video player instead.



The link:



<a href=“{“orders.get_file?file_id=$file.file_id&preview=Y”|fn_url}”>{$file.file_name}



I can “force” it by changing the .tpl, but, that will get wiped out on a upgrade.



I have used addons/my_changes/ for CSS changes, but, I haven’t used it for a .tpl override. I have looked through the Doc, but, the pre, post, override naming has me at a lost.



Thank you.

Do you require the product to be purchased before the customer to get access to the video?

The Product is a downloadable file which is available only after successful payment …



The Product Preview is shown on the Product page as a link:



$file.file_id&preview=Y”|fn_url}”>{$file.file_name}



The link is in product_file.tpl … when the link is clicked, the Customer is prompted to download the Preview file.



I want to change this link to a Video Player which plays the Preview instead of downloading it. The Player will require some javascript to be added to the and the
link will change to

So the video preview is free to watch and is a separate video file from the download?

MP4?

[quote name='Entangled' timestamp='1412005146' post='193058'] Hello, I need to override the Preview file link in product_file.tpl with code that inserts a video player instead. The link: {$file.file_name} I can “force” it by changing the .tpl, but, that will get wiped out on a upgrade. I have used addons/my_changes/ for CSS changes, but, I haven't used it for a .tpl override. I have looked through the Doc, but, the pre, post, override naming has me at a lost. Thank you. [/quote]



To override default product_files.tpl, please create the following file:



[color=#008000][font=arial, verdana, tahoma, sans-serif]design/themes/YOUR_THEME/templates/addons/my_changes[/font][font=arial, verdana, tahoma, sans-serif]/[/font][/color][color=#ff0000][font=arial, verdana, tahoma, sans-serif]overrides/[/font][/color][color=#ff8c00][font=arial, verdana, tahoma, sans-serif]views/products/components/[/font]product_files.tpl[/color]



Hope that helps.

That should do it … thank you.

Well, I thought that would do it … it didn't … I failed to mention, I need to override product_files.tpl in V3 … I copied the original to:



skins/THEME_NAME/customer/addons/my_changes/overrides/views/products/components/product_files.tpl



and simply added “OVERRIDE” to the link statement … cleared cache … it didn't show up next to the file_name. I did the same to the original file and it worked.



So obviously, I have the changed product_files.tpl in the wrong place or have it named wrong.



I appreciate the help.

[quote name='Entangled' timestamp='1412144081' post='193169']

Well, I thought that would do it … it didn't … I failed to mention, I need to override product_files.tpl in V3 … I copied the original to:



skins/THEME_NAME/customer/addons/my_changes/overrides/views/products/components/product_files.tpl



and simply added “OVERRIDE” to the link statement … cleared cache … it didn't show up next to the file_name. I did the same to the original file and it worked.



So obviously, I have the changed product_files.tpl in the wrong place or have it named wrong.



I appreciate the help.

[/quote]



It should work. Make sure that the new file has 777 permissions.

Should work vs does work are two different things … again, I am running CS-Cart V3. Here's the path:



skins/THEME_NAME/customer/addons/my_changes/overrides/views/products/components



The permissions were 666 … they are now 777:



-rwxrwxrwx 1 OWNER GROUP 953 Oct 1 00:39 product_files.tpl



And here's the change:



$file.file_id&preview=Y”|fn_url}”>{$file.file_name} Override



If I make the same change to:



skins/THEME_NAME/customer/views/products/components/product_files.tpl (it has 666 permissions)



it works …



Is the path to the changed product_files.tpl correct?

Do you use professional version, not ultimate?

Yes, CS-Cart V3 Pro with a purchased theme, but, that shouldn't matter … maybe the theme guys dinked with the core causing .tpl overrides not to work, but, why would they do such a thing?

[quote name='Entangled' timestamp='1412291273' post='193308']

Yes, CS-Cart V3 Pro with a purchased theme, but, that shouldn't matter … maybe the theme guys dinked with the core causing .tpl overrides not to work, but, why would they do such a thing?

[/quote]



Unfortunately we cannot answer on your question without additional examination of the 3rd party theme.