Giter Club home page Giter Club logo

theme-creativeshop's Introduction

Magento 2 Creativeshop theme

This this is our parent theme for shops based on Magento 2.

Requirements

  • Magento 2,
  • NodeJS,
  • Gulp.

Documentation

First steps

Creativeshop is a Magento 2 theme package that leverages all the functionality MageSuite has to offer. It relies on component-based development approach, so it can be easily customized and extended to your needs by adding new components or overriding existing ones. This guide will show you how to setup your project with Creativeshop, explain recommended workflow and demonstrate how to use its best features, customize them and add new ones to suit your purpose.

Once you have MageSuite installed, you need to build Creativeshop and then create your own child theme. MageSuite does not rely on Magento for building the assets, it uses its own solution based on Webpack and Gulp instead. Thanks to it, you can maintain your theme repository with your own code only; rest is inherited in build process from Creativeshop.

Building Creativeshop

Before you start, make sure you have Node.js installed.

  1. Navigate to vendor/creativestyle/theme-creativeshop.
  2. Run yarn install && yarn build. It will install dependencies and build artifacts into app/design directory.

Setting up new theme

  1. Install MageSuite Theme Generator. It's a small NPM package that does for you all the dirty work of creating new Creativeshop-based theme in proper framework.
  2. Navigate to vendor/creativestyle and run magesuite-theme-generator command, the generator will ask you couple of questions.
  3. Navigate to your new theme directory (vendor/creativestyle/<your-theme>) and initiate version control repository.
  4. Build your new theme in the same way that you've build theme-creativeshop.
  5. Run bin/magento setup:upgrade.
  6. Change active Magento theme to your new theme.

Now you should have got Magento installation up and running with your new Creativeshop-based theme.

Don't forget to set theme-creativeshop or your new theme as global in Content → Design → Configuration, otherwise the Magesuite's Content Constructor will not work properly.

Development

Creativeshop is designed to achieve convenient Magento 2 development environment. After you have created your new theme you can use, modify or add any component you find in parent theme. This whole inheriting procedure is the part of theme build process, which incorporates all the stuff you need to do with your code as a theme developer. Here are commands that you may choose depending on what you would like to achieve:

  • yarn build: builds entire theme from vendor/creativestyle/<your-theme> into app/design/frontend/creativestyle/<your-theme> directory, where Magento is able to find and apply it.
  • yarn gulp watch: same as above, but the build is triggered automatically every time any changes are made in the source directory.
  • yarn start: same as above, but the additional Browsersync server is set up. It provides browser automatic reloading, CSS injection and the ability to tunnel local environment, so that it is possible to open it on any device within the same network.

In case you wonder how the build process looks in detail:

  • Previous files from destination directory are cleaned to avoid any unwanted leftovers.
  • Images are copied and optimized.
  • Miscellaneous files that don't require any transforms, such as fonts and templates, are copied.
  • SCSS and TypeScript source files are compiled and optimized.
  • Magento frontend caches are cleaned.

You have installed and built your first Creativeshop-based theme. How about adding some new component to it?

Adding new component

Creating new components is the core of the development process with Creativeshop. It's the first thing you should do if you want to customize existing component as well as write yours from scratch.

Creativeshop incorporates something which may be called component inheritance. Once you have created your child theme properly, it can inherit all the parent components. You can do whathever you want with those inherited components - modify them to any degree or just use them without any changes. It's a powerful tool for building your theme out of curated ready to use and easily customizable parts.

It's good to remember one main rule of this inheritance process - if the file is absent in the child theme, the corresponding file from parent theme is included. That's why you can safely omit any file, even the entry, and the theme will be still compiled. What's interesting, the inheritance chain works with any number of themes, so you can have got grandchild, grandgrandchild themes and so on.

Let's create new addtocart component in our child theme. This component is responsible for displaying the button and product quantity select.

Component structure

Components are stored in ~Creativeshop/src/components/<component> directory. We will refer to the path to the theme-creativeshop Magento package as ~Creativeshop, and to the name of the component as <component>. You can usually find following content in this folder:

  • index.ts: Entry file. Contains imports of dependencies, TypeScript modules and SCSS files as well as script initializing the component in final website.
  • <component>.ts: TypeScript module with the component definition.
  • <component>.scss: Component styles.
  • mixin.scss: Declarations of mixins used in the component styles.
  • hook.scss: Hooks for component mixins.

Not all of the files listed above are neccessary. Technically, functional creativeshop component is nothing more than a TypeScript module importing needed files and exporting them for Webpack consume.

For now, let's create addtocart folder in your ~Creativeshop/src/components. Note that path of your new component must match path of the parent component.

Entry file

Here you can see the original addtocart component entry file:

import AddToCart from 'components/addtocart/addtocart';
import 'components/addtocart/addtocart.scss';
new AddToCart();

Responsibilities of this file are as follows:

  • It imports the component TypeScript class. This can be also plain TypeScript or even JavaScript module, but we recommend the classical object oriented approach.
  • It imports the component styles.
  • It initializes the component in final website.

You may notice that many Creativeshop components imports and uses jQuery. You can import any other third party library installed in node_modules. It's also frequent to import other Creativeshop components as dependencies.

If your new component serves only the purpose of customizing existing parent component - that's it! From now on you can insert any file into your component directory, and will it override the coresponding file from parent theme. It's as easy as that. However, bear in mind that if your component is not just for customizing purposes, additional steps are needed to make it work. You will learn about it later.

