Post by vincrixfo » Fri Oct 01, 2010 2:08 am

HI every one ,

i have a issue solving a problem , pls help me with this . i try to explain as clear as i can .

My oc version is : v1.4.9.1

oc shop link :

Code: Select all

http://worlockt.info/open/
oc theme used : Proshop

issue : if u visit that link in home page u will see 2 products , if u move mouse cursor 2 the blank white area right side to that 2 products u will see that the arrow turning to hand link as if there is a link and also white part turning to grey . even there is no products or link why it shows like a link . pls help me removing it , it also appears in every individual category list . also is it possible to display categories instead of products in that homepage ?

Thanks in advance .....!

User avatar
Newbie

Posts

Joined
Wed Sep 29, 2010 11:13 am
Location - India

Post by vincrixfo » Fri Oct 01, 2010 6:12 pm

Guys , pls someone help me wid dis issue ?

i've to open the shop

User avatar
Newbie

Posts

Joined
Wed Sep 29, 2010 11:13 am
Location - India

Post by jcsmithy » Fri Oct 01, 2010 10:07 pm

easiest method would be to edit the jquery function so that it only applies the hover effect to cells with content

Before

Code: Select all

$(function() {
	$('.list td').mouseover(function() {
    	$(this).addClass('selectedRow');
    }).mouseout(function() {
        $(this).removeClass('selectedRow');
    })
});
After

Code: Select all

$(function() {
	$('.list td').mouseover(function() {
       if($(this).html() != null) {
            $(this).addClass('selectedRow');
       }
    }).mouseout(function() {
        if($(this).html() != null) {
             $(this).removeClass('selectedRow');
        }
    })
});
Where this code Is located would be a guess as I havent looked at the theme, But chances are have a look in :

Code: Select all

catalog/view/theme/proshop/template/header.tpl

Code is untested but should work...

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by vincrixfo » Fri Oct 01, 2010 10:56 pm

Done bro ... but still not working ... :(

the complete header.tpl code after change is pasted below , chk it and help me bro

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 $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<!-- begin broswer reset css -->
<style type="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 
	padding: 0;
	margin: 0;
	}
table {
	border-collapse: collapse;
	border-spacing: 0;
	}
fieldset,img { 
	border: 0;
	}
address,caption,cite,code,dfn,em,strong,th,var {
	font-weight: normal;
	font-style: normal;
	}
ol,ul {
	list-style: none;
	}
caption,th {
	text-align: left;
	}
h1,h2,h3,h4,h5,h6 {
	font-size: 100%;
	}
q:before,q:after {
	content:'';
	}
abbr,acronym { border: 0;
	}
</style>
<!-- end browser reset css -->

