Post by Livakee » Thu Mar 22, 2018 11:08 pm

Guys, please help me, I struggle a lot and I cannot find anything. I need to add an external link to a category (Menu) from my home page. All what I can find is related to opencart 2.x and I cannot apply those suggestions to opencart 3.x

thanks.

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Thu Mar 22, 2018 11:19 pm

All what I can find is related to opencart 2.x and I cannot apply those suggestions to opencart 3.x
No OC version posted. Although, where is the related instruction topic you found for v2.x releases? More information is needed.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Thu Mar 22, 2018 11:28 pm

sorry for that. I use open cart version 3.0.2.0

here's the 2.x info I was referring to: http://forum.opencart.com/viewtopic.php?f=190&t=147086

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Thu Mar 22, 2018 11:30 pm

I am not sure how really different are those instructions for v3.x releases ... you just need to head to the header.twig file instead of header.tpl file from the provided path and follow the same instructions ...

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Thu Mar 22, 2018 11:32 pm

tried that, but it doesn't work.

here's how the code looks like:

Code: Select all

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="{{ direction }}" lang="{{ lang }}" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="{{ direction }}" lang="{{ lang }}" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="{{ direction }}" lang="{{ lang }}">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ title }}</title>
<base href="{{ base }}" />
{% if description %}
<meta name="description" content="{{ description }}" />
{% endif %}
{% if keywords %}
<meta name="keywords" content="{{ keywords }}" />
{% endif %}
<script src="catalog/view/javascript/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">
{% for style in styles %}
<link href="{{ style.href }}" type="text/css" rel="{{ style.rel }}" media="{{ style.media }}" />
{% endfor %}
{% for script in scripts %}
<script src="{{ script }}" type="text/javascript"></script>
{% endfor %}
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
{% for link in links %}
<link href="{{ link.href }}" rel="{{ link.rel }}" />
{% endfor %}
{% for analytic in analytics %}
{{ analytic }}
{% endfor %}
</head>
<body>
<nav id="top">
  <div class="container">{{ currency }}
    {{ language }}
    <div id="top-links" class="nav pull-right">
      <ul class="list-inline">
        <li><a href="{{ contact }}"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md">{{ telephone }}</span></li>
        <li class="dropdown"><a href="{{ account }}" title="{{ text_account }}" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_account }}</span> <span class="caret"></span></a>
          <ul class="dropdown-menu dropdown-menu-right">
            {% if logged %}
            <li><a href="{{ account }}">{{ text_account }}</a></li>
            <li><a href="{{ order }}">{{ text_order }}</a></li>
            <li><a href="{{ transaction }}">{{ text_transaction }}</a></li>
            <li><a href="{{ download }}">{{ text_download }}</a></li>
            <li><a href="{{ logout }}">{{ text_logout }}</a></li>
            {% else %}
            <li><a href="{{ register }}">{{ text_register }}</a></li>
            <li><a href="{{ login }}">{{ text_login }}</a></li>
            {% endif %}
          </ul>
        </li>
        <li><a href="{{ wishlist }}" id="wishlist-total" title="{{ text_wishlist }}"><i class="fa fa-heart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_wishlist }}</span></a></li>
        <li><a href="{{ shopping_cart }}" title="{{ text_shopping_cart }}"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_shopping_cart }}</span></a></li>
        <li><a href="{{ checkout }}" title="{{ text_checkout }}"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_checkout }}</span></a></li>
      </ul>
    </div>
  </div>
</nav>
<header>
  <div class="container">
    <div class="row">
      <div class="col-sm-4">
        <div id="logo">{% if logo %}<a href="{{ home }}"><img src="{{ logo }}" title="{{ name }}" alt="{{ name }}" class="img-responsive" /></a>{% else %}
          <h1><a href="{{ home }}">{{ name }}</a></h1>
          {% endif %}</div>
      </div>
      <div class="col-sm-5">{{ search }}</div>
      <div class="col-sm-3">{{ cart }}</div>
    </div>
  </div>
