Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Author
    Replies
  • in reply to: Issues while creating a Layout Theme #31714

    mike.mckean
    Participant

    Thanks!


    UI Developer at E7 Solutions
    http://www.e7solutions.com

    in reply to: Issues while creating a Layout Theme #31712

    mike.mckean
    Participant

    Sorry Daniel, I had to continue this through email. Here are some points that helped me solve the issue, that I didn’t get from the docs:

    1. Be sure to set the theme in the Admin panel, not just in config.yml. Otherwise the ‘default’ theme (which is actually the id of Oro’s layout theme) overrides it.
    2. The Quick Start docs work for Platform, but not for OroCommerce. When you set ‘groups’ in theme.yml, you need to include the ‘commerce’ group:


    UI Developer at E7 Solutions
    http://www.e7solutions.com

    in reply to: Issues while creating a Layout Theme #31710

    mike.mckean
    Participant

    Is it possible my reference to the layout is not written correctly? It is in the same directory as the default. (everything else is directly copied from the Quick Start)


    UI Developer at E7 Solutions
    http://www.e7solutions.com

    in reply to: Issues while creating a Layout Theme #25645

    mike.mckean
    Participant

    Update: I’ve moved this post to the OroCommerce forum, as that is the application we are using. I’m not sure if implementing a layout theme changes between the CRM and Commerce. Find the post here: https://oroinc.com/b2b-ecommerce/forums/topic/issues-while-creating-a-layout-theme


    UI Developer at E7 Solutions
    http://www.e7solutions.com


    mike.mckean
    Participant

    Alright, I can confirm that using assets.yml works. Here is mine:

    After placing this file in my bundle’s ‘Resources/config/oro’ directory, then doing cache:clear, oro:assets:install, and assetic:dump, my CSS was loaded in the Admin side.

    I would suggest editing some of the documentation however, as it should be more clear that you have to use assets.yml when making a reusable theme.


    UI Developer at E7 Solutions
    http://www.e7solutions.com


    mike.mckean
    Participant

    Sorry, I haven’t had time to work on this in a bit. I will try the assets.yml workaround later this week.


    UI Developer at E7 Solutions
    http://www.e7solutions.com


    mike.mckean
    Participant

    My understanding was that, if you create a theme properly, you don’t have to use assets.yml. You just declare all CSS/LESS in the settings.yml and they will append to the rest of the CSS assets. At least that’s what the docs here say:

    When application has active theme it’s styles append to the end of the list of all CSS assets of bundles.

    Each theme is appended to the list of OroAsseticBundle’s CSS assets in group “theme”.

    …and the docs here mention assets.yml, but again declare that if you have CSS files referenced properly in your settings.yml then you’re good.

    I will try using assets.yml tomorrow, but it seems redundant to reference the CSS files in both places.


    UI Developer at E7 Solutions
    http://www.e7solutions.com


    mike.mckean
    Participant

    msulima –

    Hi! This particular issue is within the OroCRM admin. I haven’t attempted store theming yet; I wanted to solve this first.

    My issue is, at this point, all of the options for the settings.yml work properly except the CSS. When I inspect the admin page CSS, I see my rules aren’t applying. I’m trying to solve this issue before moving on to templates.

    Thanks!


    UI Developer at E7 Solutions
    http://www.e7solutions.com


    mike.mckean
    Participant

    Edit 2:

    I’ve been told that all the docs/tutorials I have been following only affect the Admin side. The way I understand it, this method of theming (specifically placing my theme in Resources/public/themes) loads the theme’s files on the Admin side, not the front-end. This is not stated in the docs, but I can confirm it’s true: I am now seeing my attempts at fixing or breaking things take effect while in /admin.

    However, my problem with CSS persists. I even tried adding my own icon and updated the settings.yml:

    …which sets the site favicon just fine! By this logic, the path to my CSS files should work perfectly, yet the content of my CSS files doesn’t load.


    UI Developer at E7 Solutions
    http://www.e7solutions.com


    mike.mckean
    Participant

    Edit:

    Apologies, the file tree above didn’t match my actual tree; I had omitted and renamed based on what I thought was necessary. Below is the full tree, which includes files copy-pasted from the Atwix article referenced above. I don’t know if they are necessary for my current goal. To clarify: My CSS files do not load, meaning the CSS rules I’m creating in them are not present in the resulting styles.css file in the cached files.

    (I would have edited the first post but don’t see an edit button.)


    UI Developer at E7 Solutions
    http://www.e7solutions.com

Viewing 10 replies - 1 through 10 (of 10 total)

You will be redirected to [title]. Would you like to continue?

Yes No