Post by uksitebuilder » Mon Sep 26, 2011 11:14 pm

matlamont wrote:for anyone who have tried all the above and still opencart displays list view the problem lies with you hosting providers firewall settings rejecting the cookie opencart is trying to set to display grid view

Most likely your host has mod_security enabled on the server

for some strange reason mod_security has a stupid rule to block filenames containing the word cookie

Either (a) contact your host and ask them to disable/remove mod_security

or (b) rename catalog/view/javascript/jquery/ui/external/jquery.cookie.js to remove the word cookie
You will also need to edit catalog/view/theme/default/template/common/header.tpl and change the link to the above file to reflect your newly renamed file.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by nyomanmusdina » Thu Sep 29, 2011 9:43 am

very helpful!

Nyoman BGC
Your Balinese Fellow
http://www.baligoodjewelry.com


User avatar
New member

Posts

Joined
Fri Sep 02, 2011 9:06 am
Location - Bali, Indonesia

Post by colt1911 » Sat Oct 01, 2011 11:44 am

What if I'm using XAMPP and working off localhost -- does xampp use mod_security? I've tried every suggestion above, and still no grid view default.

vs 1.5.1.1

New member

Posts

Joined
Sat Sep 24, 2011 1:23 am

Post by uksitebuilder » Sat Oct 01, 2011 3:11 pm

Try renaming the cookie file as per (b) in my post above

Or edit your php.ini and comment out the mod_security extension.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by colt1911 » Sun Oct 02, 2011 2:11 am

Thank you, uksitebuilder. I'm sorry I wasted your time, though: The problem was somewhere in the changes I made to the category.php file and category.tpl files.

I've just spent hours going back to the default and adding things one by one to pinpoint the problem, but when all the changes had been reimplemented, I had no answer as everything is now working fine.

New member

Posts

Joined
Sat Sep 24, 2011 1:23 am

Post by amitgarg » Fri Oct 21, 2011 4:07 pm

Thanks it works perfectly for me.... :-)

Thanks,
Amit Garg


User avatar
New member

Posts

Joined
Sun Jan 09, 2011 3:51 am
Location - New Delhi, India

Post by specialtyleds » Fri Oct 28, 2011 4:11 am

vqmod worked - thanks saved a bunch of time! Much appreciated. Grid view :)

Newbie

Posts

Joined
Mon Sep 12, 2011 10:00 pm

Post by SpoonIsBad » Wed Nov 02, 2011 5:52 am

cryoutcreations wrote:I think the easiest mod to make grid default (until it will be included as an option in the admin) is to add

Code: Select all

<script type="text/javascript">$(document).ready(function() { if(typeof display == 'function') { display('grid'); } });</script>
in the theme's footer.tpl.

It is safe to use as it checks if the function is defined before calling it, so the browser doesn't spit out a javascript error on pages without products on them.

LE: I've written a module that does this without the need to edit the theme anymore: CR2 Grid Enabler

CR2 Grid Enabler worked perfectly for me, thanks!

www.happybeavertees.com


Newbie

Posts

Joined
Fri Aug 19, 2011 12:52 am

Post by scoobs001 » Sun Nov 13, 2011 6:34 pm

cryoutcreations wrote:I think the easiest mod to make grid default (until it will be included as an option in the admin) is to add

Code: Select all

<script type="text/javascript">$(document).ready(function() { if(typeof display == 'function') { display('grid'); } });</script>
in the theme's footer.tpl.

It is safe to use as it checks if the function is defined before calling it, so the browser doesn't spit out a javascript error on pages without products on them.

LE: I've written a module that does this without the need to edit the theme anymore: CR2 Grid Enabler
Works for me ;D

The VQMOD wasn't working so i tried this.

New member

Posts

Joined
Thu Dec 16, 2010 8:03 am

Post by kaylamatthews » Thu Nov 24, 2011 7:39 am

is it possible to have certain categories display in list view and others in grid view?

maybe something like <?php if category="category1" ?> then list, and so on? My store will only have 2 product categories and I am trying to have one display as list and the other as grid...please help!

New member

Posts

Joined
Wed Jun 01, 2011 12:30 pm

Post by eline » Wed Dec 28, 2011 12:00 am

You can do this in template file by "dirty" way. Not tested but it should work.

<?
if($GET['path'] == '64'){
// grid view
}else{
// another view :)
}
?>

check category name if($category['name'] == 'category 1') should work also ;)

Polskie forum OpenCart: http://forum.opencart.com/viewforum.php?f=164


