Post by zzzzzz2 » Sun Mar 17, 2019 6:21 pm

hi all...
i am a newbie but with a little help can learn and do things myself...
A new theme I have has a menu which contains all my categories but also some items which i wish to remove... like blog
Opencart 2.3 site http://mybutcher.shop/h

the developer supporting this simply said to remove items edit header.tpl
i cannot see blog in this file attached... can anyone please help me understand how to do this

many thanks

george
Last edited by zzzzzz2 on Tue Mar 19, 2019 4:25 pm, edited 1 time in total.

Active Member

Posts

Joined
Sun Aug 06, 2017 5:28 am

Post by IP_CAM » Sun Mar 17, 2019 11:43 pm

Well, if the Link cannot be found in the header.tpl (header.twig) File,
it's probably part of an OcMod (VqMod), adding that link to this file.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cyclops12 » Mon Mar 18, 2019 12:30 am

Are there any settings in admin for your theme.
Without knowing what theme you are using people will only be guessing to answer your question

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by zzzzzz2 » Tue Mar 19, 2019 3:46 am

sorry... the theme author is webstrot and provided by template monster... the theme is called meatshop... and the only theme configuration is image sizes ...

and thanks ernie but there is no ocmod stuff or vqmod... its all in the header file...

i do understand a little about coding and to try to get some focus and help I am listing the menu loop for the categories... my question really is ... can anyone tell me where the $categories are created

<?php if ($categories) { ?>
<nav id="menu" class="navbar">
<div class="navbar-header"><span id="category" class="visible-xs"><?php echo $text_category; ?></span>
<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">

<ul class="nav navbar-nav">
<li class="dropdown custom-drop">
<a>Home</a>
<div class="dropdown-menu">
<div class="dropdown-inner">
<ul>
<li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>
<li><a href="<?php echo $home2; ?>"><?php echo $text_home2; ?></a></li>
</ul>
</div>
</div>
</li>

<?php foreach ($categories as $category) { ?>
<?php if ($category['children']) { ?>
<li class="dropdown">
<a href="<?php echo $category['href']; ?>" class="dropdown-toggle"><?php echo $category['name']; ?></a>
<span class="ochow-menu-item-toggle ochow-close visible-xs">
<i class="fa fa-plus"></i>
<i class="fa fa-minus"></i>
</span>
<span class="ochow-menu-item-arrow hidden-lg">
<i class="fa fa-angle-down"></i>
</span>
<div class="dropdown-menu">
<div class="dropdown-inner">
<?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?>
<ul class="level10 list-unstyled">
<?php foreach ($children as $child) { ?>
<li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a>
<?php if($child['children']) { ?>
<?php foreach($child['children'] as $child2) { ?>
<ul>
<li><a href="<?php echo $child2['href']; ?>"><?php echo $child2['name']; ?></a></li>
</ul>
<?php } } ?>
<?php } ?>
</li>
</ul>
<?php } ?>
</div>
</div>
</li>

Active Member

Posts

Joined
Sun Aug 06, 2017 5:28 am

Post by IP_CAM » Tue Mar 19, 2019 4:36 am

Well, it's that Code:

Code: Select all

<li> <a href="http://mybutcher.shop/h/index.php?route=information/blogger/blogs">Blog</a></li>  
and if it's not part of the header file, (in the /controller/common/header.php /- or - /theme/template/common/header.tpl)
then just check troughout your local OC Copy for anything named 'blog' :D
It's the only way, to find out!
Ernie
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by zzzzzz2 » Tue Mar 19, 2019 5:11 am

Ernie... you are a genius... Ive been looking in the wrong place for the data... i suspected i needed t look in the controller... the author fibbed ... he said view or model...

anyway in controller the data are has the following snippet... question is if i simply removed the highlighted lines will it remove them from the menu???

$data['text_blog'] = $this->language->get('text_blog');
$data['all_blogs'] = $this->url->link('information/blogger/blogs');

$data['home'] = $this->url->link('common/home');
$data['home2'] = $this->url->link('common/home2');

$data['wishlist'] = $this->url->link('account/wishlist', '', true);
$data['logged'] = $this->customer->isLogged();
$data['account'] = $this->url->link('account/account', '', true);
$data['register'] = $this->url->link('account/register', '', true);
$data['login'] = $this->url->link('account/login', '', true);
$data['order'] = $this->url->link('account/order', '', true);
$data['transaction'] = $this->url->link('account/transaction', '', true);
$data['download'] = $this->url->link('account/download', '', true);
$data['logout'] = $this->url->link('account/logout', '', true);
$data['shopping_cart'] = $this->url->link('checkout/cart');
$data['checkout'] = $this->url->link('checkout/checkout', '', true);
$data['contact'] = $this->url->link('information/contact');
$data['telephone'] = $this->config->get('config_telephone');
$data['mytemplate'] = $this->config->get('config_template');

// Menu
$this->load->model('catalog/category');

Active Member

Posts

Joined
Sun Aug 06, 2017 5:28 am

Post by IP_CAM » Tue Mar 19, 2019 8:19 am

$data['text_blog'] = $this->language->get('text_blog');
$data['all_blogs'] = $this->url->link('information/blogger/blogs');
Well, remove that Code, and check on , what it does, if it still does.... :laugh:
And if not, some more code exists somewhere, I assume ;)
And don't forget, to also remove such Code in the Admin Section too.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by zzzzzz2 » Tue Mar 19, 2019 4:23 pm

Ernie...

BRILLIANT... THANK YOU SO MUCH... i have learnt quite a bit.. always helpful

you are a STAR mate...

Active Member

Posts

Joined
Sun Aug 06, 2017 5:28 am
Who is online

Users browsing this forum: No registered users and 24 guests