prestashop currency block and language block is not displaying properly

3.9k Views Asked by At

I need to implement currency block as well as language block in my prestashop shop v1.5.6.1.I have implemented these modules in advance footer section.language block is visible but i cant able to change the language by using dropdown.Currency block module is not dislaying at all in front end.

2

There are 2 best solutions below

7
Shaik Rilwan On BEST ANSWER

add this line in your blockcurrencies.php file

    public function hookdisplayFooter($params){
    if ($this->_prepareHook($params))
        return $this->display(__FILE__, 'blockcurrenciesfooter.tpl');       
}

add a blockcurrenciesfooter.tpl in your module folder.

add this code in blockcurrenciesfooter.tpl

<form id="setCurrency" action="{$request_uri}" method="post">
    <div class="change_currency"><span>Choose Currency</span><br/> 
        <select class="change_currency"> 
            {foreach from=$currencies key=k item=f_currency} 
            <option value="{$f_currency.id_currency}">
                {$f_currency.sign} {$f_currency.name}
            </option> 
            {/foreach} 
        </select> 
    </div> 
</form>
<script type="text/javascript">
$('.change_currency').change(function(){
javascript:setCurrency($(this).val());
});
</script>

Hook "Currency block" module to displayFooter

1
Rama Priya On

I have made block language module to work by adding languages downloaded from Translation and upload it into my prestashop through

admin->localization->languages

Now its working fine.