Jump to content

[Resolved] Grid View only Disable List View on Categories


Recommended Posts

Visually I thought I'd disabled the List View on Categories, (by adding <!-- --> to various parts of the code in the Template content.category.php) so the products would always view in Grid View, however, whereas I and many people see the products in Grid View, my client see's them in List View.  I must have missed something?

Link to comment
Share on other sites

Let's try this:

In the file /skins/foundation/js/2.cubecart.js, find near line 214:
set_product_view(0);

Change to:
grid_view(0); $(document).foundation('equalizer','reflow'); // set_product_view(0);

Near line 473:
Find:
function list_view(duration, event) {
    if (event != null) {
        event.preventDefault();
    }

Change to:
function list_view(duration, event) {
    if (event != null) {
        event.preventDefault();
    } return false;

In the template content.category.php, find near line 57:
   <div class="medium-4 columns show-for-medium-up">
      <dl class="sub-nav right" id="layout_toggle">
         <dd><a href="#" class="grid_view"><i class="fa fa-th-large"></i></a></dd>
         <dd class="active"><a href="#" class="list_view"><i class="fa fa-th-list"></i></a></dd>
      </dl>
   </div>

Change to:
   <div class="medium-4 columns show-for-medium-up">
{*    <dl class="sub-nav right" id="layout_toggle">
         <dd><a href="#" class="grid_view"><i class="fa fa-th-large"></i></a></dd>
         <dd class="active"><a href="#" class="list_view"><i class="fa fa-th-list"></i></a></dd>
      </dl>  *}
   </div>

You will probably need to force your browser to reload the page's resources so that a fresh copy of the javascript file is retrieved.

We changed the javascript so that only the gridview appears, and we changed the template to remove the selectors.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...