Forums / General Questions / manufacturer & alpha filter

manufacturer & alpha filter

Started by rbarbour on 29 May 2012, 1:45 PM · Views: 886

Results 1 to 8 of 8
29 May 2012, 1:45 PM
#1
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

manufacturer & alpha filter

I need to add an anchor to both the manufacturer & the alpha filter. I did this many years ago and can't seem to find the "note"

any ideas?

simply want the page to return to the #productListing div after a filter is selected.

31 May 2012, 3:13 PM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: manufacturer & alpha filter

ok - maybe should explain a little better

I have coded the index_product_list

gallery_view
grid_view
&
list_view

allows the customer to choose their viewing option for the product listing page (works great!)

however if the customer uses the manufacturer and/or alpha filter in any view other than list_view it reverts to list_view

example
say while a customer is on product_listing page (default is list_view)
index.php?main_page=index&cPath=3_10

customer clicks link to view product_listing as grid
index.php?main_page=index&cPath=3_10&changePage=_grid#productListing

now if customer chooses manufacturer A from dropdown
index.php?main_page=index&cPath=3_10&changePage=_grid#productListing

page returns
index.php?main_page=index&cPath=3_10&sort=&filter_id=4&alpha_filter_id=1

reverting back to list_view (default)

is their anyway to get the manufacturer and alpha filter to pick up full URL
index.php?main_page=index&cPath=3_10&changePage=_grid#productListing&sort=&filter_id=4&alpha_filter_id=1

As of right now I have it set so

if customer chooses manufacturer then clicks alternate view
index.php?main_page=index&cPath=3_10&filter_id=3&alpha_filter_id=1&changePage=_gallery#productListing

it works as intended
I disabled filters while in alternate view also, which suck cause you have to click back on default (list_view) to reset

just fyi - hoping someone has attempted this and could give a little input

31 May 2012, 3:22 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacturer & alpha filter

You could try this with your templates and overrides for the file:
/includes/templates/template_default/templates/tpl_index_product_list.php

above last line that reads:

</div>

at bottom of file add:

<?php
//echo '<a class="main" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath']) . "#productListHeading" . '">' . 'Return to TOP' . '</a>';
echo '<div class="centeredContent"><a href="' . zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params('cPath', 'sort', 'filter_id', 'alpha_filter_id')  . "#productListHeading" ) . '">' . 'Return to TOP' . '</a></div>';
?>

and see if that is what you are looking for ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 May 2012, 3:38 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: manufacturer & alpha filter

thanks Linda, I'll give it a try. :-)

31 May 2012, 4:23 PM
#5
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: manufacturer & alpha filter

yes your code does return the page to the top - thanks again.

31 May 2012, 4:31 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacturer & alpha filter

Thanks for the update that this is working for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Jun 2012, 10:01 PM
#7
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: manufacturer & alpha filter

thanks to Linda's code I was able to accomplish what I set out to do - although what I was trying to do may not have been clear.

you can see the product listing page with alternate views (list (default), grid & gallery) and now all views have correctly functioning manufacturer & alpha drop-downs.

see it in action here

3 Jun 2012, 11:33 AM
#8
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: manufacturer & alpha filter