Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Crisp White Skin in 5.3.* - Custom Modifications?

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 12-07-2016, 03:36 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

Quote:
Originally Posted by qualiteam
....If you want to override admin, common and so on, you add them through that decorated getSkins() method, not from getSkins() defined in your Main.php
Ahhhhh Okay. It does work perfectly so far (with the exception of the .less file(s) which is unconnected we think) and that's using the setup we described above, which is the opposite to your last post (!) but obviously, we much prefer to have less processing! So... remove the getSkins() coding from Main.php for these areas and then add it to the 'additional' file? That's what we think you're saying. We'll try it this weekend. An example has been added to the existing additional file coding, shown below for reference.

We did think about that after your initial very helpful post, but we couldn't understand how that would work, as the XC Crisp White Skin Module only uses getSkins() for the 'customer' area only... so we thought it would be limited as such... We don't have any knowledge of the logic rules involved, but we'll alter it and try it this way regardless.
PHP Code:
<?php
// classes/XLite/Module/*.*/*.*/CrispWhiteMain.php

namespace XLite\Module\*.*\*.*;

abstract class 
CrispWhiteMain extends \XLite\Module\XC\CrispWhiteSkin\Main implements \XLite\Base\IDecorator
{
    public static function 
getSkins()
    {
        
$skins parent::getSkins();
        
        
$customCustomerDirectory '*.*' LC_DS 'customer';
        if (isset(
$skins[\XLite::CUSTOMER_INTERFACE])) {
            
// The original theme registers its own directory for the "customer interface",
            // so we should combine ours with that one
            
$directories = (array) $skins[\XLite::CUSTOMER_INTERFACE];
            
$directories[] = $customCustomerDirectory;
            
$skins[\XLite::CUSTOMER_INTERFACE] = $directories;
        } else {
            
// The original theme has no directory for the "customer interface",
            // so we just add our directory to the list
            
$skins[\XLite::CUSTOMER_INTERFACE] = $customCustomerDirectory;
        }

        
Example Addition:
        
$customCustomerDirectory '*.*' LC_DS 'admin';
        
$skins[\XLite::ADMIN_INTERFACE] = $customCustomerDirectory;

        return 
$skins;
    }
}
Quote:
Originally Posted by qualiteam
...I'm waiting a reply from the XC5 dev team on this
No problem. If it's a .less file higher up that is overriding this one and others, then we can add that in, once we understand the logic rules.
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #12  
Old 12-08-2016, 11:21 PM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

Quote:
Originally Posted by Triple A Racing
....we'll alter it and try it this way regardless
Famous last words We've tried this 6 different ways now and none of them work, it's either:

a) The dev store redeploys successfully after the latest changes to the CrispWhiteMain.php 'additional' file so any changes made within 'customer' area of the are Crisp White Skin are implemented successfully*** However... NO changes made with 'admin', 'common' or 'mail' are implemented at all... so this doesn't work. Or;

b) The dev store redeploys successfully after the latest changes to the CrispWhiteMain.php 'additional' file. However... NO changes made with 'customer', 'admin', 'common' or 'mail' are implemented at all... so this also doesn't work either (even the base XC Crisp White Skin isn't loaded when this happens). Or;

c) The The dev store does NOT redeploy successfully, due to a coding inconsistency / error within the latest version of the CrispWhiteMain.php 'additional' file and a save (deleting /var .rebuildStarted and /var/run etc) has to be applied to get back to square one.

Yet... with the version that we were and now are again running with (see previous messages) everything is 100% functional*** So it must either be a coding glitch within the extra areas being 'added' into the CrispWhiteMain.php 'additional' file or, as we were concerned about initially, it just won't work this way and changes in 'admin', 'common' or 'mail' have to be called up via Main.php not the CrispWhiteMain.php 'additional' file?

***Apart from .less file(s) which are part of a separate question
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #13  
Old 12-09-2016, 12:59 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

