Post by Bramborak » Sat May 27, 2017 6:14 am

Hello,
i want to access $text_wishlist in cart.tpl. I was trying to take code for this variable from header.php to cart.php like this:

// Wishlist
if ($this->customer->isLogged()) {
$this->load->model('account/wishlist');

$data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), $this->model_account_wishlist->getTotalWishlist());
} else {
$data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0));
}
BUT its not working. Even $data['text_wishlist'] = "Ahoj"; is not working. Please, what am I doing wrong and how can i access $text_wishlist variable in cart.tpl?

Very thanks :)

Newbie

Posts

Joined
Wed May 24, 2017 7:36 pm

Post by IP_CAM » Sun May 28, 2017 1:05 am

Well, this cannot be a Version 1.5.x: :'(
$data['text_wishlist'] = sprintf($this->language->get('text_wishlist') ....
because then, it would look like this:
$this->data['text_wishlist'] = sprintf($this->language->get('text_wishlist') ....
---
Newbie or Not, should not keep one from taking it top seriously, or OC will never work.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 204 guests