Jump to content
Sign in to follow this  
scottybwoy

Filterlist v1

Recommended Posts

New Contrib to OsCommerce!

 

Filterlist v1 has been designed to filter product results within a specific category, great if you have lots of products.

 

Users can filter by price, keywords, the usual manufacturer and also choose how many results they want per page.

 

See this link for an example (if the above link doesn't work, go to www.klickshopping.co.uk and go as deep as you can in any category).

Share this post


Link to post
Share on other sites

cool mod, been trying to work something like this out for ages.

 

get some errors when using prices with tax.

 

any idea how i can get it to allow the user to sort the products by price, a-z etc

 

cheers

Share this post


Link to post
Share on other sites

What is the issue you are having with price with Tax? It filters out the price including Tax value. You can sort out by cost by clicking on the Cost title at the top.

Share this post


Link to post
Share on other sites

HEY! Excellent Contribution. I love it!

 

I have also been looking for something like this and this one just works like a charm. A BIG THANK YOU!

 

Sometimes I do play around with php a little but don't know much if not at all but I what to look for a way to make this contribution to filter results and keep the results within the category you are in. In other words...

 

In the store I am working on (w STS contrib installed) I select Women Perfumes, index.php?cPath=25, and I get to see all the perfumes that belong to that section but as soon as I filter the products it takes me to... index.php?cPath=25&pfrom=From&pto=To&refine=Refine+your+results&categories_id=25&search_in_description=1&cPath=25&sort=3a&manufacturers_id=57&max_pages=20... and it looses the Women's Graphic Header I had for that category. It is like it looses the mark from what state of the Index.php page it came from. I will try to fix this...

 

 

 

BTW... Any thought of how to make this Contrib a InfoBox. When I copied the include <?php include_once(FILENAME_FILTER); ?>

When I place this include in the right or left column it doesn't work.

 

THANKS :)

Edited by BlindingLight

Share this post


Link to post
Share on other sites

I just noticed something...

 

If you have a Store with the Simple Template System (STS) Contribution installed... then you might have a problem if you installed this Filter Contribution. This is what happens...

 

The STS Contibution let's you create Category Homepages for your Store. In my case I gave a Homepage for Women Perfumes.. so I can have a nice Women Perfume Header etc. When I install this contribution, everything works fine but the only problem that the page gets displayed "twice". Funky....

 

The way to solve this problem is by eliminating any STS template that uses index.php as a base. Category STS templates would look something like index.php_21.html or index.php_25.html to template a Category homepage... In other words... you can't have Category Homepages nor Manufacturer Homepages.

 

I'd wish there was a fix for this :blink:

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for working that out. I have not ever used the STS system so have not tested it with it. But now you have pointed some of its features out I may have a look, but not straight away.

 

Yeah it will not work in an InfoBox as it relies on a query that leads up to products_listing.php. In an infobox, that would not be available.

 

Version 1.1 should be out soon with the order by price etc.

Share this post


Link to post
Share on other sites
Hi,

 

Thanks for working that out. I have not ever used the STS system so have not tested it with it. But now you have pointed some of its features out I may have a look, but not straight away.

 

Yeah it will not work in an InfoBox as it relies on a query that leads up to products_listing.php. In an infobox, that would not be available.

 

Version 1.1 should be out soon with the order by price etc.

 

 

Thank you very much for you time and help.

 

Yeah sorting results would be great! I was actually going to see if I could add another contrib for that.. but cool. Another feature would be to have a box where you can type the page number you would like to jump to.

 

About the infobox... man... i'd wish i knew i way of how to make it interact with products_listing.php.

 

Your contribution is helps a lot. If you ever need help or any guidance with STS, let me know. I will be happy to assist you.

 

Ed :lol:

Share this post


Link to post
Share on other sites

This is a good contribution and i commend you for your hard work. Just one request.

 

It would be nice to sort by latest products to oldest products. That would be a nice feature as well.

 

Great job.

Share this post


Link to post
Share on other sites
This is a good contribution and i commend you for your hard work. Just one request.

 

It would be nice to sort by latest products to oldest products. That would be a nice feature as well.

 

Great job.

 

I am not sure if this is me but when I do the sorting by price it sorts it funky. It sorts it by Model Number first then by price second.

Share this post


Link to post
Share on other sites

