| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Skin not showing up in layouts page after 5.3 upgrade | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Skin not showing up in layouts page after 5.3 upgrade
I just installed 5.3 and am trying to migrate my old 5.2 skin to it. I copied my module (including Main.php) into classes/XLite/Module/<devid>/<moduleid>. I also copied my skin into skins/<skinid>. This is how it was set up in 5.2. Then I re-deployed the store and activated my custom module.
But my theme is not showing up in the Admin page under Layout. All of the default themes are there, but I have no way of finding or selecting mine. What am I doing wrong? The top of my Main.php looks like this (my theme is FeedSkin): PHP Code:
And my getSkins() method looks like this: PHP Code:
__________________
X-Cart version 5.2 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
Did you update the methods in Main.php that declare which X-Cart version your module is compatible with?
I guess your getMajorVersion() returns "5.2".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
I did. Here is my full file, with some method bodies removed:
PHP Code:
Note, I copied a lot of this from the Crisp White skin in an attempt to make it show up. Crisp White shows up, but this does not.
__________________
X-Cart version 5.2 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
I believe you don't need most of the class methods.
Please refer to this article: http://devs.x-cart.com/en/basics/skin_module.html Also, please check if you see your class files copied to the var/run/classes/ directory. Sometimes when you have a wrong file or classname, or when the namespace doesn't match the file path, class files are ignored during the re-deploy process. This might happen in your case.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#5
|
|||||||
|
|||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
I probably don't need all of those methods. However, I would like to build my theme off of the crisp_white theme, not the "default" theme. How can I do that without just making a copy of the crisp white module and skin (which is what is not working)?
__________________
X-Cart version 5.2 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
To customise an existing theme you don't create a new theme. Instead, you enable the original theme and then "decorate" its classes and files by creating a custom module (not a theme module).
Please check this forum message (and the thread where it was posted): https://forum.x-cart.com/showpost.php?p=400954
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#7
|
|||||||
|
|||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
Great, thanks. How do I do that with the default "Standard" theme then?
__________________
X-Cart version 5.2 |
|||||||
#8
|
|||||||
|
|||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
I figured it out. Something must have been wrong with my Main.php file, though I'm not sure exactly what. Maybe it was removing the `use \XLite\Core\Layout` line, or maybe it was just something weird happening with my redeployments (I have been getting "mysql server has gone away" errors). Either way, I removed everything from Main.php and only added back in the things that the docs instructed me to, and my theme's showing up in the layout page now.
Thank you for your help!
__________________
X-Cart version 5.2 |
|||||||
#9
|
|||||||
|
|||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
Actually, now my skin module (which I want to be based on the default skin) is not even being copied to var/run/classes/XLite/Module. I have my module in classes/XLite/Module/BenLind/FeedSkin/ (which contains Main.php). I have my skin files in skins/FeedSkin/customer. But my module is not copied to var, even if I delete var and redeploy the site.
Also, I had created a dummy "Foo" module to test bare-bones module creation. I subsequently deleted classes/XLite/Module/BenLind/Foo, but Foo is still showing up on the Modules admin page. I have clear all the caches I know of and redeployed the store multiple times, but it still shows up. Is there something wrong with my database?
__________________
X-Cart version 5.2 |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Skin not showing up in layouts page after 5.3 upgrade
First, try to enable the developer mode. Does this help?
Also, the list of installed modules refreshes after you redeploy your site. If you delete a module directory, or add a new one - it won't update the list until your redeploy it. As for files not being copied to var/run/classes: usually it happens because of the namespace in your files not matching paths to these files.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|