Opencart - how to find which file add a menu on admin header - php

I'm trying to add a custom menu on my admin dashboard as a dropdown link that's based on Opencart. I've changed my header.tpl and related files and it's ok . The problem is here that when it shows the menu , it adds some other links that i don't want to be there :(
I've checked vqmode file and it doesn't have anything for that . i don't know what is wrong with me that i can't find the file that add those menus ?
Link To Screenshot
this is what i have in header.tpl file for that menu :
<li id="help"><a class="top" onclick="window.open('xxxx');"><?php echo $text_help; ?>
<ul id="training">
<li><?php echo $text_training_video; ?></li>
</ul>
</a>
</li>
and this is what i have after rendering :
<li id="help" class="sfHover"><a class="top" onclick="window.open('xxx/support/');">Help </a><ul id="training" style="display: block; visibility: visible;"><a class="top" onclick="window.open('xxx/support/');">
</a><li><a class="top" onclick="window.open('xxx/support/');"></a>Trainig Videos</li>
</ul>
</li>

From the screenshot you've added it seems like you're using an admin theme installed via vqmod file. The links that appear in the 'Help' menu are default opencart links. So you need to remove those links in header.tpl or from the admin theme xml file.
Steps to try:
Rename the vqmod/xml folder and check. If the issue doesn't exist, then searched in xml files.
(step 1 failed to help) Search again in admin\view\template\common\header.tpl to see whether there's anything under <li id="help"><a class="top"><?php echo $text_help; ?></a>.
(step 1 & 2 failed to help) Rename 'admin\view\template\common\header.tpl' to confirm that you were working on the correct template file.

Related

Routing links in a Nav with PHP

I'm using PHP and XAMPP for a website. My current dilemma is that I'm not finding any answers/help on how to properly route links in my nav bar depending on which directory I am in. Here is a general file setup:
-index.php
|
-views folder-> nav.php, testing.php, (all php pages here)
|
-images folder-> all imgs
The issue is the links in my < a href="" > tags will be different for the index vs all other php pages (since they are all in my views folder).
I am including my nav on all php pages as such:
<?php
require "nav.php";
$thisPage = "pagesName";
?>
I am attempting to utilize the $thisPage="" (for all pages) to help with routing in the nav page:
<?php
if ($thisPage=="indexPage") {
echo '
<li>Contact Us</li>
<li>Testing Centers</li>
<li>Home</li>
<li><img src="images/global.png"></li>';
} else { //every other page already in the views folder
echo '
<li>Contact Us</li>
<li>Testing Centers</li>
<li>Home</li>
<li><img src="../images/global.png"></li> ';
}
?>
The nav loads correctly for index, however, none of the links/imgs work, all links give "Object not found! Error 404". Using the console, I know the if($thisPage=="index"){} is entered, but still no links are working.
Thanks in advance!

Image source path changing on different pages

I'm using Genesis and I have a functions.php that I have inserted images there using hooks to the footer.
I've used a widget to insert an image to the header.
The images are displayed correctly when viewed in the homepage, but when I switch a page, the images are not displayed.
Further investigation concludes that wordpress is seeking the file with a wrong path source.
That's the path source in the homepage - wp-content\themes\childTheme-Almog\images\linkedin.png
And wordpress is looking for it as it should.
However, on another page, called 'X', wordpress is looking for the same image as follows:
\wordpress\x\wp-content\themes\childTheme-Almog\images\linkedin.png
As you can tell, it adds to the path the page name as a folder, which it shouldn't do, because the image is not there.
Is there a way to make wordpress look for the image like it does on the homepage?
Here's how my images are implemented in my functions.php:
<div class="d_footer">
<ul id="list_left">
<li class="foot" id="ft_text1"><img src="wp-content\themes\childTheme-Almog\images\phone.png" alt="phone">
<span style="color: #969697">|</span><span style="margin-left:30px;"></span><img src="wp-content\themes\childTheme-Almog\images\envelope.png" alt="envelope"></li>
<li class="foot" id="ft_text2"></li>
</ul>
<ul class="foot" id="list_right">
<li id="ft_text3"><img src="\wp-content\themes\childTheme-Almog\images\linkedin.png" alt="linkedin" align="left">Almog's linkedin profile</li>
<li id="ft_text4"></li>
</ul>
</div>
You really should be using Wordpress' get_stylesheet_directory_uri variable to alleviate problems with paths like this.

HTML - href adds a # to current URL

I'm creating a "web store". I've created a navbar using Bootstrap. I have 3 php files: index, category and article, all .php
<li class="dropdown">
Categories<span class="caret"/>
<ul class="dropdown-menu">
<li>Compu</li>
<li><a href="categorias.php?categoria=Mascotas" >Animals & Pets</a></li>
<li>Office</li>
<li>Music & Movies</li>
</ul>
</li>
The "Category" link works only as a dropdown, you click it and it shows the submenu.
Categorías<span class="caret"/>
This code is in all 3 files, but it only works on index and category. When I click it on the article.php file it only adds a "#" to the current URL.
localhost/store/article.php?id=1 -> localhost/store/article.php?id=1#
I'm using the id to show the selected article's info from a database. I use it too on the category.php file but the dropdown link works there. Everything else works fine, except that link.
Am I missing something?
PS. I'm only using HTML and PHP in my files.
Sounds like you forgot to import the necessary bootstrap dependents on the article page.
Necessary Dependents
CSS
bootstrap.min.css , or theme if you are using
JavaScript files
jQuery
bootstrap.min.js
Sounds like a JS issue.

how to display categoreis from different stores under same navingation in magento

i am new to magento , I have 2 stores with different Root categories, what i want to know is how to display categories from both store under same Navigation Bar, I mean i want some thing like
Nav Bar----> Cat1(Store1)|Cat2(Store1)| Cat3(Store2)|Cat4(Store2).
?
Just load your category by id, like this,
<?php
echo Mage::getModel("catalog/category")->load(5)->getUrl();
?>
5 -> is your category id. Its unique. So no problem by different store.
Update :
First you need to know where it would coming from (which file ).? For this enable template path hints in your admin panel. Just google how to do this..So now you know the file and thats path. Then modify it, its like this, (just example)
<div class="nav-container">
<ul id="nav">
<?php echo $_menu ?>
</ul>
</div>
If you dont want previous links just remove and add like this,
<div class="nav-container">
<ul id="nav">
<li><?php echo Mage::getModel("catalog/category")->load(5)->getName(); ?></li>
</ul>

modify wordpress wp_nav_menu url

How could I change the code generated by wp_nav_menu?
Right now it generates:
<ul class="rounded ">
<li class="arrow">Menus</li>
</ul>
I'd like it to look like this:
<ul class="rounded ">
<li class="arrow">Menus</li>
</ul>
i found this link, but could not get it working properly.
http://wordpress.org/support/topic/how-do-i-modify-wp_nav_menu-link-hrefs?replies=2
The link from support forum doesn't talk about the version number of the wordpress that he is using. I am currently on 3.2.1, it is having the menu options under Appearance section. You can check out this awesome post on menus. It gives you an option of modifying the href as well.
I hope you are on version > 3. If not possible to update then it has to be done using wp functions.

Categories