Author |
Topic  |
|
jack208
VP-CART New User

Malaysia
116 Posts |
Posted - November 29 2015 : 08:14:53
|
The Top Seller box in my webstore is displaying a lot of accessory items which we would sell a lot more than the main game titles. We would like to display the main product top sellers excluding these accessories (which are in a category of their own).
Is there anyway I can customize the filter/query for the Top Seller box to exclude certain categories? |
Edited by - jack208 on December 06 2015 07:29:46 |
|
support
Administrator
    
4679 Posts |
Posted - December 03 2015 : 03:54:06
|
Hi Jack,
Unfortunately this will require custom coding.
Thank you.
Cam Flanigan VPCart Customer Care Team www.vpcart.com
|
 |
|
carfin
VP-CART Expert
  
United Kingdom
948 Posts |
Posted - December 03 2015 : 06:02:12
|
Hi Jack,
If it''s only one category (or a higher category) that you permanently want to exclude from display it''s an easy adjustment to the file shopproductsubs.asp. For a list of categories it will be a custom job as Cam said. I can help with the single category, just let me know
Regards,
Carrol www.deanston-electrical.co.uk |
 |
|
jack208
VP-CART New User

Malaysia
116 Posts |
Posted - December 03 2015 : 08:22:56
|
Yes Carrol, it''s only a single category. If you can let me know which part of the code to change, I should be able to get that done.
I''ve made some changes but it seems it''s not getting into the SQL - or maybe I simply changed the wrong sub. |
 |
|
carfin
VP-CART Expert
  
United Kingdom
948 Posts |
Posted - December 03 2015 : 08:52:53
|
I am still using V7.00 but I think the basic sql commands should be the same for v8
Save a copy and open file shopproductsubs.asp
Find the following sub (approx. line 1850)
sub TopTenProduceDetail
then find the following lines and add the code I have highlighted in red where 2 is the id of the category that you want to hide
''701 - 2010.12.20 - Enhancement: Increase speed while generating topseller psql = "* from products p, prodcategories cc, categories c where p.CatalogId=" & lnghigherCatalogId psql = psql & " and cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid and c.categoryid<>2" else ''701 - 2010.12.20 - Enhancement: Increase speed while generating topseller psql = "select * from products p, prodcategories cc, categories c where p.CatalogId=" & lngCatalogId psql = psql & " and cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid and c.categoryid<>2" end if
Save and test
Hope this helps,
Regards,
Carrol www.deanston-electrical.co.uk |
 |
|
jack208
VP-CART New User

Malaysia
116 Posts |
Posted - December 04 2015 : 17:55:07
|
Carrol, thanks for the tips. Put the codes in place and they worked! I''ll try and see if I can exclude multiple categories. Will revert here with my findings |
 |
|
jack208
VP-CART New User

Malaysia
116 Posts |
Posted - December 06 2015 : 07:29:19
|
An update - an item that''s linked to more than one categories won''t be excluded using the above query since it''ll be picked up by the non-excluded category. In our case, the above code works coz those items belonging to the category we want to exclude only has one category.
Thought this info might be useful for some others. |
 |
|
|
Topic  |
|