Post by SoccerGuy3 » Wed Jul 19, 2017 6:42 am

New to OpenCart, but surely this isn't that hard... I want to make some simple changes to the default theme. I created a new directory at catalog >> view >> theme called "newtheme". Created image, stylesheet and template directories inside that. When I go into the admin at System >> Settings >> select my store I only see the default theme there for selection under Themes. There isn't really any info on this on the web yet (since 3.0 is so new I guess). Help!

Newbie

Posts

Joined
Wed Jul 19, 2017 6:35 am

Post by cyclops12 » Thu Jul 20, 2017 1:42 am

Try going into extensions/extensions and choose Themes from the dropdown
Edit your theme and you should be able to select your new theme in the Theme Directory dropdown

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by MarcPinnell » Wed Jul 26, 2017 1:17 am

I had to change usernames as my other user can't reply for some reason...

Anyway, I can see the newtheme under extensions >> Themes >> edit >> Theme Directory

However, if I go to System >> Settings >> "Store" Edit >> General, it shows the default theme and only the default theme under the drop in the Theme section. The preview is the default theme as well.

The public side of the store is showing the "newtheme" design. This doesn't make any sense.

New member

Posts

Joined
Wed Jul 26, 2017 1:12 am

Post by labeshops » Wed Jul 26, 2017 3:22 am

There are a lot of things it seems where "enabling" does not stick. Themes are one of them for me.

Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by cyclops12 » Mon Jul 31, 2017 2:44 am

MarcPinnell wrote:
Wed Jul 26, 2017 1:17 am
I had to change usernames as my other user can't reply for some reason...

Anyway, I can see the newtheme under extensions >> Themes >> edit >> Theme Directory

However, if I go to System >> Settings >> "Store" Edit >> General, it shows the default theme and only the default theme under the drop in the Theme section. The preview is the default theme as well.

The public side of the store is showing the "newtheme" design. This doesn't make any sense.
Yes if you look at the code for the settings page it is not coded to show what actual theme you have installed.....only the text "Default Store Theme"

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by BigSoft » Thu Aug 31, 2017 7:38 pm

To install or make installable a new theme THEMENAME for Opencart 3 (may not be the complete intention of developers but it just worked for me - i hope i recall all the steps):

1. Copy all the files to catalog/view/theme/THEMENAME
2. Create the files
./admin/language/en-gb/extension/theme/THEMENAME.php (other languages too if needed)
./admin/view/template/extension/theme/THEMENAME.twig
./admin/controller/extension/theme/THEMENAME.php
as the respective default theme files and replacing theme_default with theme_THEMENAME, heading title on language files etc
3. You can now go to Extensions- Extensions Filter Themes and see your new Theme. Enable, choose the directory you uploaded at in step 1 and set all the parameters necessary and save
4. You can now go to System Settings edit your store(s) and select the NEWTHEME

You should now be seeing your new theme (assuming client/server caches are set to renew)

Hope it helps

Bigsoft.Gr - Greece Europe based Worldwide Opencart Development


Newbie

Posts

Joined
Fri Feb 13, 2015 6:23 pm

Post by jon.mosier@mac.com » Wed Sep 13, 2017 12:35 am

Thank you for your post. It has helped me get a bit further.

I simply duplicated the Default theme and tried to change everything to jon instead of default (...public_html/catalog/view/theme/jon/). After applying the steps from your post, I'm able to select the theme in the admin now, but get the following error when I try to apply it to my store.

Fatal error: Uncaught Error: Class 'Controllerextensionthemejon' not found in .../storage/modification/system/engine/action.php:71 Stack trace: #0 .../storage/modification/system/engine/loader.php(48): Action->execute(Object(Registry), Array) #1 .../public_html/admin/controller/extension/extension/theme.php(44): Loader->controller('extension/theme...') #2 .../storage/modification/system/engine/action.php(79): ControllerExtensionExtensionTheme->uninstall() #3 .../public_html/admin/controller/startup/router.php(26): Action->execute(Object(Registry), Array) #4 .../storage/modification/system/engine/action.php(79): ControllerStartupRouter->index() #5 .../public_html/system/engine/router.php(67): Action->execute(Object(Registry)) #6 .../public_html/system/engine/router.php(56): Router->execute(Object(Action)) #7 /v in .../storage/modification/system/engine/action.php on line 71

