Jump to content

Blocklayered reloadContent() returns wrong language


jean.gravier

Recommended Posts

Hello !

 

I have a problem using prestashop with blocklayered module, my shop's default language is French (id_lang = 1).

 

Here are the steps to get to the error:

I switch to English (id_lang = 4) and go to the product list page, all the products are written in English, no problem here.

Then, each time I try to use blocklayered filters, all the results returned are written in French instead of English.

 

I added var_dumps in the header and on the product-list.tpl to see the value of $cookie->id_lang. They are both set to 4 (English language). After using blocklayered, I still have the id_lang to 4 in header BUT, the one that is in product-list is now set to 1 which is the french id_lang.

 

I dont know what to do.

 

PS version: 1.6.1.0

Blocklayered version: 2.1.3

Edited by jean.gravier (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi,

 

you can solve the problem adding id_lang to url.

 

This is the code of blocklayered.js:

   ajaxQuery = $.ajax(
        {
                type: 'GET',
                url: baseDir + 'modules/blocklayered/blocklayered-ajax.php',
                data: data+params_plus+n+'&id_lang='+id_lang,
                dataType: 'json',
                cache: false, // @todo see a way to use cache and to add a timestamps parameter to refresh cache each 10 minutes for example
                success: function(result)
                {
....

Bye

Paolo

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...