logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne2  
#1 Posted : Monday, April 6, 2020 1:48:01 PM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Copying a theme still leaves all elements in the copy pointing back to the sample theme.

Assume you copy the Sample theme to 'JoeTheme'. Edit the /JoeTheme/Views/Shared/_ThemeStyles.cshtml file after you make the copy.

Everything in the file still points to /Themes/Sample/. The urls should all have been changed to point to /Themes/JoeTheme/

I thought this was fixed in 9.0.2?

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Joe Payne2  
#2 Posted : Monday, April 6, 2020 1:50:28 PM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Same for the scripts

sigh
shari  
#3 Posted : Tuesday, April 7, 2020 3:01:59 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Hi Joe,

Did you copied the theme from the admin panel UI or had it manually from file explorer?
If you use the copy function from the admin panel it will update all the resource paths to new directory path. I have tested again and it's working fine.

Please also make sure that after copying a new theme you didn't miss assigning the new theme as store default theme or assign it to a page you are testing on.

Thanks
Shaharyar
Naveed Ashraf  
#4 Posted : Tuesday, April 7, 2020 3:06:05 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
Hi Joe,

just for information, I will like to add that in 9.0.2 we can use the ~/Themes/[THEME NAME]/Theme.cofig file for scripts and style sheets configurations. This file do not require full paths for style sheets or script files.

Thanks,
Naveed

Edited by user Tuesday, April 7, 2020 3:07:12 AM(UTC)  | Reason: Not specified

Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
mazhar  
#5 Posted : Tuesday, April 7, 2020 5:02:51 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Hello Joe, Let me expand on Naveed's comment. In 9.0.2 we made some changes to theme handling and now out of the box, every theme should have a Theme.config file. This would allow you to provide a display name, description, and theme includes. You can still override the Script/Styles handling as an advanced mode as it was the case before.

We are using Theme relative includes in Theme.config and it will always point to the correct theme after you duplicate it. If you are using view override to provide theme/style handling then you should adjust your view file to have theme relative includes. You can use the Theme name from view context to build a Theme specific include. Please check Website/Views/Shared/_ThemeStyles.cshtml. Perhaps you are working on an upgraded install where your sample theme has the old script/style include files under the theme. If you haven't made any updates to theme views then simply remove the views folder from the theme. The sample theme in 9.0.2 comes without any views out of the box, you can override them if you need them.
Joe Payne2  
#6 Posted : Tuesday, April 7, 2020 6:22:16 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Yes this install is an upgrade.

I haven't modified anything yet. I just went to the Themes page in admin, told it to copy the Sample theme and then started digging into the copy. So you're saying those files are left over from old way of doing themes?

mazhar  
#7 Posted : Tuesday, April 7, 2020 6:30:31 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Yes, they are leftover files unless they were customized for some reason.
Joe Payne2  
#8 Posted : Tuesday, April 7, 2020 6:57:12 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
They may have been customized, I don't remember.

Regardless, are they still being used if they do exist? Or are they dead files?

I'm really confused by your "If you are using view override to provide theme/style handling" comment.

Am i right here:
You're saying the current (9.0.2) Sample theme does not have a 'Views' folder. And the only place to specify includes/bundles is in the theme.config file. Now, if you want to set up some overrides to base theme implementation of views, then you can recreate the Views folder and it's subfolders and all those files....and AC9 will use those files.

Is that correct?
mazhar  
#9 Posted : Tuesday, April 7, 2020 7:18:05 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Quote:
You're saying the current (9.0.2) Sample theme does not have a 'Views' folder. And the only place to specify includes/bundles is in the theme.config file. Now, if you want to set up some overrides to base theme implementation of views, then you can recreate the Views folder and it's subfolders and all those files....and AC9 will use those files.

Yes, your understanding is correct. They are not dead they are just not needed anymore just for a theme script/style includes.

Edited by user Tuesday, April 7, 2020 7:21:35 AM(UTC)  | Reason: Not specified

Joe Payne2  
#10 Posted : Tuesday, April 7, 2020 7:37:05 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Ok. So if I need to wrap the body of all pages in a class, then I'll have to implement the override views, right?

Something like this:
<body class="stretched">

<!-- Document Wrapper
============================================= -->
<div id="wrapper" class="clearfix">
mazhar  
#11 Posted : Tuesday, April 7, 2020 8:58:57 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Yes, that could be a use case. Also for example you want to change HTML of a buy product dialog then you can duplicate it under theme and change.
Joe Payne2  
#12 Posted : Tuesday, April 7, 2020 2:26:02 PM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Mazhar if we duplicate a partial view into the Themes folder, does it need to maintain the original folder structure or is MVC just going to drill down every folder it finds?
mazhar  
#13 Posted : Tuesday, April 7, 2020 2:29:32 PM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
You need to maintain the same directory structure under /Views folder.
Joe Payne2  
#14 Posted : Tuesday, April 7, 2020 2:42:53 PM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Ok great thank you
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.