You've just learned about inner workings of a Creativeshop component and added your first customization component. How about customizing some styles?

Styles customization

Styling the storefront is bread and butter of every Magento project. Creativeshop is designed to provide best frontend experience, both for end user and developer - because we should have fun with the development, shouldn't we?

There are two ways to customize Creativeshop component style:

  • Overriding Sass variables. You can use extensive set of variables to quickly configure certain parts of code, such as paddings, colors, animations, icons and more.
  • Overriding CSS rulesets. You can mix your own code with existing codebase and get desired effects. You can do it either by modyfing original styles or by writing them from scratch.

If you have ever used a modern CSS framework such as Bootstrap or Foundation, you are probably familiar with the first approach. It's convenient to some extent - problems begin when you want more control over look and feel of your frontend. Oftentimes only way to cope with it is to copy rulesets from original code and modify them, or to create new ones with higher specitifity. Both are quite mundane tasks, and will eventually make make your codebase a nightmare to maintain.

Creativeshop handles that issue in elegant way by allowing you to directly override particular CSS rulesets in your child theme. During build process, your customized component styles are merged to original ones - exactly like when a web browser calculates final styles. You have full control over output. You can either change a few declarations or write completely new code, and what is the best - you are always precise about selectors and specificity.

Customization process

  • Assign colors to color name variables in src/config/colors - we use Hex color code
  • Assign color name variables to theme variables in src/config/variables
  • Add/modify component variables in <your-theme>/src/components/component.scss

Those dependencies allow us to change whole theme colors set up very fast, by only adjusting variables.

Customization of <your-theme>/src/config

Colors

src/config/colors - here you should create variables for all the colors used in your theme.

  • Start with the import of colors from theme-creativeshop to be able to use them as well: @import '~Creativeshop/config/colors';
  • Use online tools to name colors, eg. color-name-hue or name-that-color

Snippet from src/config/colors

@import '~Creativeshop/config/colors';
 
$color_monza: #da001a;
$color_monza--hover: #ce0019;
 
$color_lochinvar: #2b827c; //$color_secondary-500, $color_secondary-200
 
$color_desert-storm: #f3f3f2; // $color_background-500, grey backgrounds
$color_alto: #dcdcdc; // $color_border-200, $color_background-600, light border, teh same as magesuite
 
$color_gray-nurse: #e6e7e5; // $color_background-800
 
$color_dust-gray: #9b9b9b; // $color_text-400, $color_border-500, $color_border-700, light texts, inputs(basic) borders
$color_pumice: #bfc0bf; // color_border-500

Variables

src/config/variables - here store all the variables used in the whole theme, such as colors - primary, secondary, background, font-sizes, font-weight, etc.

  • Start with the import of variables from theme-creativeshop to be able to use them as well: @import '~Creativeshop/config/variables';
  • Theme-creativeshop provides a lot of variables and most of them should be overwritten.
  • Follow the convention: component_element-modifier (with one underscore and one hyphen). If modifiers are numbers, they indicate the degree or intensity - 200 is the lightest and 900 is the darkest.

Snippet from src/config/variables

@import '~Creativeshop/config/variables';
 
$color_text-400: $color_dust-gray; //light gray
$color_text-500: $color_abbey;
$color_text-600: $color_abbey;
 
$price_color: $color_primary-500;
$price_special-color: $color_primary-500;
 
$global_header-height-mobile: 5.5rem;
 
$border-radius_base: 5px;
 
$global_header-hide-search-item-trigger-breakpoint: '>=laptop';

All the variables in theme-creativeshop are marked as !default. This means that they are taken by default, but if you create a variable with the same name, you will overwrite it and the new variable will be taken into account.

src/config/base - basic styling of basic components, such as body, buttons, etc.

src/config/breakpoints - this is where the breakpoints structure is set; likely, you won't have to make any changes to this file.

Variables naming convention

$component-name_element-name - use the underscore only once:

Snippet from your-theme/src/components/footer/footer.scss

@import 'config/variables';
 
$footer_background: $color_background-550;
 
$footer_section-title-color: $color_text-200;
$footer_section-title-font-size: 1.4em;
 
$footer_section-separator-border: 1px solid $color_border-400;
 
$footer_section-plus-include: false;
$footer_section-dropdown-width: 1.6rem;
$footer_section-dropdown-height: 1rem;
$footer_section-dropdown-color: $color_primary-500;
 
$footer_logo-width: 13.5em;
$footer_logo-height: 2.3em;

Customizing existing components

  • The styling takes place in component (<your-theme>/src/components/component).
  • To customize each component, create a component under the same directory in your theme and import the original component into it.
  • Do not change anything in theme-creativeshop, but make all the changes in your theme, creating the same structure of components.

Once the configuration folder is ready, you can start customizing the components. A simple component includes:

  • new-component.ts - contains the definition of the component
  • new-component.scss - contains styling of the component
  • index.ts - imports the component styles and initializes it.

Some of them contain subfolders or additional files.

If you customize a component existing in theme-creativeshop, you do not need to create a .ts files in your topic unless you want to expand more .ts structure.

If you only want to customize SCSS, create a .scss file with the same path as the original one and import the original .scss file into it.

Don't forget to import the component from theme-creativeshop to be able ro reuse it's variables and functionalities.

Snippet from your-theme/components/container/container.scss

@import 'config/variables';
@import 'vendors/include-media';
 
@import '~Creativeshop/components/container/container.scss';
 
