X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   CSS file for new theme (https://forum.x-cart.com/showthread.php?t=68557)

bespoke 01-28-2014 01:45 PM

CSS file for new theme
 
I've created a new theme and added it to the store. I see it in the active extensions.

Now I want to style my new theme by over-riding the default CSS by using the "last.css" file as shown on page: http://kb.x-cart.com/display/XDD/Adding+new+CSS+file

So I added the new class file as in classes/XLite/Module/<Developer>/<Module>/View/AView.php

I can't get my new css file to work. I'm not sure where to place the last.css file as in the page it shows an inconsistent location.

Here is the note from that page:

Note: This method consider the resources placed in the current interface (for example your module can expand the customer interface with the new skin directory and the new CSS file can be placed there).
skins/default/en/modules/<Developer>/<Module>/last.css

I would have thought that the css file last.css should be in:
skins/<Developer>/<Module>/en/last.css or skins/<Developer>/<Module>/en/css/last.css

not as shown in the default skin folder

So I've got something wrong... Nothing is taking hold

tony_sologubov 01-29-2014 10:42 AM

Re: CSS file for new theme
 
Hi Rick!

Could you please share a code of your Main.php script in this thread? I will be able to advise you then.

bespoke 01-29-2014 01:10 PM

Re: CSS file for new theme
 
This is my aview.php followed by my main.php

namespace XLite\Module\Bespoke\Bespokestore\View;
abstract class AView extends \XLite\View\AView implements \XLite\Base\IDecorator
{
protected function getThemeFiles()
{
$list = parent::getThemeFiles();
$list[static::RESOURCE_CSS][] = 'modules/Bespoke/Bespokestore/last.css';
return $list;
}
}

_______________________________
Now Main.php
_______________________________

<?php
namespace XLite\Module\Bespoke\Bespokestore;
/**
* Skin customization module
*
*/
abstract class Main extends \XLite\Module\AModule
{
/**
* Author name
*
* @return string
*/
public static function getAuthorName()
{
return 'Davey';
}

/**
* Module name
*
* @return string
*/
public static function getModuleName()
{
return 'Bespokestore';
}


/**
* Get module major version
*
* @return string
*/
public static function getMajorVersion()
{
return '5.0';
}

/**
* Module version
*
* @return string
*/
public static function getMinorVersion()
{
return '0';
}

/**
* Module description
*
* @return string
*/
public static function getDescription()
{
return 'Bespoke standard Theme';
}

/**
* Register the module skins.
*
* @return array
*/
public static function getSkins()
{
return array(
\XLite::CUSTOMER_INTERFACE => array(
'Bespokestore/customer',
),
\XLite::ADMIN_INTERFACE => array(
'Bespokestore/admin',
),
);
}
}

tony_sologubov 02-03-2014 08:55 AM

Re: CSS file for new theme
 
Hi Rick!

Could you please let me know where do you place last.css file?

If it is in the skins/default/en/modules/Bespoke/Bespokestore/last.css it will not be included
If it is in the skins/Bespokestore/customer/en/modules/Bespoke/Bespokestore/last.css it will be added


All times are GMT -8. The time now is 04:19 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.