New member

Posts

Joined
Tue Oct 06, 2009 10:52 pm

Post by Gui Siani » Thu Feb 16, 2012 6:57 am

How can i do grid as default view in 1.5.3.1? Nothing works ???

New member

Posts

Joined
Tue Jul 12, 2011 1:48 am

Post by inspirio » Mon Feb 20, 2012 6:34 pm

qahar wrote:Open category.tpl and find code bellow:

Code: Select all

if (view) {
	display(view);
} else {
	display('list');    ---> change to grid
}
Do the same thing on other page used grid-list, like manufacturer, special etc
This is my category.tpl from themes:

Code: Select all

<script type="text/javascript"><!--
function display(view) {
	if (view == 'list') { [b]<-----this is be the "GRID"----->[/b]


		$('.product-grid').attr('class', 'product-list');
		
		$('.product-list > div').each(function(index, element) {
			html  = '<div class="right">';
			html += '  <div class="cart">' + $(element).find('.cart').html() + '</div>';
			html += '  <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
			html += '  <div class="compare">' + $(element).find('.compare').html() + '</div>';
			html += '</div>';			
This work for me. Thank you :)

Image


User avatar
New member

Posts

Joined
Fri Feb 17, 2012 9:11 pm

Post by TAC » Sat Feb 25, 2012 4:07 am

I used the instructions from cryoutcreations above and it worked first time so thank you very much for your help ;D

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by ccM » Sat Feb 25, 2012 9:17 am

Hi guys I would love an opinion if you have time.

I am upgrading a site to 1.5.1.3.1 and the customer only wants grid view. On the old 151 version we just used the instructions from Simon in a vqmod and it worked a treat (thank you). However we still got a flicker of the list view from time to time and the javascript was unnecessarily slowing things up since not ultimately needed for this customer.

For this site I have removed all of the javascript in the category.tpl and renamed the <div class="product-list"> to <div class="product-grid">. Also removed all css for .product-list, and removed the <div class="display">. This has been done for manufacturer and search as well.

Can anyone see any problems with doing this? It is testing really well and is a highly customised site, but would love to hear anyone's thoughts if they can see any areas I might have missed.

Cheers :)

ccM
New member

Posts

Joined
Fri Aug 19, 2011 6:51 am
Location - QLD, Australia

Post by twilightsprite » Tue Mar 06, 2012 9:04 am

cryoutcreations wrote:
LE: I've written a module that does this without the need to edit the theme anymore: CR2 Grid Enabler
Yay for CR2 Grid enabler!! Thanks cryoutcreations, champion effort. It works a treat on 1.5.1.3 - need to update your info.text file to include this version in the description (though it does say compatible on the extension download page).

btw, the blue and purple horrify themes are beautiful :)


Posts

Joined
Tue Mar 06, 2012 8:55 am

Post by bryantklee » Sat Mar 10, 2012 9:34 am

My page is alternating between list and grid view...does anyone have a solution for that?

Newbie

Posts

Joined
Tue Mar 06, 2012 10:33 am

Post by prof x » Thu May 03, 2012 9:02 pm

I am having a bit of a problem with grid view as well. I have uploaded the xml file through VQ Mod Manager and it is showing as installed but I cant get the grid view to show at all. I am sure it is something silly I am overlooking as opencart is very new to me. I am also running aceshop through joomla and my paths might be different but if I installed via MOD mgr, all should work right? anyway, here is a link to the sight. It is still a process in the works. www.xwingfactory.com
PS running 1.5.13 with no option to change until aceshop updates.
Thanks,
prof x

Newbie

Posts

Joined
Thu May 03, 2012 8:55 pm

Post by prof x » Fri May 04, 2012 12:23 am

UPDATE - looks like it is working in IE but not in google chrome.
Any ideas? Thanks

prof x

Newbie

Posts

Joined
Thu May 03, 2012 8:55 pm

Post by strikeboy » Tue May 15, 2012 8:52 pm

my dirty tricks for some of you who try and try and try and still try but can't get to work.

1 - copy template/default/product/category.tpl
2 - paste inside your own theme
3. open with your editor notepad and search for "list" and replace with all grid
(BEWARE! wishlist do contain "list" so if you are using wishlist do not place that.)

Tadaaa! it works for me....

Finally.......
change to your own CSS style with your own theme....

Newbie

Posts

Joined
Tue May 15, 2012 8:49 pm
Who is online

Users browsing this forum: No registered users and 23 guests