.#{$ns}container {
    $root: &;
 
    &--page-pdp-details-main {
        @include media('<tablet') {
            padding: 0;
        }
    }
}

In each component, you start the customization process by overwriting the variables. Add new variables if needed. Below, import the original component, and then start entering your styles into the existing classes.

Sometimes there are subfolders in the component. During the customization process, it is important to have the same folder structure. Only then the gulp merging process will run correctly.

Mixins and hooks

  • We use SASS mixins to make our code reusable and more versatile.
  • You will find mixins files created for components that can have different variants - e.g. buttons, teasers, badges, etc.
  • Use the hook files to modify mixins - it is always empty in theme-creativeshop and you can overwrite this file by creating it in your theme to modify a specific mixin.
  • If you want to overwrite the variables declared in the mixin file, do so in the appropriate mixin file in your theme.

Snippet from your-theme/src/components/badge/mixin.scss

@import 'config/variables';
@import 'components/badge/hook';
 
$badge_height: 2.1rem;
$badge_padding: 0.5rem 1.2rem;
$badge_border-radius: 0;
 
$badge--new-background: $color_background-700;
$badge--new-color: $color_white;
 
$badge--sale-background: $color_primary-500;
$badge--discount-background: transparent;
 
$badge--free-shipping-background: $color_background-700;
$badge--popular-background: $color_background-700;
 
@import '~Creativeshop/components/badge/mixin.scss';

Below snippet from your-theme/src/components/badge/hook.scss

@import 'utils/get-value-from-list';
 
/* stylelint-disable block-no-empty  */
@mixin badge_hook($type) {
    display: flex;
    flex-direction: column;
    min-width: 5rem;
 
    &:before {
        content: none;
    }
}
 
@mixin badge_type-hook($type) {
    @if ($type == 'is_advertised') {
        background-color: $color_background-900;
        color: $color_white;
    }
 
    @if ($type == 'discount') {
        min-width: 4.8rem;
        padding: 0 ;
    }
}

Utils

There are additional useful functions here, often imported in components. It is good to familiarize yourself with them to be able to use them.

You've just learned about good style customization practices. It's time to find out how to add your own brand new component!

Split entries

To increase the performance of the pages loading, we decided to use Webpack's split chunks feature, which allows dividing bundles into chunks. The idea behind was to not load every Magesuite component at once, just to have a commons bundle with components that are always required and the smaller bundles that we can import exactly when we need it. Webpack takes all the entries and extracts the commons bundles (commons.js and commons.css) containing components used in most of the entries, then puts the rest in smaller particular bundles. Build files you can find in app/design/frontend/creativestyle/theme-creativeshop/web/js and app/design/frontend/creativestyle/theme-creativeshop/web/css.

Example: Assume we have 2 entry points: pdp.ts and category.ts. Each of them imports components/product-tile plus its specific components, like pages/pdp and pages/category. Based on that, Webpack creates commons.js and commons.css bundles containing the product-tile component logic and styling. But it also creates pdp.js/pdp.css and category.js/category.css bundles to be used for PDP or category page only.

In ,theme-creativeshop/src/entries, you can find two types of entry points: entries for pages (ex. category.ts) and entries for modules (ex. magesuite-brand-management.ts).

Base entries

They should contain all components that are needed for some specific page in the shop. Bundles produced from these entries we import on particular pages

Regarding CSS, we add the commons.css to every page in the shop and add other bundles via xml inside the <head> tag in places where we need them.

Example: theme-creativeshop/src/Magento_Catalog/layout/catalog_product_view.xml

<head>
    <css src="css/pdp.css"/>
</head>

As for the Javascript bundles, they have defined an explicit dependency on the commons.js package (in theme-creativeshop/src/requirejs-config.js).

To add the single JS bundle we use the reference to the script block where we can pass the bundle_name argument.

Example: theme-creativeshop/src/Magento_Catalog/layout/catalog_product_view.xml

<referenceBlock name="scripts">
    <arguments>
        <argument name="bundle_name" xsi:type="string">pdp</argument>
    </arguments>
</referenceBlock>

Important: When we use this script block, we replace the js bundle, not adding another one, so you need to be sure that bundle you use contains all the required components.

Basically, the most important entries are:

  • cms.ts - cms pages
  • pdp.ts - product details page
  • category.ts - products overview page (category)
  • checkout.ts - checkout, cart pages
  • customer.ts - user area pages
  • contact.ts - contact page

They are responsible for basic pages across the shop and contain all the components that are required for them.

By default, we use cms.js bundle as the base one.

Entries for modules

They can contain styles and logic used by the specific module. Bundles generated form them, we use only as an addition to the base bundles. For example, the magesuite-brand-management.ts entry imports only styling for the brand list (MageSuite_BrandManagement/web/css/brands-index.scss).

Brand page itself relies on category.js and category.css bundles but in addition, we attach magesuite-brand-management.css bundle to it

Adding components to entries

To add a new component, you have to import it in every entry where you want it. For example, if you want to add some "special-product-promo" component, which will be used on category page and PDP only, you have to add below code to the pdp.ts and category.ts entries.

import 'components/special-product-promo';

Frequently asked questions

theme-creativeshop's People

Contributors

