Getting the wrong chinese string in search query result!! Magento 1
-
25-12-2020 - |
Pregunta
I have a store in chinese language. When I search for any product it works fine. But when I sort the result page by sku, name or price it does not work. It seems that I've got the wrong url for sorting.
Please help me!!!! How can I get the proper string url for the sorting option?
Please see the screenshot!!
Solución
app/design/frontend/[Magento theme Folder]/template/catalog/product/list/toolbar.phtml
Goto: 82 Line or search getOrderUrl($_key, 'asc') ?>
from
<label><?php echo $this->__('Sort By') ?></label>
<select onchange="setLocation(this.value)">
<?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
<option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
<?php echo $this->__($_order) ?>
</option>
<?php endforeach; ?>
</select>
to
<label><?php echo $this->__('Sort By') ?></label>
<select onchange="setLocation(this.value)">
<?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
<option value="<?php echo urldecode($this->getOrderUrl($_key, 'asc')) ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
<?php echo $this->__($_order) ?>
</option>
<?php endforeach; ?>
</select>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange