Adapt Your Add-ons and Themes to CS-Cart 4.18.2

Core changes

Added google/auth, firebase/php-jwt, psr/cache packages.

Important

Do not use them, they will be removed in the near future.

Hook changes

New hooks

  1. Changes request params before store location cities selecting:

    fn_set_hook('get_store_location_cities', $params, $condition);
    
  2. Executes before the request data is returned:

    fn_set_hook('rus_online_cache_register_receipt_request_json_post', $this, $result, $receipt);
    

Style changes

Usage of color variables instead of colors

The use of hardcoded colors has been deprecated. Use CSS color variables instead. Examples:

  • #fff — use var(--cs-content-background) instead for background color.
  • #2d2d2d — use var(--cs-text-color) instead for text color.
  • #fff — use var(--cs-text-inverse-color) instead for text inverse color.
  • #1d9ff8 — use var(--cs-btn-primary-background) instead for button primary background.
  • #d80954 — use var(--cs-error-text) instead for error text color.
  • rgba(0, 0, 0, 0.1) — use var(--cs-shadow10-color) instead for shadow.

View the full list of variables in design/backend/css/less_to_css_vars.less. Color variables are required for the dark theme. Check your add-ons in the light and dark administration panel.

Deprecated Less styles

Less styles have been deprecated and will no longer be supported in the future. Use native CSS styles instead. Examples:

  1. Don’t use Less variables. Use native CSS variables. Examples:
    • @mainColor — use var(--cs-main-color) instead.
    • @media (min-width: @TabletBreakpoint + 1px) { ... } — use @media (min-width: 768px) { ... } instead.
    • -@iconSize; — use ~"calc(var(--cs-icon-size) * -1)" instead.
  2. Don’t use Less mixins. Describe properties explicitly. Examples:
    • .transition(all 200ms); — use transition: all 200ms; instead.
    • .display-flex(); — use display: flex; instead.
  3. Don’t use Less nested rules. Describe selectors explicitly. Examples:
    • a { opacity: 0.8; &:hover { opacity: 1; } } — use a { opacity: 0.8; } a:hover { opacity: 1; } instead.
    • .block { padding: 10px; @media (min-width: 768px) { padding: 20px; } } — use .block { padding: 10px; } @media (min-width: 768px) { .block { padding: 20px; } } instead.
  4. Don’t use Less functions. Use similar colors and property values. Examples:
    • spin(desaturate(lighten(@textColor, 30%), 25%), -15%); — use var(--cs-text-muted-color); instead.
    • darken(@btnBorder, 3%) — use var(--cs-shadow15-color) instead.
    • lighten(@textColor, 38%); — use var(--cs-text-muted-color); instead.
    • round(@baseLineHeight / 1.5385) — use 13px; instead.
  5. BUT use escaping for Less functions that are similar to CSS functions. Example:
    • calc(100% - 5px) — use ~"calc(100% - 5px)" instead.

New CSS classes

cs-dark-theme-invert - invert colors for the dark theme.

Deleted style variables

UI

  1. @isControlGroupHidden.
  2. @spinnerSize — use 24px instead.
  3. @spinnerBorderWidth — use 3px instead.
  4. @spinnerBlockSize — use 52px instead.
  5. @uiDialogTitlebarCloseWidth — use var(--cs-ui-dialog-titlebar-close-width) instead.
  6. @uiDialogTitlebarCloseHeight — use var(--cs-ui-dialog-titlebar-close-height) instead.
  7. @global_individual_secondary — use var(--cs-global-individual-secondary) instead.
  8. @global_individual_active_background — use var(--cs-global-individual-active-background) instead.
  9. @global_individual_active_border — use var(--cs-global-individual-active-border) instead.
  10. @global_individual_disabled — use var(--cs-global-individual-disabled) instead.
  11. @global_individual_secondary_disabled — use var(--cs-global-individual-secondary-disabled) instead.
  12. @global_individual_active_background_disabled — use var(--cs-global-individual-active-background-disabled) instead.
  13. @global_individual_active_border_disabled — use var(--cs-global-individual-active-border-disabled) instead.
  14. @button-color — use #fff instead.
  15. @button-opacity-on-hover — use 0.75 instead.
  16. @header-height — use 40px instead.
  17. @button-width — use 45px instead.
  18. @button-indent — use 10px instead.
  19. @img-indent — use 10px instead.
  20. @arrow-size — use 60px instead.

Dashboard

  1. @dashboardBorderColor — use var(--cs-dashboard-border-color) instead.
  2. @dashboardBorderColor — use var(--cs-dashboard-border-color) instead.
  3. @dashboardPrimaryColor — use var(--cs-dashboard-primary-color) instead.
  4. @dashboardSecondaryColor — use var(--cs-dashboard-secondary-color) instead.

Add-ons and Upgrade center

  1. @darkTransparentMainColor — use var(--cs-shadow10-color) instead.
  2. @lightTextIconColor — use var(--cs-text-inverse-color) instead.
  3. @darkTextIconColor — use var(--cs-form-actions-background) instead.
  4. @middleTextIconColor.

Notification settings

  1. @editor-spacing — use 16px instead.
  2. @editor-width — use 500px instead.
  3. @editor-footer-border-color — use #eee instead.
  4. @editor-padding — use 17px instead.

Block manager

  1. @BlockManagerGrid — use var(--cs-block-manager-grid) instead.
  2. @BlockManagerGrid12Col — use var(--cs-block-manager-grid12-col) instead.
  3. @BlockManagerGrid16Col — use var(--cs-block-manager-grid16-col) instead.
  4. @BlockManagerIconsSprite — use var(--cs-block-manager-icons-sprite) instead.
  5. @BlockManagerOpenHand — use var(--cs-block-manager-open-hand) instead.
  6. @BlockManagerClosedHand — use var(--cs-block-manager-closed-hand) instead.
  7. @bm-block-border — use var(--bm-block-border) instead.
  8. @bm-block-hover-color.
  9. @bm-block-hover-border — use var(--bm-block-hover-border) instead.
  10. @bm-block-hover-shadow.
  11. @bm-block-hover-bg — use var(--bm-block-hover-bg) instead.
  12. @bm-block-grabbing-shadow — use var(--bm-block-grabbing-shadow) instead.
  13. @bm-block-menu — use var(--bm-block-menu) instead.
  14. @bm-block-menu-arrow — use var(--bm-block-menu-arrow) instead.
  15. @bm-border.
  16. @bm-border-radius — use var(--bm-border-radius) instead.
  17. @bm-icon-size — use var(--bm-icon-size) instead.
  18. @bm-icon — use var(--bm-icon) instead.

Vendor data premoderation add-on

  1. @editColor — use var(--cs-vendor-data-premoderation-edit-color) instead.
  2. @editBackground.

Mobile application add-on

  1. @backgoundColor — use var(--cs-mobile-app-backgound-color) instead.

Big CS-Cart Update is Here Experience the New Admin Panel with Dark Theme