adamkarnowka avatar berbua avatar dependabot[bot] avatar devranowski avatar diwipl avatar drabikowy avatar evilprophet avatar fritzmg avatar groomershop-mt avatar ijozwiak avatar janssensjelle avatar jlewko avatar jtomaszewski avatar krisdante avatar krzysztofmoskalik avatar leone avatar mrtuvn avatar msiewierska avatar pinkeen avatar ptylek avatar sunel avatar szpadel avatar tymzap avatar xylodev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theme-creativeshop's Issues

v11.2.0 available?

Hi All - I ran composer update yesterday expecting to pull v11.2.0 of theme-creativeshop but no luck . Does it take a few days for new tagged version to be available via composer?

Thanks!
David

Disable search autocomplete

Is it posssible to disable the search autocomplete at page header? We have a third party plugin for search autocomplete at the header and only need the ElesticSearch at catalogseach page.

Typo in calling plural translation in rating-stars.phtml:39

On a fresh magento 2.3.2 install + sample datas + elasticsuite 2.8.X
I had to change line 39 from

$reviewsCountMessage = $reviewsCount . ' ' . ($reviewsCount == 1 ? __('review') : _('reviews')) . '';

to (double underscore)

$reviewsCountMessage = $reviewsCount . ' ' . ($reviewsCount == 1 ? __('review') : __('reviews')) . '';

Fatal error: Uncaught Error: Call to undefined function _() in /var/www/html/app/design/frontend/creativestyle/theme-creativeshop/Magento_Review/templates/rating-stars.phtml:39 Stack trace: #0 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include()
/var/www/html/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template\Interceptor), '/var/www/html/a...', Array)
/var/www/html/generated/code/Magento/Framework/View/Element/Template/Interceptor.php(102): Magento\Framework\View\Element\Template->fetchView('/var/www/html/a...')

/var/www/html/vendor/magento/framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template\Interceptor->fetchView('/var/www/html/a...') #4 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1094): Magento\Framework\View\Element\Template->_toHtml() #5 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1098): Magento\Fra in /var/www/html/app/design/frontend/creativestyle/theme-creativeshop/Magento_Review/templates/rating-stars.phtml on line 39

PDP forms after clicking "Submit" are open in sidebar modal, and then moved to buybox container

Either we're overwriting some code incorrectly, or 1fde59a#diff-3819ee66c6b898de866920657ce39e5a5eeb14ed53d27cc29945e694982867fbR16 caused a regression which makes forms like "Write review" be open in a modal. After modal is closed, then they are moved to buybox container, even if they had been placed originally in a different place:

Before submit
image

After submit
image

After submit and closing the modal
image

BTW. Do you plan to update https://demo.magesuite.io/ so that it uses the newest theme-creativeshop? Then it would be easier to see if the bug is in theme-creativeshop or at our side.

When running yarn build. buildWebpack fails

Setup new theme with magesuite-theme-generator
npm -v 6.14.4
node -v v10.19.0
yarn -v1.21.1

After running:
npm install
yarn install
yarn build
fails with below error:

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry should be an non-empty object.
   -> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
    at webpack (/var/www/html/m2/dev/theme/myTheme/node_modules/@creativestyle/magesuite-frontend-builder/node_modules/webpack/lib/webpack.js:31:9)
    at buildWebpack (/var/www/html/m2/dev/theme/myTheme/node_modules/@creativestyle/magesuite-frontend-builder/gulp/tasks/buildWebpack.js:15:22)
    at taskWrapper (/var/www/html/m2/dev/theme/myTheme/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:402:14)
    at runBound (domain.js:415:12)
    at asyncRunner (/var/www/html/m2/dev/theme/myTheme/node_modules/async-done/index.js:55:18)
    at process._tickCallback (internal/process/next_tick.js:61:11)
[14:50:05] 'build' errored after 67 ms
[14:50:05] The following tasks did not complete: copyHtml, copyScripts, copyImages, copyUnchanged
[14:50:05] Did you forget to signal async completion?
error Command failed with exit code 1.

referenceBlock with group-attribute not allowed

On loading a Product-View the following exception occurs:

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2883

Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2890

Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2915

Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2924


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2883

Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2890

Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2915

Element 'referenceBlock', attribute 'group': The attribute 'group' is not allowed.
Line: 2924

#0 /var/www/vendor/magento/framework/Config/Dom.php(117): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')

The reason is the use of the group-Attribute on referenceBlock-Tags inside Layout-XML:

<referenceBlock name="product.info.description" group="column_left">

<referenceBlock name="product.attributes" group="column_right">

<referenceBlock name="catalog.product.related" group="detailed_info">

<referenceBlock name="product.info.upsell" group="detailed_info">

Biding multiple theme in parallel

Hi,
I am new to gulp and theme-creativeshop.

I have created 4 children theme as described in the readme file. Each theme has node_modules directory that contains over 28k files. I have over 140k files just on in node_modules directories.

Am I missing something? Is it possible to package.json in the Magento root and install node modules once and reuse them when building child and parent themes?

Is it possible to build/watch all theme with single commands?

Thanks,
Shakh

Uncaught TypeError: base is not a constructor

Magento Version: 2.4.2
Magesuite Version: 7.0.0
Creativeshop theme Version: 11.0.1

The error happens on Product View and Checkout. Therefore the Checkout is not fully loading.

widget.js:75
Uncaught TypeError: base is not a constructor
    at Function.$.widget (widget.js:75)
    at validation-ext.js:41
    at mixins.js:105
    at Array.forEach (<anonymous>)
    at applyMixins (mixins.js:104)
    at mixins.js:129
    at Object.execCb (require.js:1650)
    at Object.context.execCb (resolver.js:156)
    at Module.check (require.js:866)
    at Module.<anonymous> (require.js:1113)

