| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product Filters - only show values for products in current category | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
![]() 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
|
|||||||
|
|||||||
![]() 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
|
|||||||
|
|||||||
![]() 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
|
|||||||||
|
|||||||||
![]() 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! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|