Page 1 of 1

Welcome Module-how to get description from selected row

Posted: Fri Jan 10, 2014 9:37 pm
by becreative
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 !

Re: Welcome Module-how to get description from selected row

Posted: Sat Jan 11, 2014 10:04 am
by inactiveaccount9912
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)

Re: Welcome Module-how to get description from selected row

Posted: Sun Jan 12, 2014 2:52 am
by becreative
Work lika a charm - Thank You ! :)