Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/28/2020 : 09:29:21
Is it possible to explicit display all products by popularity, number of sales, average rating, etc.
Terry (Redsei)
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/28/2020 : 17:44:38
Anybody else run into this need?
Terry (Redsei)
|
dbdave
ECT Moderator
USA
10277 Posts |
Posted - 03/28/2020 : 20:07:30
You can use the product filter and customers can select the sort based on options you choose. Would that work?
David
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/28/2020 : 20:10:54
I was hoping that when someone comes to a page, it could show products based on popularity for instance.
Terry (Redsei)
|
Marshall
Ecommerce Template Guru
USA
1874 Posts |
Posted - 03/28/2020 : 20:47:09
There is an "orsortby" option, but unless your pages are static, I do not see an easy way to make it a variable depending say on the category ID. That is not saying it is impossible, but it would require some PHP code in the head of your product page.
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/28/2020 : 20:48:38
PHP Code in the head would be totally fine.
Terry (Redsei)
|
dbdave
ECT Moderator
USA
10277 Posts |
Posted - 03/28/2020 : 22:42:59
Ok, I have a posted tip on how to change a parameter for one product or category. https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=100929 This will not work if you have the product filters in place because customers could override it. Here is the list quote: Product listings (Minimum version 1.3.7 - Maximum Version 5.9.4)
Note The sortBy parameters were moved to the admin main settings page in Version 6 but if you still need to set the product listing through the includes file you can use the $orsortby parameter. This is handy if you want to use them on static pages with a different listing. So if you want to sort the product listing alphabetically use $orsortby=1; Please note this setting also overrides the listing choices in the new product filter bar.
= sorting the products alphabetically = sorting the products by id = sorting the products by price (cheapest first) = sorting the products by price (most expensive first)
So for example if you wanted to list your products alphabetically you would choose this option: $orsortby = 1; or by product id like this $orsortby = 2;
$orsortby=5; This will sort the products by the order the products are within the database. This is particularly useful where the sort order is not important and will result in the fastest way of displaying products.
$orsortby=6; This will sort the products in ascending order depending on the value added to the "Product Order" box in the product admin page.
$orsortby=7; This will sort the products in descending order depending on the value added to the "Product Order" box in the product admin page.
$orsortby=8; This will sort the products in ascending order depending on the date added.
$orsortby=9; This will sort the products in descending order depending on the date added.
$orsortby=13; This will sort the products randomly (Version 6.6 required).
$orsortby=14; This will sort the products in ascending order depending on the sku (Version 6.7 required)
$orsortby=15; This will sort the products in descending order depending on the sku (Version 6.7 required)
Not on that list is 16 - Number of ratings 17 - Average Rating 18 - Sales Rank 19 - Popularity So something like the following in your products.php page (just before the incproducts.php include line) should give you some results. <?php if($_GET["cat"] === " your-category-name]") $orsortby=19; ?> Of course replace the part in red with the name of your category as it shows in the address bar. David
Edited by - dbdave on 03/28/2020 22:44:19
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/29/2020 : 07:15:07
(coming from a non-programmer)
Dave, so that I am understanding this right... all I need to do in my index.php page (for instance) is put this code
<?php if($_GET["cat"] === "PHOTOS") $orsortby=16; ?>
<?php include "vsadmin/inc/incproducts.php" ?>
and everything should work... or do I have to modify the includes as well?
Terry (Redsei)
|
dbdave
ECT Moderator
USA
10277 Posts |
Posted - 03/29/2020 : 08:33:47
That would not work on your home (index) page because it's not a page where the "cat" querystring appears, so it would not work. If it's your home page, then you should just use the crosssell feature.
https://www.ecommercetemplates.com/help/home-page-display.asp
Have you looked into that?
David
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/29/2020 : 08:36:02
No... but I will look into that right now.
Terry (Redsei)
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/29/2020 : 09:10:06
Tried it out and for the most part, just using for the best sellers and recommended will work... but requires manual input.
I get that for the recommended cause you are trying to sell what you want. For the best sellers will work but if you have just started out, and only sold one... then ONE will show up. (not too sure if you can control how many after you sell 100 different ones... if there is a cap on that?)
BUT
for the Popularity or Ratings... well that's what I'm really after.
QUESTION: You can't just can't add the "$orsortby=19" after a search query on the URL... or something like that eh?
Terry (Redsei)
|
Vince
Administrator
42466 Posts |
Posted - 03/29/2020 : 09:38:30
|
Terry Paulhus
Ecommerce Template Expert
Canada
543 Posts |
Posted - 03/29/2020 : 09:45:19
Ok, I often talk in riddles or not clearly enough so forgive me....
Here is what I am looking to do:
Someone comes to a page (index.php)
What they see is a section that shows products (12) that are based on popularity
then
they see is a section after that which shows products (6) that are best selling
then
they see is a final section that shows products (30) that are based on descending order
—this is all on one page (hopefully)
Terry (Redsei)
|
|
|