<title><?php echo $title; ?></title>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/ProShop/stylesheet/stylesheet.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/ProShop/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/unitpngfix/unitpngfix.js"></script>
<![endif]-->
<?php foreach ($styles as $style) { ?>
<link rel="stylesheet" type="text/css" href="view/stylesheet/<?php echo $style; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.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>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="view/javascript/jquery/<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/easySlider1.7.js"></script> 
<script type="text/javascript"> 
	$(document).ready(function(){	
		$("#slider").easySlider({
			auto: true, 
			continuous: true,
			controlsShow: false,
			speed: 1000,
			pause: 8000
		});
	});	
</script>
<script src="catalog/view/javascript/cufon-yui.js" type="text/javascript"></script>
<script src="catalog/view/javascript/Calibri_400-Calibri_700-Calibri_italic_400-Calibri_italic_700.font.js" type="text/javascript"></script>
<script type="text/javascript">
	Cufon.replace('.box .top');
	Cufon.replace('#content h1');
	Cufon.replace('#nav #mavLinks a');
</script>
<script> 
$(function() {
   $('.list td').mouseover(function() {
       if($(this).html() != null) {
            $(this).addClass('selectedRow');
       }
    }).mouseout(function() {
        if($(this).html() != null) {
             $(this).removeClass('selectedRow');
        }
    })
});
</script> 
<style> 
      .selectedRow {
         background-color: #EAEAEA;
         cursor: pointer;
      }
</style> 
</head>
<body>
  <div id="headerWrapper">
    <div id="header">
      <div class="div1">
        <div class="div2">
          <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $store; ?>" alt="<?php echo $store; ?>" /></a>
        </div>
        <div class="div3">
          <?php if ($currencies) { ?>
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="currency_form">
          <div class="switcher">
            <?php foreach ($currencies as $currency) { ?>
            <?php if ($currency['code'] == $currency_code) { ?>
            <div class="selected"><a><?php echo $currency['title']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($currencies as $currency) { ?>
              <a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
              <?php } ?>
            </div>
          </div>
          <input type="hidden" name="currency_code" value="" />
          <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
        </form>
        <?php } ?>
        <?php if ($languages) { ?>
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="language_form">
          <div class="switcher">
            <?php foreach ($languages as $language) { ?>
            <?php if ($language['code'] == $language_code) { ?>
            <div class="selected"><a><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />&nbsp;&nbsp;<?php echo $language['name']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($languages as $language) { ?>
              <a onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $('#language_form').submit();"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />&nbsp;&nbsp;<?php echo $language['name']; ?></a>
              <?php } ?>
            </div>
          </div>
          <input type="hidden" name="language_code" value="" />
          <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
        </form>
        <?php } ?>
        </div>
      </div>
    </div>
  </div>
  
  <div id="navWrapper">
    <div id="nav">
      <span id="navLinks">
      <a href="<?php echo $home; ?>"><?php echo $text_home; ?></a><img src="catalog/view/theme/ProShop/image/split.png" class="split" alt="split" />
     <?php if (!$logged) { ?>
      <a href="<?php echo $login; ?>"><?php echo $text_login; ?></a><img src="catalog/view/theme/ProShop/image/split.png" class="split" alt="split" />
      <?php } else { ?>
      <a href="<?php echo $logout; ?>"><?php echo $text_logout; ?></a><img src="catalog/view/theme/ProShop/image/split.png" class="split" alt="split" />
      <?php } ?>
      <a href="<?php echo $account; ?>"><?php echo $text_account; ?></a><img src="catalog/view/theme/ProShop/image/split.png" class="split" alt="split" />
      <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a><img src="catalog/view/theme/ProShop/image/split.png" class="split" alt="split" />
      <a href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a>
      </span>
      <span id="search">
        <?php if ($keyword) { ?>
        <input type="text" value="<?php echo $keyword; ?>" id="filter_keyword" />
        <?php } else { ?>
        <input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" />
        <?php } ?>
        <a onclick="moduleSearch();"><img src="catalog/view/theme/ProShop/image/search_button.png" alt="search" align="top" /></a></div>
      </span>
    </div>
  </div>
  
  <?php
  if(isset($this->request->get['route']) && $this->request->get['route'] != 'common/home'){
  ?>
  	<div id="breadcrumb">
      <div id="crumbs">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
      </div>
    </div>
  <?php
  }
  ?>
     
  <div id="container">
<script type="text/javascript"><!-- 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>
<script type="text/javascript"><!--
$('#module_search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

function moduleSearch() {
	url = 'index.php?route=product/search';
	
	var filter_keyword = $('#filter_keyword').attr('value')
	
	if (filter_keyword) {
		url += '&keyword=' + encodeURIComponent(filter_keyword);
	}
	
	var filter_category_id = $('#filter_category_id').attr('value');
	
	if (filter_category_id) {
		url += '&category_id=' + filter_category_id;
	}
	
	location = url;
}
//--></script>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
//--></script>

User avatar
Newbie

Posts

Joined
Wed Sep 29, 2010 11:13 am
Location - India

Post by jcsmithy » Sat Oct 02, 2010 1:04 am

change null to "" (quotes)

Code: Select all

$(function() {
   $('.list td').mouseover(function() {
       if($(this).html() != "") {
            $(this).addClass('selectedRow');
       }
    }).mouseout(function() {
        if($(this).html() != "") {
             $(this).removeClass('selectedRow');
        }
    })
});

tested this time :)

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by jcsmithy » Sat Oct 02, 2010 1:11 am

alternatevly...

if you changed two lines in the file

Code: Select all

catalog\view\theme\default\template\module\featured_home.tpl
before

Code: Select all

Line 15: <td style="width: 25%;"><?php if (isset($products[$j])) { ?>
Line 31: <?php } ?></td>
after

Code: Select all

Line 15: <?php if (isset($products[$j])) { ?><td style="width: 25%;text-align:center;">
Line 31: </td><?php } ?>
you would stop the cells from rendering all together, and would also center the rendered cells in the element so they wouldnt be hanging to the left.

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by vincrixfo » Sat Oct 02, 2010 1:49 am

again no change mate :(

check the site link i gave in first reply :(

User avatar
Newbie

Posts

Joined
Wed Sep 29, 2010 11:13 am
Location - India

Post by jcsmithy » Sat Oct 02, 2010 4:28 am

Easiest things always end up becoming a pain lol...

For some reason your empty cells are still rendering line breaks, which doesn't happen with the original theme,
In IE altho they are rendered it still works, Firefox is acts differently.


Give this ago instead, It will check to see if the cell contains <a> tags, might not be the best way around it but (dare I say it), It should work....

Code: Select all

 $(function() {
   $('.list td').mouseover(function() {
       if($(this).children("a").html() != null) {
            $(this).addClass('selectedRow');
       }
    }).mouseout(function() {
        if($(this).children("a").html() != null) {
             $(this).removeClass('selectedRow');
        }
    })
});

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by vincrixfo » Sun Oct 03, 2010 1:38 am

Thank GOD ! ...oops sry sry Thank jcsmithy , it works :)

Really helpful 8)

Thanks a lot bro ;)

User avatar
Newbie

Posts

Joined
Wed Sep 29, 2010 11:13 am
Location - India
Who is online

Users browsing this forum: FazalFariz and 178 guests