Page 1 of 1

Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 2:46 pm
by milok
Hello,

I've been using opencart 3.0.2 for about 2 weeks now, but i do have a decent amount of experience in other programs/code.

So I've got a problem with adding a link to my dropdown menu in the header ("dropdown-menu pull-right") the class(line of code) is located in:
E:\Apache24\htdocs\opencart\catalog\view\theme\default\template\common\cart.twig
I've added an image of how the inspector sees the dropdown in the frontend.
Feel free to tell me if there is any other information you would need,
Milo

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 4:00 pm
by xxvirusxx
So you want to have a drop down menu( like My account) after Checkout?

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 4:17 pm
by milok
xxvirusxx wrote:
Mon Apr 23, 2018 4:00 pm
So you want to have a drop down menu( like My account) after Checkout?
I'd like to add a checkout link to the cart dropdown, by that I mean under the product you can see in the upper right corner of the image i attached.

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 4:40 pm
by xxvirusxx
Try to add

Code: Select all

<li><div class="header_cart">{{ cart }}</div></li>
After

Code: Select all

<li><a href="<?php echo $checkout; ?>.......
And you can add css for header_cart

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 5:48 pm
by milok
xxvirusxx wrote:
Mon Apr 23, 2018 4:40 pm
Try to add

Code: Select all

<li><div class="header_cart">{{ cart }}</div></li>
After

Code: Select all

<li><a href="<?php echo $checkout; ?>.......
And you can add css for header_cart
hmm, tried to add the code into header.twig and some others. Did you think of any specific file i should add this into?

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 6:05 pm
by xxvirusxx
So not show?

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 6:14 pm
by milok
xxvirusxx wrote:
Mon Apr 23, 2018 6:05 pm
So not show?
Yeah nothing came up when i put that code into the header.twig

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 6:27 pm
by xxvirusxx
Refresh ocmod, clear cache

Also you can use div

Code: Select all

	 <div class="nav pull-right">
		<div class="header_cart">{{ cart }}</div>
         </div>
Or just one div

Code: Select all

<div class="header_cart">{{ cart }}</div>
And add to css:

Code: Select all

.header_cart {
    max-width:200px;
    float: right!important;
}
More css tune for mobile...

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 6:51 pm
by milok
xxvirusxx wrote:
Mon Apr 23, 2018 6:27 pm
Refresh ocmod, clear cache

Also you can use div

Code: Select all

	 <div class="nav pull-right">
		<div class="header_cart">{{ cart }}</div>
         </div>
Or just one div

Code: Select all

<div class="header_cart">{{ cart }}</div>
And add to css:

Code: Select all

.header_cart {
    max-width:200px;
    float: right!important;
}
More css tune for mobile...
Alright haven't added any text yet to the link but should i just change the div to "header_checkout" so that it redirects the user to checkout?

Re: Which file/files to modify? Oc 3.0.2

Posted: Mon Apr 23, 2018 7:52 pm
by xxvirusxx
Class header_cart is to be used in CSS....to make changes only for that div..

Re: Which file/files to modify? Oc 3.0.2

Posted: Thu Apr 26, 2018 1:47 pm
by milok
xxvirusxx wrote:
Mon Apr 23, 2018 7:52 pm
Class header_cart is to be used in CSS....to make changes only for that div..
I've gotten the link for checkout to work, but when i hover over the checkout link a weird red line shows up. I attached a screenshot of this. It says in the inspector that it is the <a href=".." line that is the redline.
Sorry for this late answer.