Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

simple solution to add youtube video

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 08-22-2008, 08:01 PM
 
rick2003 rick2003 is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default simple solution to add youtube video

Hey, this is the simple mod, i have done to add youtube video.

going to the admin area, under products -> extra field

Add one field, name it "Video Link" service name Video_link, and the default value as "There is no video related to this product yet."

if you go the the product modify page in admin, in the last row you will find entry called Video link

under skin1/customer/main/ , creat a new *.tpl called video.tpl

add the code below:

Quote:
{* $Id: product_images.tpl,v 1.16.2.1 2006/05/18 08:02:40 max Exp $ *}
{capture name=dialog}
<center>
{section name=field loop=$extra_fields}
{if $extra_fields[field].active eq "Y" && $extra_fields[field].field_value}
{$extra_fields[field].field_value}
{/if}
{/section}
</center>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_video content=$smarty.capture.dialog extra='width="100%"'}

And then go to skin1/main/product.tpl, After
Quote:
{include file="modules/Detailed_Product_Images/product_images.tpl" }
{/if}

add following code:

Quote:
{if $active_modules.Extra_Fields ne ""}
<p />
{include file="customer/main/video.tpl"}
{/if}

now the mode is complete, whenever you have upload video from youtube, copy the javascript code, and paste it into the video link field in the admin area under product modify.

at last, go into your database, change extra field from char to text.
See the result: www.lywoo.com

video at http://www.lywoo.com/product.php?productid=291&cat=40&page=2
__________________
Version 4.1.9
Highly Modified X-cart

www.lywoo.com
Reply With Quote
  #2  
Old 08-23-2008, 12:09 AM
  WhiteDoveGifts's Avatar 
WhiteDoveGifts WhiteDoveGifts is offline
 

X-Adept
  
Join Date: Oct 2006
Location: Maarssen, The Netherlands
Posts: 474
 

Default Re: simple solution to add youtube video

Nice mod! Kudos for you
__________________
____________________________
X-Cart Gold 4.1.10

EWD Hosting | CDSEO Pro | One Page Checkout | Smart Search | Telafirma Dynamic Images | X-AOM | Product Importer Pro and many custom mods and tweaks found here...
Reply With Quote
  #3  
Old 03-04-2009, 04:19 PM
 
giftsngadgets giftsngadgets is offline
 

Newbie
  
Join Date: Jan 2009
Posts: 7
 

Default Re: simple solution to add youtube video

Hello
When I add {if $active_modules.Extra_Fields ne ""}
<p />
{include file="customer/main/video.tpl"}
{/if}
to product.tpl
and click 'save'
I get
'File Operation is Failed' message
__________________
www.giftsngadgets.com.au
www.photoforum.com.au
Reply With Quote
  #4  
Old 03-04-2009, 04:19 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: simple solution to add youtube video

Really need to know what version you are using to be able to help you - please update your signature with that info. Thank you!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 05-06-2009, 07:20 AM
 
Lanni Lanni is offline
 

Newbie
  
Join Date: May 2009
Posts: 1
 

Default Re: simple solution to add youtube video

[
at last, go into your database, change extra field from char to text.



sorry how do you change this in C.panel, i have done everything else fine but I dont know my way around php admin very well...great site by the way!
__________________
Version 4.1.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:19 PM.

   

 
X-Cart forums © 2001-2020