Post by vapors1911 » Mon Apr 20, 2009 9:01 am

Attached is a CSS stylesheet that will make the page display correctly with IE6.

------------------------------------------------------

To install:

-Replace the layout.tpl file.
-Add the stylesheet_ie6.css file to the stylesheet directory.

------------------------------------------------------

-This corrects the issue where the bottom middle content box or 'latest products' was being pushed to the very bottom left hand corner of the page, underneath all of the menus, in Internet Explorer 6.

-This also corrects the issue where the site is not centered in Internet Exporer 6.

-This also corrects the PNG issue in IE 6, where transparent PNGs are not rendered correctly. However, the small icon png's, are still grey.

There is a separate style sheet for IE6, which could be converted into one style sheet with some PHP if statements. The most strait forward way to use the stylesheet is with a simple if statement to check if the browser is IE6.

Here is the if statement that identify's if the browser is IE6, this is already included into the attached layout.tpl file.

Code: Select all

if(substr_count($_SERVER['HTTP_USER_AGENT'],"MSIE 6")){
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"catalog/view/theme/default/stylesheet/stylesheet_ie6.css\" />";
}
else{
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"catalog/view/theme/default/stylesheet/stylesheet.css\" />";
}
There is also a section which sets the height of the div called 'content' in the layout.tpl file. In IE6, if you do not have many items, the content table covers the right menus, so you cannot see them.

Code: Select all

// If browser is IE, set the height of this div, so it does not overlap the right side menus
if(substr_count($_SERVER['HTTP_USER_AGENT'],"MSIE 6")){
  echo "<div id=\"content\" style='height: 540px;'>";
}
else{
  echo "<div id=\"content\">";
}

Newbie

Posts

Joined
Wed Apr 15, 2009 9:50 am

Post by baris22 » Mon Apr 20, 2009 10:39 am

Thanks for this. There is a small mistake on layout.tpl. I think you used the older version of it. that is not the latest version. stylesheet_ie6.css also is not for the latest version and it needs to be corrected according to the latest version. I did a quick correction on layout.tpl and

Correct one should be

Code: Select all

<?php echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $language; ?>" xml:lang="<?php echo $language; ?>">
<head>
<title><?php echo $title; ?></title>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />

<?php
// Check if the browser is IE6, if yes, display a special style sheet
if(substr_count($_SERVER['HTTP_USER_AGENT'],"MSIE 6")){
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"catalog/view/theme/default/stylesheet/stylesheet_ie6.css\" />";

    ?>
    <!-- Corrects PNG images in IE6, so they are transparant and not grey  -->
    <script language="JavaScript">
    function correctPNG()
    {
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (document.body.filters)) 
    {
        for(var i=0; i<document.images.length; i++)
        {
            var img = document.images[i]
            var imgName = img.src.toUpperCase()
            if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
            {
                var imgID = (img.id) ? "id='" + img.id + "' " : ""
                var imgClass = (img.className) ? "class='" + img.className + "' " : ""
                var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
                var imgStyle = "display:inline-block;" + img.style.cssText 
                if (img.align == "left") imgStyle = "float:left;" + imgStyle
                if (img.align == "right") imgStyle = "float:right;" + imgStyle
                if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
                var strNewHTML = "<span " + imgID + imgClass + imgTitle
                + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
                + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
                img.outerHTML = strNewHTML
                i = i-1
            }
        }
    }    
    }
    window.attachEvent("onload", correctPNG);

    </script>

    <?
// end of IF Internet explorer 6 statement
}
else{
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"catalog/view/theme/default/stylesheet/stylesheet.css\" />";
}
?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/thickbox/thickbox-compressed.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/thickbox/thickbox.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tab.js"></script>
</head>
<body>
<div id="container">
  <div id="header"><?php echo $header; ?></div>
  <div id="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <div id="column_left">
    <?php foreach ($modules as $module) { ?>
    <?php if ($module['position'] == 'left') { ?>
    <?php echo ${$module['code']}; ?>
    <?php } ?>
    <?php } ?>
  </div>
  <div id="column_right">
    <?php foreach ($modules as $module) { ?>
    <?php if ($module['position'] == 'right') { ?>
    <?php echo ${$module['code']}; ?>
    <?php } ?>
    <?php } ?>
  </div>
  <?php
