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

CSS file for new theme

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 01-28-2014, 01:45 PM
 
bespoke bespoke is offline
 

Member
  
Join Date: Oct 2013
Posts: 17
 

Default 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
__________________
Thanks...

Rick Davey
Reply With Quote
  #2  
Old 01-29-2014, 10:42 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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.
Reply With Quote
  #3  
Old 01-29-2014, 01:10 PM
 
bespoke bespoke is offline
 

Member
  
Join Date: Oct 2013
Posts: 17
 

Default 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',
),
);
}
}
__________________
Thanks...

Rick Davey
Reply With Quote
  #4  
Old 02-03-2014, 08:55 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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
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 03:55 AM.

   

 
X-Cart forums © 2001-2020