Page 1 of 1

Not all categories are showing in mobile in OC 3.0.3.2

Posted: Sat May 04, 2019 12:23 am
by pmrspp
I have following 3 queries for Opencart 3.0.3.2:

1. Only those categories are showing in mobile that are hooked to appear on top bar. Please advise how to see all categories on mobile.

2. How to hide telephone number from header

3. How to remove 'Affiliate' from bottom

Thank you!


- Pankaj Jain

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Sat May 04, 2019 9:50 am
by IP_CAM
1. Only those categories are showing in mobile that are hooked to appear on top bar. Please advise how to see all categories on mobile.
You probably use an Extension, enabling TOP Header Links to work as active URL. But
those Extensions disable SubCat Linking in Mobile View.
---
2. remove this Line from your THEME /template/common/header.twig,
either by creating a very simple OcMod/VqMod, or manually remove it or hide it
in/from from the file.

Code: Select all

<li><a href="{{ contact }}"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md">{{ telephone }}</span></li> 
Left HIDDEN on the File itself:

Code: Select all

<!-- <li><a href="{{ contact }}"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md">{{ telephone }}</span></li> -->
OcMod: remove_phone_in_header.ocmod.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Remove Phone from Header OC3</name>
<version>1.0</version>
<code>theme_header_phone_remove</code>
<author>Ernie - IP_CAM</author>
<file path="catalog/view/theme/*/template/common/header.twig">
<operation error="log">
<search><![CDATA[<li><a href="{{ contact }}"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md">{{ telephone }}</span></li>]]></search>
<add  position="replace"><![CDATA[]]></add>
</operation>
</file>
</modification>
Untested, might not work in some Custom Themes.
Good Luck! ;)
Ernie

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Sat May 04, 2019 12:58 pm
by letxobnav
by default the left column is hidden on mobile devices (xs).
So if you have put the category module there, it's hidden.

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Tue May 07, 2019 7:43 pm
by cedcommerceteam
Hello pmrspp,

For point 1 :
1. Only those categories are showing in mobile that are hooked to appear on top bar. Please advise how to see all categories on mobile.
Can you please elaborate a l'll bit more about it, as I can see all the categories in mobile view.

For point 2 : Use following code to hide any template (view) code

Code: Select all

<!-- [ Your code ] --> 
For point 3 : Either you can restrict it from controller or use same code as above to hide it from template.

Thanks.

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Tue May 07, 2019 7:50 pm
by letxob
that is not how you comment-out code in a twig file.

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Tue May 07, 2019 8:24 pm
by cedcommerceteam
Hello letxob,

This is how we use to comment HTML code even in twig file.
I have even used this comment-out code to hide few codes .

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Tue May 07, 2019 11:27 pm
by letxobnav
Sure but that does not make it right.

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Wed May 08, 2019 8:11 am
by IP_CAM
Sounds just like my Mother, when she told me, what I should NOT do,
but seldom gave me a clear advise, how it should be done right :laugh:
Ernie

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Wed May 08, 2019 1:46 pm
by letxobnav
he works for an eCommerce service provider for christ's sake.

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Wed May 08, 2019 1:49 pm
by letxobnav
but ok.

if you use <!-- [ Your code ] --> that code will still be put in your html output which you send over the line needlessly.
if you use {# [ Your code ] #} it will not be part of the html output.

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Wed May 08, 2019 2:32 pm
by cedcommerceteam
Hello letxobnav,

Thanks for the information mate.
I know it works both way <!-- --> as well as {# #} in twig file for commenting a statement.

A person might me new to a framework i.e. why, I & IP_CAM we both have suggested <!-- --> to comment or hide a code

Re: Not all categories are showing in mobile in OC 3.0.3.2

Posted: Sat May 02, 2020 12:31 am
by pmrspp
I am using default theme in OC 3.0.2.0 and no third party extension.

My problem is that only those categories appear in mobile device that I hook up to the top bar. I want all categories as well as sub-categories to appear in all devices be it mobile or tab or laptop or a desktop.

Please advise solution for it.

Thank you.