Any ideas would be greatly appreciated.

Thanks,
Jon

User avatar

Posts

Joined
Fri Oct 04, 2013 9:27 pm

Post by justcurious » Sun Sep 24, 2017 4:34 pm

Try changing the second line of the file admin/controller/extension/theme/your_theme.php from:

class ControllerExtensionThemeDefault extends Controller {

to:
class ControllerExtensionThemeYourTheme extends Controller {

Note the capitalisation of the theme name !

.

Google Product Feed - Get your products into Google Shopping. Includes a bulk update facility.
Backup Pro - Backup (on demand or scheduled), Restore and Clone your store.
Freestyle Box - Add multiple information boxes on multiple pages of your store. Includes optional "Code Mode".
View my other extensions


User avatar
Active Member

Posts

Joined
Sat Dec 24, 2011 4:36 pm
Location - UK

Post by archaeopteryx » Tue Oct 03, 2017 8:21 am

In the newly created mytheme.twig template do i replace all 48 occurrences of theme_default_* mentioned in all the name attributes for different elements? I have followed the steps to the "T" and when i try to enable my theme i get an internal server error... you can see my post where i go through the steps here viewtopic.php?f=202&t=187122#top

Newbie

Posts

Joined
Mon Oct 02, 2017 9:21 am

Post by justcurious » Tue Oct 03, 2017 3:19 pm

To turn on error reporting edit the file 'php.ini' and add the following lines (or uncomment them). Make sure also that error reporting is set to 'display' in your Opencart (Server) settings.
display_errors = 1
error_reporting = E_ALL


The problem is almost certainly the second line of the file admin/controller/extension/theme/MyTheme.php (see my previous post).

.

Google Product Feed - Get your products into Google Shopping. Includes a bulk update facility.
Backup Pro - Backup (on demand or scheduled), Restore and Clone your store.
Freestyle Box - Add multiple information boxes on multiple pages of your store. Includes optional "Code Mode".
View my other extensions


User avatar
Active Member

Posts

Joined
Sat Dec 24, 2011 4:36 pm
Location - UK

Post by straightlight » Tue Oct 03, 2017 8:17 pm

justcurious wrote:
Tue Oct 03, 2017 3:19 pm
To turn on error reporting edit the file 'php.ini' and add the following lines (or uncomment them). Make sure also that error reporting is set to 'display' in your Opencart (Server) settings.
display_errors = 1
error_reporting = E_ALL


The problem is almost certainly the second line of the file admin/controller/extension/theme/MyTheme.php (see my previous post).

.
Do NOT operate these commands if running on a production network. This is strongly suggested to use in a development environment network or with virtual tools.

As for replacing the controller name, take note that the URLs as well as some possible key names inside the custom extension theme file may also need to be changed since they may work in an associative way.
Last edited by straightlight on Wed Oct 04, 2017 2:37 am, edited 1 time in total.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by justcurious » Wed Oct 04, 2017 2:35 am

Straightlight is of course correct. You should not use those commands if it is a production environment.

I should also have made clear that I was replying directly to archaeopteryx who had indicated that he had created the controller file in question from a copy of an existing controller file and had already made the necessary changes to urls and relevant key names.

.

Google Product Feed - Get your products into Google Shopping. Includes a bulk update facility.
Backup Pro - Backup (on demand or scheduled), Restore and Clone your store.
Freestyle Box - Add multiple information boxes on multiple pages of your store. Includes optional "Code Mode".
View my other extensions


User avatar
Active Member

Posts

Joined
Sat Dec 24, 2011 4:36 pm
Location - UK

Post by somjai007 » Fri Oct 06, 2017 5:43 pm

Try visiting the extension / extension and selecting a theme from the drop-down menu.
Edit your theme and you'll be able to choose a new theme in the Themes drop-down menu.


สูตรบาคาร่า

Newbie

Posts

Joined
Sun Sep 10, 2017 3:06 pm
Who is online

Users browsing this forum: No registered users and 264 guests