| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Product Filters - only show values for products in current category | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
Re: Product Filters - only show values for products in current category
You should definitely decorate XLite\Module\XC\ProductFilter\View\Filter\Attribut eList or its parent \XLite\Module\XC\ProductFilter\View\Filter\AFilter
As for category ID, since you are on category pages for sure, you can call it like this: $this->getCategory()->getCategoryId(); I would be happy to help you with this mod in details, but cannot afford it right now. I will do my best to look into it next week. Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#12
|
|||||||
|
|||||||
Re: Product Filters - only show values for products in current category
Thank you Tony, that's very helpful ....
.. I'll have a go and let you know how I get on. Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
|
#13
|
|||||||
|
|||||||
Re: Product Filters - only show values for products in current category
I seem to have managed to get this working .... possibly not in the most elegant way but this is what I did:
I decorated the class \XLite\Module\XC\ProductFilter\View\FormField\Sele ct\Attribute and added this function Code:
The I amended the tpl /skin..../modules/XC/ProductFilter/form_field/select/checkbox_list/select.tpl to use my function getFilteredOptions instead of getOptions. I created a new function in case the getOptions function was used elsewhere ... this way I can choose which to use. No doubt there is a more sophisticated way of doing this, but it seems to work so I will leave it alone now! Thanks for your help ... I have been grappling with this for days!! Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
|
#14
|
|||||||||
|
|||||||||
Re: Product Filters - only show values for products in current category
Good job, Jan!
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|