musashi79uk Posted February 15, 2011 Share Posted February 15, 2011 Hi, I'm having problems with redirecting to an external website from the Product URL field on the Product Info page. The catalog/redirect.php is untouched - it's the one that originally came with OSC 2.2 rc2. I'm using STS for the template. When I create an item, the URL I enter is www.youtube.com/watch?v=tB-QGOChuQc The final URL I'm getting from the Product Info page is http://localhost/oscommerce22rc2a/catalog/redirect.php?action=url&goto=http://www.youtube.com/watch?v=tB-QGOChuQc&osCsid=jra27rj38hemhjmvvkd8h8s1v1 which appears to be right but this just redirects to my website's index page as opposed to opening the external link. Please could someone advise on how to correct this? Thanks in advance Carl Link to comment Share on other sites More sharing options...
mhsuffolk Posted February 15, 2011 Share Posted February 15, 2011 Hi I think you need to add this code in the product listing, it will produce an embedded player <p style="text-align: center;"><object height="295" width="480" id="VideoPlayback" data="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" type="application/x-shockwave-flash"> <param value="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" name="movie" /> <param value="sameDomain" name="allowScriptAcess" /> <param value="true" name="allowfullscreen" /> <param value="best" name="quality" /> <param value="#FFFFFF" name="bgcolor" /> <param value="noScale" name="scale" /> <param value="TL" name="salign" /> <param value="playerMode=embedded" name="FlashVars" /> <param value="transparent" name="wmode" /> </object><strong> </strong><strong> </strong></p> That was for 16:9 This is for 4:3 <p style="text-align: center;"><object height="385" width="480" type="application/x-shockwave-flash" data="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" id="VideoPlayback"> <param name="movie" value="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" /> <param name="allowScriptAcess" value="sameDomain" /> <param name="allowfullscreen" value="true" /> <param name="quality" value="best" /> <param name="bgcolor" value="#FFFFFF" /> <param name="scale" value="noScale" /> <param name="salign" value="TL" /> <param name="FlashVars" value="playerMode=embedded" /> <param name="wmode" value="transparent" /> </object><strong> </strong><strong> </strong></p> In BOTH places in either code replace the **** with the Youtube code e.g tB-QGOChuQc You can experiment with the height and width settings but they suit me Martin Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
musashi79uk Posted February 15, 2011 Author Share Posted February 15, 2011 Hi I think you need to add this code in the product listing, it will produce an embedded player <p style="text-align: center;"><object height="295" width="480" id="VideoPlayback" data="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" type="application/x-shockwave-flash"> <param value="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" name="movie" /> <param value="sameDomain" name="allowScriptAcess" /> <param value="true" name="allowfullscreen" /> <param value="best" name="quality" /> <param value="#FFFFFF" name="bgcolor" /> <param value="noScale" name="scale" /> <param value="TL" name="salign" /> <param value="playerMode=embedded" name="FlashVars" /> <param value="transparent" name="wmode" /> </object><strong> </strong><strong> </strong></p> That was for 16:9 This is for 4:3 <p style="text-align: center;"><object height="385" width="480" type="application/x-shockwave-flash" data="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" id="VideoPlayback"> <param name="movie" value="http://www.youtube.com/v/****&'&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2= 0x999999" /> <param name="allowScriptAcess" value="sameDomain" /> <param name="allowfullscreen" value="true" /> <param name="quality" value="best" /> <param name="bgcolor" value="#FFFFFF" /> <param name="scale" value="noScale" /> <param name="salign" value="TL" /> <param name="FlashVars" value="playerMode=embedded" /> <param name="wmode" value="transparent" /> </object><strong> </strong><strong> </strong></p> In BOTH places in either code replace the **** with the Youtube code e.g tB-QGOChuQc You can experiment with the height and width settings but they suit me Martin Thanks for replying but I just wanted it to redirect to the video on Youtube not embed it into the page. Link to comment Share on other sites More sharing options...
mhsuffolk Posted February 15, 2011 Share Posted February 15, 2011 No problem, but once they have gone to Youtube they may not return to you Here is how I use it Example Martin PS You will still be using YouTubes bandwidth Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
musashi79uk Posted February 15, 2011 Author Share Posted February 15, 2011 I would still like to just display an image and have the link open a new window to Youtube as I want it to slot into my layout. The code I am using is $template_pinfo['moreinfolabel'] = '<a href="$moreinfourl$" target="_blank"><img src="images/youtube.png" border="0"></a>'; The $moreinfourl$ above links to $template_pinfo['moreinfourl'] = tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false); This makes the URL look like http://localhost/oscommerce22rc2a/catalog/redirect.php?action=url&goto=www.youtube.com%2Fwatch%3Fv%3DtB-QGOChuQc&osCsid=jra27rj38hemhjmvvkd8h8s1v1 If I remove the "urlencode", the URL generated looks like http://localhost/oscommerce22rc2a/catalog/redirect.php?action=url&goto=www.youtube.com/watch?v=tB-QGOChuQc&osCsid=jra27rj38hemhjmvvkd8h8s1v1 Either way, the URL behaves the same - opens a new window and opens the index page of my website. Or could this be an issue with running the website from XAMPP as opposed to web hosting company? Below is how my layout is looking Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted July 6, 2011 Share Posted July 6, 2011 I Have the exact same issue - please let me know how you resolved it. for example. http://www.site.com all links are e nertered like www.yahoo.com I get this http://www.site/www.yahoo.com ..... Anyone?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.