Jump to content

[Resolved] Need help


BestValuItems

Recommended Posts

I would like to know how do I remove the sub categories from showing on the category page? I don't want this to show on the page. I have provided a image of what I would like to remove. Also you can take a look at my site at http://bestvalueditems.com as well. Please help me with removing this. Thanks in advance to anyone that is willing to help me with this. Also if it has to do with any html coding I am not able to do that on my own I would need a detailed step by step with that.

Capture.JPG

Link to comment
Share on other sites

You will need to find the file templates/content.category.php in your stores file manager. You can usually access this via something called cPanel which you have access to at http://bestvalueditems.com/cpanel. You should have been provided with a password and username by your webhost. Once you log in you will see an icon for file manager. Open this and locate the file in public_html/skins/foundation/templates/content.category.php. Click on the filename and then on the Edit icon/button.

Change/Edit

{if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if}

to

<!-- {if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if} -->

 

Save the file.

Link to comment
Share on other sites

To save your future self a lot of headache, you may want to consider using Git to track all changes you make to your code, and make those changes locally first (so you can test them!) before re-uploading the changed files to your server; editing your live files directly is quite the gamble even if you know what you are doing.

Not that the above edit is going to break anything - this is just general advice for if you make more than one or two edits to your code. The more edits you make, the more likely something is to go horribly wrong and leave you with a broken site for however long it takes you to track down what went wrong. Using Git, you can just checkout the last known working version, upload it, and then work locally (or on an alternate staging site) to figure out what broke while your live site continues on its merry way.

Link to comment
Share on other sites

@ayz1 I have followed the steps that you have provided and I still have the sub-categories on the main category page. I have attached pics. Let me know if I did anything wrong. As I stated html coding is really not my thing at all. I really don't understand html coding one bit:huh:.

On ‎8‎/‎16‎/‎2016 at 7:06 AM, ayz1 said:

You will need to find the file templates/content.category.php in your stores file manager. You can usually access this via something called cPanel which you have access to at http://bestvalueditems.com/cpanel. You should have been provided with a password and username by your webhost. Once you log in you will see an icon for file manager. Open this and locate the file in public_html/skins/foundation/templates/content.category.php. Click on the filename and then on the Edit icon/button.

Change/Edit

{if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if}

to

<!-- {if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if} -->

 

Save the file.

 

Capture.JPG

Capture-1.JPG

Link to comment
Share on other sites

Looks OK. In admin > Maintenance select the clear cache option and then click the submit button. If that doesn't work.

Try deleting

<!-- {if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if} -->

I am assuming you are using the Foundation skin? Or have you renamed it? If so then you need to work in that folder.

Link to comment
Share on other sites

The suggested code change (wrapping some code inside HTML comment markers, thus telling the browser to not render that code) will suppress the display of that actual category's image.

You want to suppress the display of all that category's sub-categories.

To supress the display of the subcats, find this statement:

{if isset($SUBCATS) && $SUBCATS}

Change to:

{if false && isset($SUBCATS) && $SUBCATS}

This forces the if test to evaluate to false which will cause nothing to be shown.

Link to comment
Share on other sites

  • 2 months later...

Hi there,

Would anyone be able to help with a code for getting sub-categories to display on responsive sites? They display on the desktop site. Please see screenshots.

I am using the foundation skin and would the code go in the same file mentioned above: public_html/skins/foundation/templates/content.category.php

Thanks,

Desktop.jpg

Responsive.PNG

Link to comment
Share on other sites

According to the template content.category.php, for a medium and wider viewport, there will be a six-across grid.

Then, if the Store Settings, Layout tab, 'Expand category navigation tree' is enabled, the sub-cats area is shown only on medium and wider viewports. Otherwise, for a small viewport, there will be shown a three-across grid.

So, check that setting.

If off, which should show the three-across grid, determine if the sub-cats are actually below the descriptive text (scroll the page). However, I see the SiteDocs, and that is at the bottom of the page.

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...