Post by Shinot » Fri Aug 18, 2017 5:08 pm

Hi

im running a testshop on OpenCart - Version 3.0.2.0 - here is the site in mainT mode.
http://billigcomputer.dk/

What i would like to do, is to put CreditCard logos in header ( old days it was PHP-file under COMMON folder, but now it's TWIG file )

How can i do that ? i need the code for how to insert a CREDITCARD link with logo into header and footer section?

See picture in attachment for my idea

Attachments

Screenshot_1.jpg

Screenshot_1.jpg (198.11 KiB) Viewed 1334 times


Newbie

Posts

Joined
Fri Aug 18, 2017 5:01 pm

Post by letxobnav » Fri Aug 18, 2017 5:38 pm

add into the controller header.php file:

// this basically just passes the info to the twig file.
$data['cc_logo'] = "<img src='logo.jpg>";

then in header.twig put the image where you want:

{{ cc_logo }}

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Shinot » Wed Aug 23, 2017 5:41 pm

Thanks for very helpful information and your time.

Last question:
after i modified the .php can i just go to the .twig file and put code like this:
{{ cc_logo }} and then i would show up ?

Newbie

Posts

Joined
Fri Aug 18, 2017 5:01 pm

Post by Shinot » Wed Aug 23, 2017 6:00 pm

I modified my php. but im not sure how to insert the {{ cc_logo }} part in TWIG file.. this what i inserted into header.TWIG and then the site looks weird :

<nav id="top">
{{ cc_logo }}

Perhaps you can write the full code of how to insert the {{ cc_logo }} in my header.TWIG file.. thanks....

Newbie

Posts

Joined
Fri Aug 18, 2017 5:01 pm

Post by letxobnav » Wed Aug 23, 2017 10:32 pm

depends on where you would like it to show.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Shinot » Thu Aug 24, 2017 7:51 pm

I would like to have it shown here see attachment please

Please show me how your insert the code in TWIG write full code line that you insert so i can copy and paste into mine..
Thanks!

Attachments

Screenshot_1.png

Screenshot_1.png (372.31 KiB) Viewed 1227 times


Newbie

Posts

Joined
Fri Aug 18, 2017 5:01 pm
Who is online

Users browsing this forum: No registered users and 326 guests