Generates a list of recent products sorted by the most recent additions. Note that this list is grabbing a list of all products and sorting them by the most recent. So if the most recent product addition was 6 months ago, it will still be the "Newest arrival".
First up, you'll want to construct this on a copy of your category page - it'll use the same basic template with the following tweaks. You'll then need to create a content page called "New Arrivals" and assign the new cloned template.
At the head of your file, change your
page type variable to use something that is not
category. We do this because we don't want to trigger the category options that usually appear in the sidebar include as filters will not work with this tweak.
Adjust the thumblist for the product list on this page to have the following parameters (
filter_category:0 to look at your entire inventory,
sortby:'new_arrivals' which means the most recent product additions are up first &
limit:'100' - a reasonable limit in case the seller has an inventory of thousands of items.) :
[%thumb_list type:'products' filter_category:'0' sortby:'new_arrivals' limit:'100'%]
Finally, you'll want to remove this code from the header of that
<div class="col-xs-8 col-sm-5 col-md-4"> <form method="get" class="form-horizontal" action="[@config:CURRENT_URL@]"> <input name="rf" type="hidden" value="[%FILTER_CODE%][%/FILTER_CODE%]"> <div class="form-group"> <label class="control-label col-xs-2">Sort</label> <div class="col-xs-10"> <select name="sortby" onChange="return this.form.submit();" class="form-control"> <option value="popular" [%SORTBY type:'products' if:'eq' value:'popular'%]selected[%/SORTBY%]> Most Popular </option> <option value="name" [%SORTBY type:'products' if:'eq' value:'name'%]selected[%/SORTBY%]> Name </option> <option value="SKU" [%SORTBY type:'products' if:'eq' value:'SKU'%]selected[%/SORTBY%]> SKU </option> <option value="lowest_price" [%SORTBY type:'products' if:'eq' value:'lowest_price'%]selected[%/SORTBY%]> Lowest Price </option> <option value="highest_price" [%SORTBY type:'products' if:'eq' value:'highest_price'%]selected[%/SORTBY%]> Highest Price </option> </select> </div> </div> </form> </div>
If they use this it won't work because we've hardcoded the param in the thumb_list.
headers/template.html and paste the below code directly below
[%menu id:'web_header'%], making sure to replace the
id with the
id of the content page you created in the first step:
[%param *header%] <li><a href="[%url type:'content' id:'11'/%]">New Products</a></li> [%/param%]