I can't get this contribution to work at all. I have installed this on my modified site then i installed this on a clean install and nothing shows up in product listing. Just the default look. Nothing like the example site.

 

I am using Oscommerce 2.2 Rc2a. Is there any configuration i need to do in the admin side in product listing configuration?

Share this post


Link to post
Share on other sites
I can't get this contribution to work at all. I have installed this on my modified site then i installed this on a clean install and nothing shows up in product listing. Just the default look. Nothing like the example site.

 

I am using Oscommerce 2.2 Rc2a. Is there any configuration i need to do in the admin side in product listing configuration?

 

Hey CGhost

Well the installation for this contribution is easy and straight forward so you might be doing something silly that is making it not work. It happens.

 

1. Are you getting an error? or you see nothing happening... do you at least see the boxes where you can redefine your search?

2. are you using STS?

 

These are the files that are used for this contribution:

 

 

 

/includes/filenames.php

/includes/modules/product_listing.php

/includes/languages/english/advanced_search.php

/includes/filenames.php

 

New Files

 

/filterlist.php

/includes/jquery1.2.6.js

 

 

Make sure that when you are doing the modifications you copy the code provided instead of simply making the changes yourself by looking at the code provided. Do it carefully or slowly if you have to.. have some coffee but not too much coffee... hahah if you were able to install the 10000 other contributions you should be able to get this easy but great one to work. We can start with that and see how it works out.

Share this post


Link to post
Share on other sites
Hey CGhost

Well the installation for this contribution is easy and straight forward so you might be doing something silly that is making it not work. It happens.

 

1. Are you getting an error? or you see nothing happening... do you at least see the boxes where you can redefine your search?

2. are you using STS?

 

These are the files that are used for this contribution:

 

 

 

/includes/filenames.php

/includes/modules/product_listing.php

/includes/languages/english/advanced_search.php

/includes/filenames.php

 

New Files

 

/filterlist.php

/includes/jquery1.2.6.js

 

 

Make sure that when you are doing the modifications you copy the code provided instead of simply making the changes yourself by looking at the code provided. Do it carefully or slowly if you have to.. have some coffee but not too much coffee... hahah if you were able to install the 10000 other contributions you should be able to get this easy but great one to work. We can start with that and see how it works out.

BTW there is nothing you have to do from the Admin Panel to make this to work so you know :P

Share this post


Link to post
Share on other sites
I can't get this contribution to work at all. I have installed this on my modified site then i installed this on a clean install and nothing shows up in product listing. Just the default look. Nothing like the example site.

 

I am using Oscommerce 2.2 Rc2a. Is there any configuration i need to do in the admin side in product listing configuration?

 

 

Ditto here. The hack does not work on our site. No changes just the default look as you got also. BTW, I'm the one that has been e-mailing the author if he does read this. :)

 

I've gone through the instructions, VERY SIMPLE, over and over again and it just doesn't do anything.

Edited by Z06BAIT

Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites

Hmm, yes I have noticed a few people having this problem and I will have to test it on a clean OsCommerce install. The only thing I can think of so far is to edit line 366 in filterlist.php

 

if (($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?>

 

And just leave it as

 ?>

 

Then the delete the very last line. See how you get on with that, also I think this contrib doesn't work with STS, I've not used that before so don't know the difference.

Share this post


Link to post
Share on other sites
Then the delete the very last line. See how you get on with that, also I think this contrib doesn't work with STS, I've not used that before so don't know the difference.

 

Just to make it clear for other people that are interested in this contribution...

As far as I know it is not that it doesn't work with STS Simple Template System is just that if you know the contribution then you know that you can have templates for Category Index Pages, Products Index Page, Manufacturer.. etc. If you do have templates for those Index variations then this filter works but funky.

 

Solution... get rid of them.

 

Ed

Share this post


Link to post
Share on other sites

Great contribution but got 2 questions

 

1. How do i change the default sort order - its setting it as manufacturer + want it as Name +

 

2. How do add sort by date added (newest) as a sort filter that when added will be the default

 

I can't get the pagination to work on a manufacturer page either but thats a minor thing

 

thanks

 

Jody

Share this post


Link to post
Share on other sites
1. How do i change the default sort order - its setting it as manufacturer + want it as Name +

First make sure that lines 418 - 421 in filterlist.php correspond to the correct alignment of your column headers, starting at 1 not 0.

 

The default ordering is in fact done via index.php. BACK IT UP FIRST!!! Then look for the lines :

	if ((!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list))) {
  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_PRICE') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	  $listing_sql .= " order by final_price";
	  break;
	}
  }
} else {
  $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
  $sort_order = substr($HTTP_GET_VARS['sort'], 1);
  $listing_sql .= ' order by ';
  switch ($column_list[$sort_col-1]) {
	case 'PRODUCT_LIST_MODEL':
	  $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", final_price";
	  break;
	case 'PRODUCT_LIST_NAME':
	  $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '') . ", final_price";
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", final_price";
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", final_price";
	  break;
	case 'PRODUCT_LIST_IMAGE':
	  $listing_sql .= "pd.products_name";
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", final_price";
	  break;
	case 'PRODUCT_LIST_PRICE':
	  $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '');
	  break;
  }
}

