Skip to main content
MAGENTO: SORT BY PRICE: LOW TO HIGH AND HIGH TO LOW
/app/design/frontend/default/your-theme/template/catalog/product/list/toolbar.phtml file.
Find:
<option value=
"<?php echo $this->getOrderUrl($_key, 'asc') ?>"
<?php
if
(
$this
->isOrderCurrent(
$_key
)): ?> selected=
"selected"
<?php
endif
; ?>>
<?php
echo
$this
->__(
$_order
) ?>
</option>
And Replace with:
<?php
if
(
$_order
!=
'Price'
): ?>
<option value=
"<?php echo $this->getOrderUrl($_key, 'asc') ?>"
<?php
if
(
$this
->isOrderCurrent(
$_key
)): ?> selected=
"selected"
<?php
endif
; ?>>
<?php
echo
$this
->__(
$_order
) ?>
</option>
<?php
else
: ?>
<option value=
"<?php echo $this->getOrderUrl($_key, 'asc') ?>"
<?php
if
(
$this
->isOrderCurrent(
$_key
) &&
$this
->getCurrentDirection() ==
'asc'
): ?> selected=
"selected"
<?php
endif
; ?>>
<?php
echo
$this
->__(
$_order
) .
': Low to High'
?>
</option>
<option value=
"<?php echo $this->getOrderUrl($_key, 'desc') ?>"
<?php
if
(
$this
->isOrderCurrent(
$_key
) &&
$this
->getCurrentDirection() ==
'desc'
): ?> selected=
"selected"
<?php
endif
; ?>>
<?php
echo
$this
->__(
$_order
) .
': High to Low'
?>
</option>
<?php
endif
; ?>
Magento sort by special price (disounted product) on product list page dropdown (toolbar.phtml)
Comments
Post a Comment