Post by skyknight » Fri Nov 11, 2011 5:14 pm

I want to use welcome module as custom html on my template. My problem is, i can't display selected language, it always display language with id (language_id) 1. It can't auto switch to another language.

Code: Select all

$subfooter[1]["description"][1]; 
I try to use this code but only get language code, still can't get language_id

Code: Select all

    	$lang = $this->language->get('code'); 

My full code:

Code: Select all

 <?php $subfooter = $this->config->get('welcome_module'); 
    	$subfooter_counter = count($subfooter);
 ?> 
 <div class="column">  
 <?php 
   if ($subfooter_counter >=  1 && $subfooter[1]["status"]) 
     echo html_entity_decode($subfooter[1]["description"][1]); 
 ?>
 </div>

 <div class="column">  
 <?php 
   if ($subfooter_counter >=  2 && $subfooter[2]["status"]) 
     echo html_entity_decode($subfooter[2]["description"][1]); 
 ?>
 </div>

Last edited by skyknight on Sat Nov 12, 2011 2:17 am, edited 1 time in total.

Newbie

Posts

Joined
Fri Nov 11, 2011 4:46 pm

Post by Hildebrando » Fri Nov 11, 2011 6:37 pm

Hi:

Code: Select all

$lccode =  $this->session->data['language'] ;

if ($lccode != 'en'){
      $this->session->data['language']= 'en'  ;
}
Hilde

Commercial Contributions:Bulk Specials| Bulk Update Prices|Search Tyre Pro
Free Contributions: Youtube video (oc 1.5.x) | Search History Report (oc 1.5.x) | Product Filter by Category (oc 1.5.x)|Youtube Popup
More Free & commercial mods: www.fpress.com


User avatar
Active Member

Posts

Joined
Fri Mar 06, 2009 8:22 pm
Location - Spain

Post by Xsecrets » Fri Nov 11, 2011 9:13 pm

Code: Select all

(int)$this->config->get('config_language_id') 

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by skyknight » Sat Nov 12, 2011 2:16 am

@Xsecrets, it works : )
THank you..

Newbie

Posts

Joined
Fri Nov 11, 2011 4:46 pm
Who is online

Users browsing this forum: No registered users and 112 guests