Jump to content

[Resolved] Force Date Added sort


CoderJim

Recommended Posts

I am using the foundation skin and I need to force only one sort, Date Added (oldest first) since these are dated periodicals for digital download and added to the archive over time, plus it just looks better and makes more sense than alphabetical or whatever. I would rather not provide the user with a sort option menu. Or, along this line, is there a way to 'arrange' the products the way we can with the options list, etc?

Any help you could provide would be appreciated.

Thanks

Link to comment
Share on other sites

I use the GTIN field of the inventory form, then chose the GTIN field as the default sort criteria (Store Settings, Layout tab).

The GTIN field is a VARCHAR database column, so it sorts alphabetically, not numerically. Thus, the GTIN needs to be expressed as 0001 through 4001, for example. Or, create any kind of a series of expressions that would naturally sort, Vol.17,No.04, for example.

Link to comment
Share on other sites

In the skin template content.category.php, look for:

{if isset($SORTING)}

Depending on the skin, this statement may be present above the list of products, and/or bolow the list of products, and maybe in alternate sections that are shown in different viewport widths. So, look everywhere in this template. There may even be a {include file='templates/element.sorter.php'} with a dedicated template for the sort selector.

Anyway, change the above statement to:

{if false && isset($SORTING)}

Because a template was edited, you may need to clear the skin cache.

Link to comment
Share on other sites

Further to this subject, this did remove the visible option for the user however the sort by using the month name/GTIN did not work, that said, using as you suggested the Vol. ** for a product ID and then selecting 'Product ID' in admin/layout/sorting does work, so this is now resolved.

Foundation Skin

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...