Post by apmuskel » Wed Feb 08, 2017 7:03 am

I am working on adding a fixed header for mobile device that shows a cart total price(no text displaying number of products) and a button for "go to checkout".

Was thinking this would be pretty easy but is stuck on pulling the cart total into my "mobile header" code.
I was thinking it would just be to write

Code: Select all

<?php echo $total['text']; ?>
but that returns an error.
Im no php guru so would like some help with this

Found an similare problem in an old thread but that was for OC 1.5.. I run 2.3

Im planning on adding this header in the header.tpl
Do I need to mess with the controllers or what?

Thx guys

Newbie

Posts

Joined
Fri Aug 28, 2015 9:06 pm

Post by thekrotek » Wed Feb 08, 2017 1:18 pm

Yes, you need to add a foreach clause in header controller to get the "total" order total and then assign it's value to some distinct variable.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by apmuskel » Wed Feb 08, 2017 5:33 pm

ok, thx. One step closer :)

Could someone help me or point me in the right direction regarding what I need to do in the controller and how to later pull the price in the header.tpl?

Newbie

Posts

Joined
Fri Aug 28, 2015 9:06 pm
Who is online

Users browsing this forum: No registered users and 4 guests