New Arrivals Page
New Arrivals Page
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".
Check that the list folder exists
/httpdocs/assets/themes/[THEME-NAME]/and check that your theme contains a list folder. Within the list folder there should be be two folders: Content, and Product. Within these folders there will be various files.
For this tweak the file
[THEME-NAME]/templates/list/product/template.html is of importance.
- If the file above does not exist in your fileserver you should follow the instructions located on the list tag page to add the files required for this tweak to work.
Important Note: If you are an established Neto customer, or have had custom work completed on your theme you may have customisations within the thumbs folder of your theme. In order to keep your templates up to date we suggest copying your current thumbs template into the corresponding list folder.
For this tweak the file you need to copy is:
Once you have copied all the code from here navigate to
[THEME-NAME]/templates/list/product/template.html and replace all of the code in this file with the code copied to your clipboard.
Coding and Implementaion Instructions
Duplicate your existing
/httpdocs/assets/themes/[THEME-NAME]/templates/cmsand rename it as
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.
Copy and paste the below code into the newly duplicated file, replacing where your current products are being listed out. These products will be listed out within either a
[%list type:'product' template:'' sort:'new_arrivals' limit:'4'%] [%param *header%] <h3>New Arrivals</h3> <div class="row"> [%/param%] [%param *footer%] </div> [%/param%] [%/list%]
- To add a link in your header to this new page you'll need to create a informaton page called New Arrivals, and assign the new cloned template.
headers/template.htmlfile 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%]
Adjust the filter_category and limit paramenters using the instructions below.
Filter Category Parameter
The filter_category parameter controls whether or not the list tage will display content that is limited to a certain category. If you do not want to restrict the categories that are displayed you do not need to do anything. If, however, you would like to limit the categories that display add the following code within the list tag:
In the above example the 302 tag represents the category ID that you wish to filter by. The category ID can be found in the Neto control panel in the Products > Product Categories menu, in the ID/Ref column.
The opening tag for your list tag should now look something like this:
[%list type:'product' template:'' sort:'new_arrivals' limit:'4' filter:'content=[@id@]'%]
The limit parameter controls the maximum number of thumbnails that will display. If the limit parameter is omitted the list function will display all available content/products.
Here is an example of an opening list tag with the limit set to '4':
[%list type:'product' template:'' sort:'new_arrivals' limit:'4'%]