Post by becreative » Fri Jan 10, 2014 9:37 pm

Hello !

I need a clue - welcome module save data in oc_settings table, in calalog/view/modules/welcome.tpl code:

Code: Select all

<?php echo $message; ?>
displaying that data, for each row of module.

The controller part:

Code: Select all

(...)
$this->data['message'] = html_entity_decode($setting['description'][$this->config->get('config_language_id')], ENT_QUOTES, 'UTF-8');
And my question: How can I display description from selected row?

for example - edit tpl file and get something similar to:

Code: Select all

<?php echo $message[1]; ?>
<?php echo $message[2]; ?>
<?php echo $message[3]; ?>
Really aprecitate of any clue and the simplest way to do this.
Thanks !

Newbie

Posts

Joined
Fri Jan 10, 2014 9:21 pm

Post by inactiveaccount9912 » Sat Jan 11, 2014 10:04 am

In the tpl you want to use it, try:

Code: Select all

<?php $messages = $this->config->get('welcome_module'); ?>
<?php echo $messages[1]['description'][$this->config->get('config_language_id')]; ?>
<?php echo $messages[2]['description'][$this->config->get('config_language_id')]; ?>
<?php echo $messages[3]['description'][$this->config->get('config_language_id')]; ?>
(inspect the areas in admin and make sure those are the row indexes)

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by becreative » Sun Jan 12, 2014 2:52 am

Work lika a charm - Thank You ! :)

Newbie

Posts

Joined
Fri Jan 10, 2014 9:21 pm
Who is online

Users browsing this forum: No registered users and 11 guests