</header>
{{ menu }}


Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Thu Mar 22, 2018 11:47 pm

tried that, but it doesn't work.
What does that explain exactly? According to the posted code, what did you added specifically rather than posting the entire file and where did you added the statement?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Thu Mar 22, 2018 11:54 pm

added this line:

Code: Select all

<li><a href="www.google.com">Forum</a></li>
after this:

Code: Select all

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ title }}</title>
<base href="{{ base }}" />
excuse me, I am pretty new to this domain. bare with me.

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Thu Mar 22, 2018 11:55 pm

You'd need to add it starting below this line:

Code: Select all

<ul class="list-inline">
Although, in your provided codes, no categories have been instantiated in the header. Ensure to edit the right TWIG file for your requirements.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Fri Mar 23, 2018 12:03 am

just did that...no result. here's the website link (check the forum button)

https://www.completebait.com/

i've edited the header.twig

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Fri Mar 23, 2018 12:18 am

Ensure to clear your OC admin cache from your OC admin in admin - > dashboard - > blue icon on the right and on your admin - > extensions - > modifications - > refresh button. Then, notice the changes on your store-front end.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Fri Mar 23, 2018 12:27 am

ok, just did that..nothing :(

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Fri Mar 23, 2018 12:30 am

Let's test this. Below the <body> tag, add:

Code: Select all

test123
Then, clear out your OC cache from your OC admin again. Then, see from the view source after refreshing the page on the store-front noticing the: test123 below the body tag. Do you see it?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Fri Mar 23, 2018 12:33 am

yes, check the website now. it is shown in the top left part of the scren

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Fri Mar 23, 2018 12:35 am

Good. Just checking if this issue was rather related to a cache issue which isn't. Where did you added the <li> line below the <ul section I pointed exactly this time?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Fri Mar 23, 2018 12:37 am

Indeed, right there:

Code: Select all

<body>
<nav id="top">
  <div class="container">{{ currency }}
    {{ language }}
    <div id="top-links" class="nav pull-right">
      <ul class="list-inline">
        <li><a href="www.google.com">Forum</a></li>
        <li><a href="{{ contact }}"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md">{{ telephone }}</span></li>
        <li class="dropdown"><a href="{{ account }}" title="{{ text_account }}" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_account }}</span> <span class="caret"></span></a>
          <ul class="dropdown-menu dropdown-menu-right">
            {% if logged %}
            <li><a href="{{ account }}">{{ text_account }}</a></li>
            <li><a href="{{ order }}">{{ text_order }}</a></li>
            <li><a href="{{ transaction }}">{{ text_transaction }}</a></li>
            <li><a href="{{ download }}">{{ text_download }}</a></li>
            <li><a href="{{ logout }}">{{ text_logout }}</a></li>
            {% else %}
            <li><a href="{{ register }}">{{ text_register }}</a></li>
            <li><a href="{{ login }}">{{ text_login }}</a></li>
            {% endif %}
          </ul>

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Fri Mar 23, 2018 12:39 am

If you change:

Code: Select all

<li><a href="www.google.com">Forum</a></li>
to:

Code: Select all

<li><a href="https://www.google.com">Forum</a></li>
Do you notice the link afterwards? (Clear cache)

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Fri Mar 23, 2018 12:41 am

still the same. Image

notice the url while hovering the forum button

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Fri Mar 23, 2018 12:44 am

You are attempting to add the forum link inside the category menu loop which obviously won't provide the results that you need. In order to add a static link inside a dynamic list, more coding would be needed to accomplish this.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Livakee » Fri Mar 23, 2018 12:46 am

but that seems to be easily accomplish-able on opencart 2.x ... :(

Newbie

Posts

Joined
Tue Feb 27, 2018 8:05 pm

Post by straightlight » Fri Mar 23, 2018 12:50 am

What was indicated on the other topic is how to add a link to the header menu but not indicated on how to add a link in the category menu itself.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: OSWorX and 26 guests