// If browser is IE, set the height of this div, so it does not overlap the right side menus
if(substr_count($_SERVER['HTTP_USER_AGENT'],"MSIE 6")){
  echo "<div id=\"content\" style='height: 540px;'>";
}
else{
  echo "<div id=\"content\">";
}
?>

<?php echo $content; ?></div>
  <div id="footer"><?php echo $footer; ?></div>
</div>
</body>
</html>

Newbie

Posts

Joined
Sat Jan 05, 2008 9:03 pm

Post by vapors1911 » Tue Apr 21, 2009 6:32 am

Yeah, my version is a few weeks old. I'm hoping the development team will try make the changes into the main code base, so that way its easier to upgrade without having to add these changes in again.

Newbie

Posts

Joined
Wed Apr 15, 2009 9:50 am

Post by mal-schauen » Fri Apr 24, 2009 10:20 pm

LOOK HERE ..... click here

Alles für die Anwendung im deutschen Sprachraum
Hier gehts zum deutschen Forumbereich


User avatar
Moderator

Posts

Joined
Sun Feb 08, 2009 11:16 pm
Location - Germany

Post by bbs0769 » Wed May 06, 2009 7:16 pm

-Replace the layout.tpl file.
-Add the stylesheet_ie6.css file to the stylesheet directory.
do as above.show up bug,

Attachments

666.jpg

666.jpg (18.65 KiB) Viewed 5827 times


Global trade website:http://www.dhl.hk.cn


Newbie

Posts

Joined
Tue May 05, 2009 9:33 pm


Post by Daniel » Wed May 06, 2009 7:21 pm

you know according to wikipedia IE6 came out in 2001.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by bbs0769 » Thu May 07, 2009 8:54 am

Sir,What can I do for my store? please!

Global trade website:http://www.dhl.hk.cn


Newbie

Posts

Joined
Tue May 05, 2009 9:33 pm


Post by scarlson43017 » Tue May 19, 2009 11:51 am

Daniel wrote:you know according to wikipedia IE6 came out in 2001.
I have two web sites that get an average of about 250 unique visitors each per day, and for 2009 over 11% of the browsers are IEv6. The third largest group of clients. That's still a pretty significant number.

IE7 - 44.1%
FF3 - 28.0%
IE6 - 11.9%
IE8 - 4.9%
Chrome 1.0 - 2.89%
Safari 3.2 - 1.85%
Others - each less than 1%

Newbie

Posts

Joined
Tue May 19, 2009 4:26 am

Post by vapors1911 » Thu Jul 30, 2009 10:59 pm

It looks like opencart is now working in IE6 by default. Thats great to see!!

Newbie

Posts

Joined
Wed Apr 15, 2009 9:50 am

Post by Rich » Fri Jul 31, 2009 12:01 am

scarlson43017 wrote: I have two web sites that get an average of about 250 unique visitors each per day, and for 2009 over 11% of the browsers are IEv6. The third largest group of clients. That's still a pretty significant number.

IE7 - 44.1%
FF3 - 28.0%
IE6 - 11.9%
IE8 - 4.9%
Chrome 1.0 - 2.89%
Safari 3.2 - 1.85%
Others - each less than 1%
:D That is quite disturbing, that almost 12% of people living in stone age :D

Rich
Bird is the word


New member

Posts

Joined
Tue Jul 28, 2009 2:56 am
Location - Bird Cage

Post by JNeuhoff » Fri Jul 31, 2009 1:19 am

I am not one of these 12%, and I feel no sorry if someone else still does and experiences problems with standard-compliant websites. ;D

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 17 guests