Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Flash Header


Guest

Recommended Posts

Trying to put my flash header from my current website into my new oscommerce store.

 

I assumed that i put the code into the header.php file

 

I copied the code directly from the html from my other page and pasted it into the header at the appropreate location. Following is the code.

 

My problem is that when the page loads everything loads but my flash header. The flash player loads which you can see when you right click (flash options appear) but nothing ever shows up it continuously loads.

 

Is there another file I am supposed to be modifying aswell?

 

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="780" height="259">

<param name="movie" value="/flash/0354-ih.swf">

<param name="quality" value="high">

<embed src="/flash/0354-ih.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="259"></embed>

</object>

 

Thanks

Jeff

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="780" height="259">

<param name="movie" value="/catalog/includes/new.swf">

<param name="quality" value="high">

<embed src="/catalog/includes/new.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="259"></embed>

</object>

 

 

my problem was that it was trying to find the wrong folder but this is the code.

Link to comment
Share on other sites

  • 4 weeks later...

I also have a flash header but the entire flash reloads whenever something is clicked. I am trying to figure out a way to not load the flash after its initial load. I'm thinking an unresizable borderless frame or some kind of session code to only load flash for new sessions. Anyone have any ideas or examples? Much appreciated.

Onnig

Link to comment
Share on other sites

I also have a flash header but the entire flash reloads whenever something is clicked.  I am trying to figure out a way to not load the flash after its initial load.  I'm thinking an unresizable borderless frame or some kind of session code to only load flash for new sessions.  Anyone have any ideas or examples?  Much appreciated.

 

OK this I figured this out with one problem. Here is the code:

 

<?php

if ((isset($HTTP_GET_VARS['osCsid']) && ($HTTP_GET_VARS['osCsid'] != '')) || (tep_session_is_registered('osCsid'))) 

{

echo HEADING_IMAGE;

 } 

 else

	 {

echo HEADING_BANNER; 

}


I identified the HEADING_IMAGE; and HEADING_BANNER; in the /languages/english/index.php file.  I also had to put:

 require('includes/languages/english/index.php');

at the top of the header file for the proper reference because sometimes the echo wouldn't come out.  OK after all this it works great only if the URL has hte osID at the end.  The only time this works consistently is when https is being used so I setup my catalog and secure catalog as the same https address which worked.  Check it out.  The flash will load once and when anything is clicked the image file will load, but I just don't want to constantly use the https address since the certificate is being shared.  Let me know if there are other solutions to this.  Thanks.