The default is this bit :

$column_list[$i] == 'PRODUCT_LIST_PRICE'

Change the CONSTANT to whatever field in the list you want. Then change the end of each $listing_sql line in the switch to the table column name you want it to revert back to.

2. How do add sort by date added (newest) as a sort filter that when added will be the default

I don't have the date column in mine, but you would just need to add another case clause to the above switch. If you have the date added column you need to use the same handle ('PRODUCT_LIST_DATE' or whatever it is). If you don't have it it may be a bit more difficult as you need to add it to the $define_list array on line 198 in filterlist.php and to the switches on line 218 and 335 and finally to the SORT on line 417.

 

I have not done this myself, and have just had a quick browse, so don't blame me if it all goes tits up. But I hope I pointed you in the right direction and get it to work. If you do get it to work, I'd suggest you add it to the contrib, and edit the instructions to correspond with what you did.

 

Hope you enjoy the contrib.

Share this post


Link to post
Share on other sites

I am going to assume support on this has stopped all together?


Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites
I am going to assume support on this has stopped all together?

 

I'd wish I could help you but I don't have the Compare Contribution installed.

Share this post


Link to post
Share on other sites
I am going to assume support on this has stopped all together?

 

Why, I think I have answered / attempted to answer all questions posed where I have the time. I will be away for the next month and will prob be quite busy when I get back, there have been other members in this community that have alos helped people so I hope that is good enough.

 

I hope you enjoy the contribution

Share this post


Link to post
Share on other sites
Why, I think I have answered / attempted to answer all questions posed where I have the time. I will be away for the next month and will prob be quite busy when I get back, there have been other members in this community that have alos helped people so I hope that is good enough.

 

I hope you enjoy the contribution

 

 

Thanks no disrepect, just wished it would work for some of us that have posted here with issues. But you definitely deserve a thank you for your contribution.

Edited by Z06BAIT

Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites
Hmm, yes I have noticed a few people having this problem and I will have to test it on a clean OsCommerce install. The only thing I can think of so far is to edit line 366 in filterlist.php

 

if (($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?>

 

And just leave it as

 ?>

 

Then the delete the very last line. See how you get on with that, also I think this contrib doesn't work with STS, I've not used that before so don't know the difference.

 

Hello all,

 

First let me say this is a great contribution.

Makes navigation so much easier for customers (especially on categories with many products).

 

I also had the problem of after uploading nothing happened. The previous fix works as posted

Just remove the lines indicated.

 

Now to my question.

 

The filterlist shows up when someone comes from a direct link to a manufaturers list page.

 

But try to enter a keyword or display by more pages it redirects to homepage.

 

I noticed the basename file when this happens is index.php - not the category url as normal if that makes any sense.

Anyway is there a way to add a category sort when on a sitewide manufacturers list page?

 

I've tried several attempts, I just can't seem to get it to work

 

Any Ideas?

Thanks

Share this post


Link to post
Share on other sites
Hmm, yes I have noticed a few people having this problem and I will have to test it on a clean OsCommerce install. The only thing I can think of so far is to edit line 366 in filterlist.php

 

if (($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?>

 

And just leave it as

 ?>

 

Then the delete the very last line. See how you get on with that, also I think this contrib doesn't work with STS, I've not used that before so don't know the difference.

 

Then the delete the very last line..

 

Maybe this is what I am missing. Exactly delete what last line are we talking?


Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×