all you can do is CSS
__________________
xcartmods.co.uk
Reply With Quote
  #14  
Old 12-09-2016, 02:11 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

Quote:
Originally Posted by PhilJ
all you can do is CSS
??? Was this meant for the other message in this section about CSS?
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #15  
Old 12-11-2016, 04:33 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

Quote:
Originally Posted by PhilJ
all you can do is CSS
You haven't answered Phil, but no worries. We're guessing you were referring to NOT being able to modify .less files, which is one small part of the subject in this post. We can modify .less files and get them to work no problem, but not using the methods that we should be able to... We've added this to the end of https://forum.x-cart.com/showthread.php?p=400743 as it's connected there too, we think
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #16  
Old 12-11-2016, 11:27 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

I think it will be easier to track the problem if you send me your modified files with a list of things that don't work so that I could check it on my local Crisp White installation.
__________________
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
Reply With Quote

The following user thanks qualiteam for this useful post:
Triple A Racing (12-11-2016)
  #17  
Old 12-11-2016, 11:53 PM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

Quote:
Originally Posted by qualiteam
.....so that I could check it on my local Crisp White installation.
Ok. The data required is already in the previous messages, but we also do appreciate that it's a lot easier if locally replicated, so we will do this soon via PM. Thanks again
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #18  
Old 12-23-2016, 04:36 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

I've tried this locally and it works for me.

I'm attaching a sample module that will "decorate" Crisp White theme with its own "skin" directories. It changes the left sidebar menu template in the backend (so a new "Custom header" title appears above it), plus it makes some sidebar blocks in the storefront yellow (check a category page to see it).

I didn't try other "interfaces" (mail and common), but I believe it should be done exactly the same as I did for the "admin interface" (check the MainCrispWhite::getSkins() method).

Also, I've found that when you adjust getSkins() method of CrispWhite, X-Cart 5 does not include the new skin directories into the archive with your module files when you create one. That's why instead of placing new skin files into skins/my_custom_theme/... I split these into multiple skins/customer/modules/... directories (check the structure of the attached archive).

Does this work for you?
Attached Files
File Type: tar Custom-MyTheme-v5_3_0.tar (8.5 KB, 288 views)
__________________
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
Reply With Quote

The following user thanks qualiteam for this useful post:
Triple A Racing (12-23-2016)
  #19  
Old 12-23-2016, 06:43 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

Quote:
Originally Posted by qualiteam
I've tried this locally and it works for me >.....< Does this work for you?
Thank you. Appreciate all the hard work involved here. After a quick look only, post download, we see the re-working of the MainCrispWhite.php file compared to the previous version(s). Obviously we didn't try this specific method previously. We'll install our version of both this and the different Main.php file in our Custom Module and then test, test, test Fingers crossed, this logic change solves the issues with modified .less files as well. We'll report back after the Christmas Break. Seasons Greetings!
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote

The following user thanks Triple A Racing for this useful post:
qualiteam (12-25-2016)
  #20  
Old 12-31-2016, 04:35 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: Crisp White Skin in 5.3.* - Custom Modifications?

A quick update: Whilst carrying out important normal non-IT work (!) having Christmas Celebrations etc we've managed to finish a modified crisp white skin evolution version store and this is now live. We also have a nice and tidy, fully functional standard skin / custom module powered, evolution version in reserve just in case The live store uses modified crisp white skin / our own custom module / an XC provided bug patch (until 5.3.2.3) / our own core patches and quite a lot of 'temporary' custom CSS, but still happy with the result. We wanted the evo-cws based site to be live from 1/1/17, so we're just in time. Later next week, we'll attempt to finish the alternative (evolution) version of our custom module (on a dev store first) as discussed previously. This should negate those patches and massively reduce the quantity of Custom CSS as part of the end result. Happy New Year!
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:29 AM.

   

 
X-Cart forums © 2001-2020