OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce how Copy a default theme bundle

This topic contains 4 replies, has 4 voices, and was last updated by manoa"> silva manoa”> silva 1 month, 3 weeks ago.

  • Creator
    Topic
  • #38779

    Andrii
    Participant

    Hello

    I tried several times to create a theme package, but in the end I get an error, so I decided to copy the default theme with all the necessary files, but there is no understanding how to do it the best way.

    Please help me understand the customization of the front. My plan is this. Copy the theme by default, give it a new name, include the theme and make the necessary changes in it. Therefore, please give a general algorithm: What bundles need to be copied and pasted into the SRC directory, what commands to execute in the terminal so that later I can make the necessary changes. Is this possible or do I need to create the necessary files manually?

    OroCommerce 3.1.3
    I would appreciate the help

    thank
    with respect

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #38783
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    If you want to copy the theme, default is not the best choice as it’s split to multiple bundles.

    There is a special theme for this purpose, called custom, it is located at the CustomThemeBundle

    After copy the Bundle to src folder you will need to change the namespace and rename the bundle itself in two files
    1) CustomThemeBundle/OroCustomThemeBundle.php
    2) Resources/config/oro/bundles.yml
    Also, you have to rename the bundle folder to respect the namespace as it’s required by PSR-4 autoloader, that is used in the src folder.

    The theme name is the folder name inside “Resources/views/layouts/”, so you also need to rename the “custom” folder.
    The theme label should be changed at Resources/views/layouts/custom/theme.yml

    If you are working in a dev environment, there is no need to run a command after copying the bundle to src folder, everything is updated automatically. If you are using prod, run bin/console cache:clear --env=prod

    Now go to the Back-office > System \ Configuration \ Commerce \ Design \ Theme and change the default theme to the new one, it will appear in the dropdown automatically.

    I also recommend checking the documentation about storefront UI customization and the presentation with step-by-step guide on creating the OroCommerce theme.

    #38801

    Andrii
    Participant

    Thanks for the quick and complete reply.

    respectfully

    #38901

    chris
    Participant

    Along these same lines, after your custom app, custom bundle, and custom theme have been all defined, you’ll be customing assets, etc .. I noticed in the documentation about customizing logos the clearing of the cache is incorrectly documented.. transposed clear:cache ..

    Currently says to rebuild assets:

    I think it should read:

    Also, to ‘copy/publish’ it says to throw the –symlink flag at assets:install, which I do not feel the original install script does..

    When I ran with the –symlink, I noticed everything got absolute symlink’d which it clearly was not beforehand… Can you clarify possibly?

    #38918
    manoa"> silva
    manoa”> silva
    Participant

    a

    • This reply was modified 1 month, 3 weeks ago by manoa"> silva manoa"> silva.
    • This reply was modified 1 month, 3 weeks ago by manoa"> silva manoa"> silva.
    • This reply was modified 1 month, 3 weeks ago by manoa"> silva manoa"> silva.
    • This reply was modified 1 month, 3 weeks ago by manoa"> silva manoa"> silva.
Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

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

Yes No