Post by DnAWebCreations » Sun Mar 11, 2012 8:00 am

I am using the default theme for opencart. I have grid size set to how I want it but I am trying to set the grad view a the default. The code I have tried to change to get it to work is below. But it did not work when I open it in another browser so it is not loading from the admin panel it shows as a list view.
This is the code I changed in the catalog/view/theme/default/template/product/category.tpl file
<div class="display"><b><?php echo $text_display; ?></b> <?php echo $text_list; ?> <b>/</b> <a onclick="display('grid');"><?php echo $text_grid; ?></a></div>
I changed it to this but it did no good.
<div class="display"><b><?php echo $text_display; ?></b> <?php echo $text_grid; ?> <b>/</b> <a onclick="display('list');"><?php echo $text_list; ?></a></div>
Can anyone help me with this?


Posts

Joined
Mon Feb 13, 2012 6:52 am

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by DnAWebCreations » Sun Mar 11, 2012 10:52 pm

Thanks a lot, as best I can tell it is working great.


Posts

Joined
Mon Feb 13, 2012 6:52 am

Post by callaghand » Wed Mar 14, 2012 8:40 am

Hi,
im using version 1.5.1.3 and the following has worked for me.

Try the following in category.tpl. Change the last line : display('list'); to display('grid');

view = $.cookie('display');

if (view) {
display(view);
} else {
display('grid');

my website is http://www.callaghancandles.ie

Newbie

Posts

Joined
Wed Mar 14, 2012 5:45 am

Post by DnAWebCreations » Mon Mar 19, 2012 1:09 am

callaghand wrote:Hi,
im using version 1.5.1.3 and the following has worked for me.

Try the following in category.tpl. Change the last line : display('list'); to display('grid');

view = $.cookie('display');

if (view) {
display(view);
} else {
display('grid');

my website is http://www.callaghancandles.ie
When you update do you have to go back in and change the code to have the default as a grid? I had it working with the first way I tried but after update it is back to list view.


Posts

Joined
Mon Feb 13, 2012 6:52 am

Post by jty » Tue Mar 20, 2012 6:58 am

DnAWebCreations wrote:When you update do you have to go back in and change the code to have the default as a grid? I had it working with the first way I tried but after update it is back to list view.
Depends on what theme ou are using. If you are using the default open cart theme, then yes as the upgrade will have overwritten the previous version of the file.

If you are using a custom file, then in this particular instance, probably not as you custom file will not ave been overridden. Then again, if you are using a custom theme, then you might have other problem as you need to upgrade your custom file.

Have a look at your file, is the change you made still there ?

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am
Who is online

Users browsing this forum: Amazon [Bot] and 36 guests