By default, X-Cart displays products ascendingly depending on your preferences. In your admin section under ‘General Settings > Appearance Options’ you can configure the default way X-Cart should display products (by product (SKU), default (Name) or price).
Let’s say we wanted to display products in Price order. It’s simply a matter of choosing the option ‘price’ from the dropdown and this changes the order of your products on the front-end straight away. Great!
However, because X-Cart displays products ascendingly, you end up with all your cheapest items first – good, but not great if you are a believer, like me, in top-down selling where the most expensive products should be displayed first.
If you want to alter this, there’s a couple of things you need to do.
1. Open ‘include/search.php’ and find the following line of code (around line 616 in X-Cart 4.3):
$direction = ($data["sort_direction"] ? "DESC" : "ASC");
Change it to:
$direction = ($data["sort_direction"] ? "ASC" : "DESC");
2. Open ‘skin1/customer/search_sort_by.tpl’ and find (around line 24):
class="search-sort-link {if $direction}down-direction{else}up-direction{/if}"
Change it to:
class="search-sort-link {if $direction}up-direction{else}down-direction{/if}"
That’s it. Now your default order, whether displaying by product, default or price is done so in descending order. Happy days.


