Post by silkcamel » Fri May 27, 2016 4:10 am

Dear All,

I'm trying to accepting all credit card, and would like to add "payment method" with credit card image on home webpage, like bottom right. Anyone know how to do that? Thanks.

Version: Opencart V2.2.0.0

image see attached.

Attachments

cards.jpg

cards.jpg (12.2 KiB) Viewed 4149 times


New member

Posts

Joined
Sun May 01, 2016 6:05 am

Post by kirkhall » Fri May 27, 2016 6:11 am

If you just want it on your homepage I would use the HTML content module (extensions>>modules>>HTML content) to add your image and whatever text you want to display and then add it to your home layout at Designs>>Layouts....maybe have it display at the bottom.
If you would like for your image to be on every page I would manually insert your image in catalog/view/theme/default/template/common/footer.tpl.

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am

Post by silkcamel » Sat May 28, 2016 1:09 am

Hi Kirkhall,

could you please provide a little bit more step by step details for method 1 and 2?

Method 1:

I added one "payment methods" in extensions>>modules>>HTML content, and enable it, and also added one layout at designs>> layouts, but nothing show up in homepage.

method 2:

what code should I add in footer.tpl?

thanks a lots.

New member

Posts

Joined
Sun May 01, 2016 6:05 am

Post by kirkhall » Sat May 28, 2016 5:19 am

silkcamel wrote:Hi Kirkhall,

could you please provide a little bit more step by step details for method 1 and 2?

Method 1:

I added one "payment methods" in extensions>>modules>>HTML content, and enable it, and also added one layout at designs>> layouts, but nothing show up in homepage.
You don't actually add a new layout in designs>>layout. You add whatever you created in HTML content to the Home layout that is already there. Select edit next to Home layout and add the html content you created under module, position and sort order. Pick Content Bottom for position. You probably won't care for this method as it will be above the footer. I typed out a reply on how the html content and layout work for someone else trying to figure it out at http://forum.opencart.com/viewtopic.php?f=190&t=157851 that might help you understand how it works.
silkcamel wrote: method 2:

what code should I add in footer.tpl?

thanks a lots.
In catalog/view/theme/default/template/common/footer.tpl and just above

Code: Select all

<div id="powered"><?php echo $powered; ?></div>
enter something like

Code: Select all

<img src="image/data/cards/visa_mc_discover_paypal.jpg"
 height="89" width="500" alt="payment methods">
which is the path to your credit card image. Since I have no idea where you image is that's the best I can do. You will probably have to style it somehow to get it to line up correctly and I or someone can probably help you with that if you provide a link to your site.

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am

Post by silkcamel » Sat May 28, 2016 11:45 pm

Thank you so much for the detailed instruction. but I must missed something for method 1.

somehow I only can add image or text on the middle section of home page (see attached section 2). However, where I want to added is section 1 or section 3 (top and bottom area, see attached photo).

I open the home layouts, which only allow me to add something in the middle section 2 area.

please let me the solutions.

Attachments

opencart.jpg

opencart.jpg (127.59 KiB) Viewed 4102 times


New member

Posts

Joined
Sun May 01, 2016 6:05 am

Post by straightlight » Sun May 29, 2016 1:27 am

You can either add the images onto your information module page or into a separate module by setting the layout option to the bottom of the page which would pretty much simplify all the steps. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by silkcamel » Sun May 29, 2016 2:35 am

When I set the setting the layout option to the bottom of the home page, it's really bottom of section 2 area, not section 3 area.

New member

Posts

Joined
Sun May 01, 2016 6:05 am

Post by straightlight » Sun May 29, 2016 2:40 am

In catalog/view/theme/default/template/common/footer.tpl file,

find:

Code: Select all

<div class="col-sm-3">
        <h5><?php echo $text_account; ?></h5>
        <ul class="list-unstyled">
          <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
          <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li>
          <li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>
          <li><a href="<?php echo $newsletter; ?>"><?php echo $text_newsletter; ?></a></li>
        </ul>
      </div>
since you use a custom theme, you can always find the similar block I posted and reproduce that similar block right underneath and paste in your payment methods image so that it would show right above the 'powered by' alignment and under the: account, order, wishlist and newsletter row.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by silkcamel » Sat Jun 04, 2016 6:59 am

Straightlight,

I have image saved on my local drive, what exact code should I add? and add udner which line on file catalog/view/theme/default/template/common/footer.tpl ?

Apologize for this stupid question. Thanks.

New member

Posts

Joined
Sun May 01, 2016 6:05 am
Who is online

Users browsing this forum: No registered users and 9 guests