| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
XC Product Filters module not recognising custom skin modifications | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
XC Product Filters module not recognising custom skin modifications
Hello,
I am using the Product Filters module, but for some reason this doesn't pick up my modified templates in my Custom Skin (I am using the x-cart Custom Skin). I have a modified TopCategories.php in my Classes/XLite/XC/CustomSkin/View to set the category view param to "tree", I then modified the categories\tree\body.tpl to display my customised category/subcategory menu. To get it to display across the top instead of in a sidebar, I used MoveClassesInLists to assign TopCategories from sidebar.first to layout.main.center. It seems the Product Filter module is somehow overriding all my changes. What I really need the filter module to do is to just refresh the product list content and leave everything else alone..... is this possible does anyone know?
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
|
#2
|
|||||||||
|
|||||||||
Re: XC Product Filters module not recognising custom skin modifications
Look in
classes/XLite/Module/XC/ProductFilter/View/TopCategories See this line: class TopCategories extends \XLite\View\TopCategories implements \XLite\Base\IDecorator Since your class also decorates this class, I believe you need to override this by redecorating: XLite\Module\XC\ProductFilter\View\TopCategories Then you add a dependency in your module and/or to your class. That is where I need Tony to help explain better.... I am also interested in this subject, getting my module to override another one. It is happening to you because XC/ProductFilters come alphabetically after XC/CustomSkin. Don't worry it is certainly possible, I have done it but I cannot remember how or find my code at the moment. Tony? Alexander? Anyone?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
Re: XC Product Filters module not recognising custom skin modifications
Thanks Mike,
I tried redecorating the TopCategories class, but it didn't seem to have any effect. I also noticed that when I was trying to override the filter tpls, it just ignored my customised tpls .... I am guessing your thoughts about a dependency are on the right tracks ... .. perhaps I should creat a new skin called zzzz?! (next question, how do I copy Custom Skin to a new skin... lol!) Or is there a way to tell the deploying engine to put the current live skin last, instead of just doing it alphabetically??? Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#4
|
|||||||||
|
|||||||||
Re: XC Product Filters module not recognising custom skin modifications
I think if you named your new skin ZZZZ it would override it, but this is not really a good idea, we need to resolve this the right way. By declaring the dependency it should work. Hopefully Tony or someone will chime in and explain this to us again.
To create your own custom skin: follow my tutorial here: http://xcartguru.com/tutorials/x-cart-5-tutorials/building-a-custom-skin-in-x-cart-5/ Then you could just copy the skin files into the proper directories. But PHP class files that you have created in XLite/Module/XC/CustomSkin/ will need the namespace edited in order to work in the new module. Creating a custom skin is my preference rather than using the default custom skin module. Allows you to develop multiple skins, switch between them, pack them up, and reuse them easily.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#5
|
|||||||
|
|||||||
Re: XC Product Filters module not recognising custom skin modifications
I am still having a problem with the product filter... I know now what the problem is, but not how to fix it...
A brief re-cap: I have put my skin in a module starting with zz to put it at the end of the list. I realise that the default behaviour of the Product Filter module is to hide the Category menu, when filter mode is active....this is why my amended topcategories aren't showing when filter mode is on.... This is the code that does it in XLite\Module\XC\ProductFilter\View Code:
I have created a class in my module to, hopefully, override this function and always return "true", but then the categories still don't appear and the filters no longer work (grrr!). The other complication may be that I have got rid of the sidebar and have moved things from the sidebars into the center using moveClassesInLists in my main.php ... I don't know if this is causing a problem also .... I tried making the sidebar visible again but this didn't work either ..... Website link is here: http://moletamunro.com.217-199-165-124.cipherwebhost.com/furniture/chairs_-_stools - If you apply one of the filters, the menu functionality disappears .. Maybe I need to do my own version of TopCategories so it is not tied up with anything else??? or my own version of Product Filters??? I am now running out of ideas ..... any thoughts? Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#6
|
|||||||
|
|||||||
Re: XC Product Filters module not recognising custom skin modifications
Replying to my own question .... what I really need to know is how to tell the Product Filter Module, not to hide the categories menu when the filter is in force..... I am going to start a new thread with this question ....
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|