./preview.png magesuite-theme-generator

Hi,
I have this error when running .yarn/bin/magesuite-theme-generator

Cloning CreativeShop repository to use as a base...
Adjusting registration.php file...
Adjusting composer.json file...
Adjusting theme.xml file...
Adding default preview file...
ENOENT: no such file or directory, stat './preview.png'

How can I solve this?
Thank you

Demo Theme

Hello

I was expecting that theme-creativeshop gives me the same layout as is used on the demo-site [https://demo.magesuite.io], but it does not look the same on my machine.

Is there something wrong with my installation or is it a different theme? If the theme is different, where to get the theme from the demo-site?

Thanks in advance.

Greetings

Patrick

Category Icon display

Hi All - I just started uploading category icons and expected them to appear in main nav automatically. I can't for the life of me find any config settings or xml settings. I did find a setting for mobile navigation but that's it. Can anyone point me in the right direction? Thanks!

➜ 2html git:(m242) ✗ ack 'show_category_icon' vendor/creativestyle
vendor/creativestyle/magesuite-navigation/view/frontend/layout/navigation_mobile_index.xml
9: false

Gulp watcher not recognizing new files

Every time I am adding a new file to my theme, the gulp watcher doesn't notice it that there is a new file. I have to stop the watcher, delete all generated files and restart it. Pretty time consuming

My setup:

  • Magento: v2.3.4
  • MageSuite: ^5.0.0 (fresh install yesterday, so everything should be up-to-date)
  • creativestyle/theme-creativeshop: ^8.0.0
  • Node: v10.19.0
  • NPM: v6.13.4
  • Disabled Magento caches: Layouts, Blocks HTML, FPC (but also tried it with all caches disabled)
  • deploy:mode developer
  • Custom theme based on theme-creativeshop using magesuite-theme-generator

How did I start the watcher?

  • yarn && yarn build: for theme-creativeshop
  • yarn && yarn build: for theme-customtheme
  • inside theme-customtheme: yarn start

At this point the watcher is running like it should, opens new browser window and theme gets build

Now if I copy a file (tested with scss and layout xml) into my theme to overwrite it or even create my own to extend something, the watcher does NOT notice the new file, therefore not rebuilding / refreshing the theme. A simple restart for the watcher does not work!

What I am doing to get the file recognized:

  • stop gulp watcher
  • delete app/design/frontend/theme-customtheme
  • delete everything inside generated/code
  • delete pub/static/frontend
  • delete everything inside var/cache
  • delete everything inside var/page-cache
  • delete var/view_preprocessed/pub/static/frontend
  • restart gulp watcher with yarn start
    --> Now theme gets build with the new files, also if I change something inside of them now, the watcher updates my changes

BUT: as soon as I add a new file, I have to do the whole process with deleting that generated files again!

As I mentioned, I've tried it with all magento caches disabled but it's not fixing the problem. So I guess the problem is somewhere else.
Would be cool if someone knows a permanent solution for it.

Price slider incorrect format in german locale store

The javascrip parseFloat() function is not working for price slider if the store locale is german.

In a german store the , is the decimal separator und the . is the thousand separator.

URL: http://m24.test.com/test.html?price=0-4870

Initial situation:

image

Click into from price (1) => to price change to incorret format

image

Click into to price (2) => to price change to incorret format

image

Same behavior for to price if to price is filled.

In english locale store it works fine benause the . is the decimal separator und the , the thousand separator.

image

Solution for German store:

_onInputsChange: function(event) {
                var key = event.key || event.keyCode;

                if (event.type === 'blur' || key === 'Enter' || key === 13) {
                    var from = parseFloat(
                        this.element
                            .find(this.options.fromInput)
                            .val()
                            .replace(/[^\d\.\,]/, '')
                            .replace(/\./g, '')
                            .replace(/\,/g, '.') || 0
                    );
                    var to = parseFloat(
                        this.element
                            .find(this.options.toInput)
                            .val()
                            .replace(/[^\d\.\,]/, '')
                            .replace(/\./g, '')
                            .replace(/\,/g, '.') || 0
                    );

                    if (!to) {
                        to = this.maxValue;
                    }

                    if (from > to) {
                        from = to - this.rate;
                    }

                    if (from < this.minValue) {
                        from = this.minValue;
                    }

                    if (to > this.maxValue) {
                        to = this.maxValue;
                    }

                    this._updateRange(from, to);
                }
            }

If switch back to english store the solution for german store will not work.

images not shown in category view - short description

Hi,

I'm facing an issue when trying to add images in product short description with the theme.
Pictures are not visible, in category view, but OK in product view.
Web browser dev console shows 404 error when trying to load the image, due to wrong link (see attached screenshot)

category

Issue only present with theme-creativeshop, ok with Luma theme.

Element 'referenceBlock', attribute 'after': The attribute 'after' is not allowed.

When accessing customer account page this error occurs:
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'after': The attribute 'after' is not allowed.
Line: 2842.

File that causes this: /vendor/creativestyle/theme-creativeshop/src/Magento_Customer/layout/customer_account.xml has referenceBlock after tags.

"Out of stock" display on category view

Hi,
I have a display difference between products availability display on category view vs product itself.

On product side : the product is displayed in stock; correct for me like below:

P01

But for the same product in category view:
P02

Default config : Inventory configuration:
Display Out of Stock Products : Yes
Display Products Availability in Stock on Storefront : Yes

Product Stock Options:
Manage Stock : No

On the product itself:
Quantity: 1
and of course Manage Stock: No

With Luma there is no Out of Stock display on the category view.

How can I solve this?

M 2.4.1 - php 7.4.3 - magesuite ^7.0.0

Thks
Thomas

Icon flag in the store selector

Hello!

This is just a question.

How to change the icon flag in the store selector? I didn't find any place to change in the admin.

Thank you!

Best Regards,
Fernando Silva

Shopping cart frame

Hi,
On a new installation of the last version , the cart frame shows 2 empty rectangles

cart

instead of "empty cart" like on creativshop test server

cart2

Any ideas?

Thank you
Thomas

v11.0.0 Release and magesuite requirements

Hi All - Do you intend to update Magesuite requirements for latest release of createshop theme or is there more work to be done before it is fully compatible?

Thanks!
David

No validation for "Teaser Width" and "Mobile Order" in Teaser and text component.

Content creator interface allows you to save a "Teaser and text" element without selecting "Teaser width" and "Mobile Order".
It causes an error:
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/vendor/creativestyle/magesuite-content-constructor-frontend/view/frontend/templates/component/teaser_and_text.phtml on line 9

Footer Newsletter from & social icons elements not shown

Hi,

Magento 2.4.0
PHP 7.4.3

Newsletter form and social icons are hidden after creativshop theme deployment is that normal?
On the demo site they appear like this :

footer

I can see the three footer links block in Magento_theme/layout/default.xml for the sample links; they appear.

footer2

But social icons are hidden even if the container seems to be defined

 <container name="footer.element.extras" htmlTag="div" htmlClass="cs-footer__item cs-footer__item--extras">
                <block name="footer.socials" template="Magento_Theme::footer/section.phtml">

And no section for the newsletter subscription - could someone give me a clue?

Thks
Thomas

fix(swatch-renderer-ext): Make prices be updated also in list mode view

Currently there are two .price-box divs per each .cs-product-tile (1 for grid view, 1 for list view), and only one of them (the grid view one) is contained in the default this.options.selectorProduct which is .product-info-main.

Because of that, currently if user selects a swatch in the product listing in list view mode, the price is not updated. (It is updated only in grid view mode).

Product page gallery: image height is no longer hardcoded

This commit ( cc @krzksz ) removed $loaderPadding from being used in the Magento_Catalog/templates/product/view/gallery.phtml . Now, the product page content "jumps" after image is loaded.

Instead, we could keep on using $loaderPadding so that we "hardcode" the img container's height, so that the browser doesn't have to rerender its' surroundings after image is loaded.

Do you mind bringing it back? I could submit a PR.

Menu navigation bug in mobile version

There seem to be the following two bugs in mobile version menu navigation.

・Scroll doesn't work when you open the menu a second time (open-> close-> open).
・Scroll doesn't work if you are in a first-level category that has no child categories

◆Environment
Magento: 2.3.4
creativestyle/magesuite: v3.0.2
magesuite/theme-creativeshop: 8.4.0

Blank screen after removing item from cart directly after it was added

Hi,

I encountered a weird issue when doing some exploratory testing. With offcanvas minicart enabled, adding a product to the cart and immediately removing it again leaves the customer with a blank page. Looking in the page style it seems the body._has-modal overflow: hidden; is causing it. When a product from somewhere at the top of a page is added only part of the screen is blank.

Steps to reproduce:

  • Scroll down on a page with products
  • Add a product to cart, (offcanvas minicart opens)
  • Remove the item from the cart, (screen turns blank)
  • Open a web inspector and look for the <body> element.
  • Look for the body._has-modal style and disable overflow:hidden
  • Page is visible again

My system is running the following:

  • macOS Catalina 10.15.7 (19H2)
  • Safari 13.1.3 (15609.4.1)

I tried the same steps in Google Chrome and Firefox, that just works fine, no issues there.

Running the same steps on macOS BigSur 11.2.3 with Safari 14.0.3 (16610.4.3.1.7) shows no issues.

Details on the installation:

  • Magento 2.4.1-p1
  • Magesuite v7.0.0
  • theme-creativeshop v11.0.2
  • PHP7.4.8
  • MySQL 8.0

E-mail templates styles

Hello!

How to load the css style's theme creativeshop in the email templates?

Thank you!

Best Regards,
Fernando Silva

Cart page broken after 8.14.8 update

After updating to 8.14.8 the cart page appears to be broken as soon as a product is entered into the cart.

The page comes up blank with only

Item | Price | Qty | Subtotal |  
-- | -- | -- | -- | --

 
being displayed as output and appears to break on the link to the first item in the cart table.

The cart page loads fine as long as there are no items in the cart.
The checkout and header mini cart work as expected, the only page affected is the cart overview page (/checkout/cart/)

checkout next step button position is not intuitive for desktop

Hi,

I love the job you've done with the theme but while exploring it for the first time I noticed the first thing that might confuse inexperienced users.

The next step button in checkout is not in an intuitive position.

I mean that while the user is filling his data, he scrolls down quite a bit in desktop and the button is lost from his sight so I end up with a screen like this.

image

The first time I entered the page, I didn't notice that the button was on the right column so I missed it. It took me a few seconds to think of scrolling up. Now if you think this happened to me momentarily, older people could be staring at a blank screen for a while :)

Can i create a theme-creativeshop grandchild?

Hi,

I'm currently doing some experiments with theme-creativeshop. I created a child theme which is working perfectly! I extended the child theme and would like to create another child based on the child, resulting in the following inheritance structure:

(parent)                (child)       (grandchild)
theme-creativeshop  <-  my-child  <-  my-child-child

I generated a new child using mtg according to the guide and changed the following line in grandchild/src/theme.xml:

<parent>Creativestyle/theme-creativeshop</parent>

to

<parent>Creativestyle/my-child</parent>

However, when building the grandchild i encounter the following error in yarn build:

yarn build
yarn run v1.22.5
$ gulp build --env production
[19:03:56] Using gulpfile ~/dev/magento/vendor/creativestyle/my-child-child/gulpfile.js
[19:03:56] Starting 'build'...
[19:03:56] Starting 'clean'...
[19:03:56] Finished 'clean' after 44 ms
[19:03:56] Starting 'collectViewXml'...
[19:03:56] Finished 'collectViewXml' after 22 ms
[19:03:56] Starting 'buildWebpack'...
[19:03:56] Starting 'copyHtml'...
[19:03:56] Starting 'copyScripts'...
[19:03:56] Starting 'copyImages'...
[19:03:56] Starting 'copyUnchanged'...
[19:03:56] 'buildWebpack' errored after 112 ms
[19:03:56] WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry should be an non-empty object.
   -> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
    at webpack (/data/web/dev/magento/vendor/creativestyle/my-child-child/node_modules/webpack/lib/webpack.js:31:9)
    at buildWebpack (/data/web/dev/magento/vendor/creativestyle/my-child-child/node_modules/@creativestyle/magesuite-frontend-builder/gulp/tasks/buildWebpack.js:15:22)
    at taskWrapper (/data/web/dev/magento/vendor/creativestyle/my-child-child/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:402:14)
    at runBound (domain.js:415:12)
    at asyncRunner (/data/web/dev/magento/vendor/creativestyle/my-child-child/node_modules/async-done/index.js:55:18)
    at process._tickCallback (internal/process/next_tick.js:61:11)
[19:03:56] 'build' errored after 191 ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reverting the parent to theme-creativeshop the theme builds again (making it child instead of grandchild). I now start to wonder if this scenario is supported or not (yet?) hence i opened this ticket. Can i create a grandchild of theme-creativeshop? Am i doing something wrong?

empty htmlClass attributes

Hi,

You have some empty htmlClass attributes in some layout files which triggers an error in developer mode.

Issue in category page

While visit category page i got issue

Screenshot from 2021-03-27 22-49-08

Use magento 2.4
with php 7.4.9

=> Maximum nesting level

My list modules in composer.json ( i don't install all modules in magesuite. Just install few what i need)

"creativestyle/magesuite-content-constructor-admin": "^2.0.0",
"creativestyle/magesuite-content-constructor-frontend": "^3.0.0",
"creativestyle/magesuite-content-constructor-category-page": "^1.0.0",
"creativestyle/magesuite-content-constructor-remove-layout-validation": "^1.0.0",
"creativestyle/magesuite-content-constructor-asset": "^1.0.0",
"creativestyle/magesuite-content-constructor": "^2.0.0",
"creativestyle/magesuite-frontend": "^2.0.0",
"creativestyle/magesuite-category-hero": "^1.0.0",
"creativestyle/magesuite-translation-center": "^1.0.0",
"creativestyle/magesuite-js-translation-fix": "^1.0.0",
"creativestyle/magesuite-thumbnail-remove": "^1.0.0",
"creativestyle/magesuite-maintenance-page": "^1.0.0",
"creativestyle/magesuite-defer-js": "^1.0.0",
"creativestyle/magesuite-cache": "^1.0.0",
"creativestyle/magesuite-magepack": "^1.1.4",
"creativestyle/magesuite-product-positive-indicators": "^2.0.0",
"creativestyle/magesuite-sentry-io": "^1.0.0",
"creativestyle/magesuite-seo-hreflang": "^1.0.0",
"creativestyle/magesuite-pagination": "^1.0.0",
"creativestyle/magesuite-extended-exception": "^1.0.0",
"creativestyle/magesuite-cms-duplicate": "^2.0.0",
"creativestyle/magesuite-file-upload": "^1.0.0",
"creativestyle/magesuite-seo-canonical": "^1.0.0",
"creativestyle/magesuite-soft-db-status-validation": "^1.0.0",
"creativestyle/magesuite-persistent-sitemap": "^1.0.0",
"creativestyle/magesuite-url-regeneration": "^1.0.0",
"creativestyle/magesuite-url-rewrite": "^1.0.0",
"creativestyle/magesuite-url-rewrite-mass-actions": "^1.0.0",
"creativestyle/magesuite-clear-attributes": "^1.0.0",
"creativestyle/magesuite-opengraph": "^1.0.0",
"creativestyle/magesuite-google-api": "^1.0.0",
"creativestyle/magesuite-cms-product-backlink": "^1.0.0",
"creativestyle/magesuite-product-bestsellers-ranking": "^1.0.0",
"creativestyle/magesuite-daily-deal": "^1.0.0",
"creativestyle/magesuite-cms-tag-manager": "^1.0.0",
"creativestyle/magesuite-email-attachments": "^3.0.0",
"creativestyle/magesuite-gdpr": "^1.0.1",
"creativestyle/magesuite-sorting": "^1.0.0",
"creativestyle/magesuite-brand-management": "^1.0.0",
"smile/elasticsuite": "^2.10",
"creativestyle/theme-creativeshop": "11.1.0",

variable @icon-error is undefined

Error during:

php bin/magento setup:static-content:deploy -f

after

composer update

and

Updating creativestyle/theme-creativeshop (v10.2.1 => v10.3.4):

frontend/Creativestyle/theme-creativeshop/de_DE 286/2796            ==>------------------------- 10%    1 sec
Compilation from source: /var/www/html/magento-24/lib/web/mage/gallery/gallery.less
variable @icon-error is undefined in file /var/www/html/magento-24/var/view_preprocessed/pub/static/frontend/Creativestyle/theme-creativeshop/de_DE/css/source/_theme.less in _theme.less on line 382, column 22
380| @message-icon__inner-padding-left: 45px;
381| @message-icon__top: 22px;
382| @message-error-icon: @icon-error;
383| @message-success-icon: @icon-success;
384| 
385| //

Customer registration Portuguese Brazil View

Hello,

I'm have an issue on customer registration screen on Portuguese store view.

The message is appearing:

"The date of birth cannot be greater than today"

On the portuguese store view I'm used date time format: dd/MM/YYYY.

On the other stores is ok, just only portuguese view this issues occurrence.

Could you help me, please?

Thank you!

Kind Regards,
Fernando Silva

Filters not visible

Hi,

The filters are not visible.
Only standard filter price is visible.

Attribute is enabled and working on clean magento install (migrated attribute from there)
Running magento 2.4.1 and php 7.4
Any suggestions?

Rating stars off position / css broken

It seems the css for the rating stars (cs-reviews__rate-stars) is broken on the pdp - the overlay (filled) stars are in a line below the greyed out versions, and there is a duplicate (gold) stack of 1-5 stars beneath, I hope the screen shows it.

Noticed on the previous version of theme-creativeshop, and it appears to still be persistent in the 8.14.8 release

rating-stars-pdp

Error trying to generate the CreativeStyle theme

Hello!

Error trying to generate the CreativeStyle theme. See below:

`# yarn install
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@creativestyle/magesuite-frontend-builder > [email protected]" has incorrect peer dependency "tslint@^5.0.0".
warning "@creativestyle/magesuite-frontend-builder > tslint-eslint-rules-recommended > [email protected]" has incorrect peer dependency "tslint@^5.0.0".
[4/4] Building fresh packages...
[-/7] ⠂ waiting...
[2/7] ⠂ gifsicle
[-/7] ⠂ waiting...
[-/7] ⠂ waiting...
warning Error running install script for optional dependency: "/magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle
Output:
⚠ Response code 404 (Not Found)
⚠ gifsicle pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --disable-gifview --disable-gifdiff --prefix="/magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle/vendor" --bindir="/magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle/vendor"
/bin/sh: ./configure: Permission denied

at /magento/vendor/creativestyle/theme-creativeshop/node_modules/bin-build/node_modules/exsuccess Saved lockfile.

Done in 37.03s.
`

after

`yarn build
yarn run v1.22.4
$ gulp build --env production
[19:30:05] gulp-imagemin: Couldn't load default plugin "gifsicle"
[19:30:06] Using gulpfile /magento/vendor/creativestyle/theme-creativeshop/gulpfile.js
[19:30:06] Starting 'build'...
[19:30:06] Starting 'clean'...
[19:30:06] Finished 'clean' after 38 ms
[19:30:06] Starting 'collectViewXml'...
[19:30:06] Finished 'collectViewXml' after 59 ms
[19:30:06] Starting 'buildWebpack'...
[19:30:06] Starting 'copyHtml'...
[19:30:06] Starting 'copyScripts'...
[19:30:06] Starting 'copyImages'...
[19:30:06] Starting 'copyUnchanged'...
[19:30:08] 'copyImages' errored after 1.64 s
[19:30:08] TypeError in plugin "gulp-imagemin"
Message:
fn is not a function
Details:
fileName: /magento/vendor/creativestyle/theme-creativeshop/src/preview.png
domainEmitter: [object Object]
domainThrown: false

[19:30:08] 'build' errored after 1.74 s
[19:30:08] The following tasks did not complete: buildWebpack, copyHtml, copyScripts, copyUnchanged
[19:30:08] Did you forget to signal async completion?
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

theme and child theme upgrade

Hi devTeam,

Just a stupid question : what is the way to upgrade the previous creativeshop version ie the child theme?

Just copy the src folder content in themes directories?

thks
Thomas

Add to cart : Something went wrong

Hi Dev Team,

I've noticed the following behaviour when adding a product to cart ( click on Add to cart from product page) : button hover switches to red with message "something went wrong" but the product was added correctly to the cart.
Message appears on your demo store too from laptop or mobile and on my test server with 1000 products.
if the hosting server is slow the message will be visible longer.

add_to_cart

Is there a way to solve this?
Thks Thomas

CMS page design with SCSS

Hello,
I just design my CMS page header, footer, and navbar by overriding CSS. But now I want to design it overriding SCSS files. But in my app/design/frontend/creativestyle/themecreativeshop directory, it did not generate any SCSS files. So I just confused about how to override it. Any expert or developer can help me to figure out what will I do for designing it now.

Thanks in advance.

Freight calculation

Hello!

How can I enable shipping calculation on the cart page or on the product page?

I noticed that it shows only on the checkout page.

Best Regards,
Fernando Silva

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.