Answer the question
In order to leave comments, you need to log in
How to remove # from filter url (PrestaShop blocklayered module)?
CMS PrestaShop
Module: blocklayered
Good afternoon, I have a question that I can not solve either by myself or with the help of Google.
Saw a lot of similar questions, but not a single implementation.
Situation:
The site has a filter. When filtered, it returns the following url:
/catalog#/type-kurtka_ukor_bryuki/gost-124280_2014
The url contains a # (pound sign). My job is to get her out of there. What would the url be one of the following options:
/catalog/type-kurtka_ukor_bryuki/gost-124280_2014
/catalog/filter/type-kurtka_ukor_bryuki/gost-124280_2014
$type_filter['values'][$key]['link'] = $categorie_link.'#'.ltrim($parameters, '/');
$type_filter['values'][$key]['link'] = $categorie_link.'/filter'.ltrim($parameters, '/');
'current_friendly_url' => '#'.$filter_block['current_friendly_url']/*((int)$n == (int)$nb_products) ? '#/show-all': '#'.$filter_block['current_friendly_url']*/,
'current_friendly_url' => '/filter'.$filter_block['current_friendly_url']/*((int)$n == (int)$nb_products) ? '#/show-all': '#'.$filter_block['current_friendly_url']*/,
if (current_friendly_url != '#'){
window.location.href = current_friendly_url;
}
if (current_friendly_url != '/filter'){
window.location.href = current_friendly_url;
}
if (current_friendly_url != '#/show-all')
$('div.clearfix.selector1').show();
if (current_friendly_url != '/filter/show-all')
$('div.clearfix.selector1').show();
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
{
var params = window.location.href.split('#')[1];
reloadContent('&selected_filters='+params);
}
if (window.location.href.split('/filter').length == 2 && window.location.href.split('/filter')[1] != '')
{
var params = window.location.href.split('/filter')[1];
reloadContent('&selected_filters='+params);
}
/catalog/filter/type-kyrtka
/filter/type-kyrtka
/catalog/filter/type-kyrtka
Answer the question
In order to leave comments, you need to log in
Look at the redirect in .htaccess - Prestashop outputs in the URL line something completely different from what it actually generates. Find where the output of the URL string for the filter is and convert the new version to a working internal address.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question