[URL=http://www.marienail.com/index.php]My Webpage[/URL]

Onnig
?>

Onnig

Link to comment
Share on other sites

OK this I figured this out with one problem. Here is the code:

 

<?php

if ((isset($HTTP_GET_VARS['osCsid']) && ($HTTP_GET_VARS['osCsid'] != '')) || (tep_session_is_registered('osCsid'))) 

{

echo HEADING_IMAGE;

 } 

 else

	 {

echo HEADING_BANNER; 

}

 

I identified the HEADING_IMAGE; and HEADING_BANNER; in the /languages/english/index.php file. I also had to put:

 

 require('includes/languages/english/index.php');

 

at the top of the header file for the proper reference because sometimes the echo wouldn't come out. OK after all this it works great only if the URL has hte osID at the end. The only time this works consistently is when https is being used so I setup my catalog and secure catalog as the same https address which worked.

 

  define('HTTP_SERVER', 'https://marienail.ixwebhosting.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://marienail.ixwebhosting.com'); // eg, https://localhost - should not be empty for productive servers

 

from the configure.php file

 

Check it out. The flash will load once and when anything is clicked the image file will load, but I just don't want to constantly use the https address since the certificate is being shared and the URL doesn't look good. Let me know if there are other solutions to this. Thanks.

 

My Webpage

 

Onnig

?>

Onnig

Link to comment
Share on other sites

  • 1 month later...
anyone anyone?  voodoo economics

Hi onnig,

 

I visited your site. And it seems that you have finally corrected your problem. Like you have not and you are not using https for your catalog pages anymore. So thats great.

My flash movie also reloads when I click on a link. I dont want to make all the http links of my site to https .

Please post here what you have done to embedd flash correctly in your site.

 

Many thanks...

Link to comment
Share on other sites

Hi onnig,

 

I visited your site. And it seems that you have finally corrected your problem. Like you have not  and you are not using https for your catalog pages anymore. So thats great. 

My flash movie also reloads when I click on a link.  I dont want to make all the http links of my site to https .

Please post here what you have done to embedd flash correctly in your site.

 

Many thanks...

 

Hi osclover,

 

Unfortunately, I did use https because the sid will properly load on the URL with https by the second click. Give me another day, I am going to have the index.html file auto redirect to index.php to fulfill the first click request so when someone goes to the site the flash will load, then their first click, which will be the actual second click, should generate the sid in the URL preventing the flash to load and the jpg to load in its place. I am using the settings above, nothing has changed, but the only change I will make is to set the:

 

define('HTTP_SERVER'

 

to http://www.marienail.com , rather that the https site I mentioned. I'll let you know.

 

Onnig

Onnig

Link to comment
Share on other sites

Hi osclover,

 

Unfortunately, I did use https because the sid will properly load on the URL with https by the second click.  Give me another day, I am going to have the index.html file auto redirect to index.php to fulfill the first click request so when someone goes to the site the flash will load, then their first click, which will be the actual second click, should generate the sid in the URL preventing the flash to load and the jpg to load in its place.  I am using the settings above, nothing has changed, but the only change I will make is to set the:

 

define('HTTP_SERVER'

 

to http://www.marienail.com , rather that the https site I mentioned.  I'll let you know.

 

Onnig

 

Hi Onnig,

 

Thanx for replying. I haven't understood all of what you said, but I hope you will be posting the process you are applying in a way which is understandable by novice users like me. :rolleyes: . By the way ...do I need to add a jpg to the header so that for the later clicks of users the jpg is displayed instead of the loading of flash movie?

I'm waiting anxiously for the results of your idea. :thumbsup:

Link to comment
Share on other sites

Onnig, the problem with that is if I was to take off the session ID from the url and hit enter, it would reload your flash banner. Why don't you just register a new session variable for the banner?

 

Something like this:

 

if(!tep_session_is_register('flashbanner')) {

//Show Flash Banner
  tep_session_register('flashbanner');  //Register the flash banner session so it won't display again.

} else {

//Show jpg image
}

 

Made a revision.

Link to comment
Share on other sites

Onnig, the problem with that is if I was to take off the session ID from the url and hit enter, it would reload your flash banner.  Why don't you just register a new session variable for the banner?

 

Something like this:

 

if(!tep_session_is_register('flashbanner')) {

//Show Flash Banner
  tep_session_register('flashbanner');  //Register the flash banner session so it won't display again.

} else {

//Show jpg image
}

 

Made a revision.

 

 

Hi dblake,

 

Your code worked perfectly for me. I haven't uploaded that as yet..so can't provided the url. Thanks, very much.

Link to comment
Share on other sites

There is however one small problem:

 

When a non signed-in user is navigating...the movie doesn't loads after getting loaded up for the first time, but when he/she signs-in after ...say adding something to his/her cart, the movie is loaded again (only once).

Let me repharse all this:

 

Step one:

- User types www.sitename.com in browser and site is loaded for first time.

- This causes the movie to get loaded for first time

 

Step 2: User clicks on a product

 

Step 3: Adds the item to his/her cart

 

Step 4: Clicks 'Check out button;' and is taken to the login page

 

****

PS: Flash movie is not loaded for any of the above 3 steps (Step 2-4)

****

 

Step 4: User inputs his login info and clicks the 'Sign In' button

 

Movie is loaded again

 

 

Probably that is because a new session id is assigned to him/her.

I dont know how session ids are manipulated when a user signs-in after a bit of navigating. Probably if we know that..this problem would be solved too. whistling.gif

 

Any help would be appreciated.

Link to comment
Share on other sites

You are on the righ track by saying the session is recreated, which in fact it is. Open up login.php.

 

Around line 45, the session is recreated, then around line 56-60 you will see all those new sessions being created. Just addin your tep_session_register('flashbanner'); right after the customer_zone_id. That will inturn re register it so it will not display.

 

Have fun :D

-Dennis

Link to comment
Share on other sites

I would actually put it here:

 

        if (SESSION_RECREATE == 'True') {
         tep_session_recreate();
         tep_session_register('flashbanner');
       }

 

That way if you have "Recreate Session" turned to false, it won't try to re-register. I do not know if that would cause problems? But to cut any of that out, just stick it there on Login.php.

 

-Dennis

Link to comment
Share on other sites

  • 4 weeks later...

OK figured it out, oh and thanks for all the assistance, much appreciated.

 

The only reason I was using https as the root is because the session was not being created unless you go to checkout. Once a session is created the flash banner will not load and in turn the JPG will load. When I use https the session is created immediately. Well I just discovered that I don't even have to use https, here is how:

 

Under the admin of OSCommerce, under Configuration go to Sessions and make sure "Prevent Spider Sessions" is set to True. This will create a session for every link available on the website which in turn will make sure a session is active on your first click, which will in turn NOT load the flash banner the second time.

Onnig

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...