Created
February 1, 2016 17:48
-
-
Save flayder/5df959b9f74dee00dd84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| В section.php добавляем: | |
| <?if ($_GET["sort"] == "name" || | |
| $_GET["sort"] == "catalog_PRICE_3" || | |
| $_GET["sort"] == "property_PRODUCT_TYPE" || | |
| $_GET["sort"] == "timestamp_x"){ | |
| $arParams["ELEMENT_SORT_FIELD"] = $_GET["sort"]; | |
| $arParams["ELEMENT_SORT_ORDER"] = $_GET["method"]; | |
| }else{}?> | |
| В template.php: | |
| <p>Сортировать по: | |
| <a <?if ($_GET["sort"] == "name"):?> class="actived" <?endif;?> href="<?=$arResult["SECTION_PAGE_URL"]?>?sort=name&method=asc"> | |
| Названию | |
| </a> | |
| <a <?if ($_GET["sort"] == "catalog_PRICE_3"):?> class="actived" <?endif;?> href="<?=$arResult["SECTION_PAGE_URL"]?>?sort=catalog_PRICE_3&method=asc"> | |
| Цене | |
| </a> | |
| <a <?if ($_GET["sort"] == "timestamp_x"):?> class="actived" <?endif;?> href="<?=$arResult["SECTION_PAGE_URL"]?>?sort=timestamp_x&method=desc"> | |
| Новые поступления | |
| </a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment