Jump to content
kymation

[Addon} Theme Switcher

Recommended Posts

Hello alltogether,

I'm running the original osc 2.3.4.1. If I want to install the theme switcher module in the admin area the following error message appears:

"break' not in the 'loop' or 'switch' context in /catalog/includes/modules/header_tags/ht_theme_switcher.php on line 415"

Any ideas how to solve the problem?

Thanks

Frank

Share this post


Link to post
Share on other sites

That's a new one. You can fix it by deleting Line 415 from that file. Please post again if this does not work for you.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Everyone,

I currently have the new 2.3.4.1 CE version and I have successfully installed the current theme switcher and had no problems thanks to all the hard work by everyone involved.

Today I made a new theme using the theme roller website and would like to add to my existing theme switcher.  I unzipped the file and was going to use the ftp program to install it but noticed that the file content is much different that the theme folders that came with the theme switcher.

I go to Bootstrap > catalog > ext > bootstrap - then click on a theme folder and inside there is the     bootstrap.min.css

But when I downloaded the new folder and read the manual on how to install a theme I get a bit confused.

I get a folder with a jquery-ui-1.21.custom folder. Open that and there are several .css and a index.html . There is a image folder and the external folder which then has a jquery folder and once that is opened the only file there is the jquery.js

There is no bootstrap.min.css anywhere.

Do I just install as it is and create folders where needed ? Or did I do something wrong when I downloaded the new theme.

Any help or advise would be greatly appreciated.

Share this post


Link to post
Share on other sites

I don't know what you have, but the only thing you need is a theme CSS file. OsCommerce already has all of the jQuery and Bootstrap JavaScript files.

You can try creating a new folder and putting one of your CSS files in it. Just rename that file to bootstrap.min.css so that Theme Switcher can find it. Try each CSS file in turn if the first one doesn't work. If none of them work, you don't have a usable theme.

If you're actually using the ThemeRoller site, that only works with the old jQueryUI version of osCommerce, not the Bootstrap version.

Regards

Jim

Edited by kymation
Spelling

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim,

Thank you for coming to my rescue so quickly.  Darn it. Yes I did.

I just looked and there are 2 theme.css    jquery-ui.theme.css  and jquery-ui.theme.min.css

Based on your message it sounds that my theme will not be compatible with the new version.

I do like one of the existing themes but there are some colors that I need to change and when I used my last version it was recommended using the theme switcher. Having red, blues, greens and oranges popping up everywhere isn't what I was looking for. Just something simple theme.

Is there a way that I can make changes to the box colors i the new version ?

Thanks again Jim.

Share this post


Link to post
Share on other sites

There are several Bootstrap theme generators available online. They seem to have similar functionality to the ThemeRoller site. I haven't tried them so I can't say what is best. I would be a bad judge anyway as I'm colorblind.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

How to install this addon? I read through the manual and doing a clean install. Copy past the files but add on doesnt appear under modules.

Am I missing something?

 

Installing it on localhost.

xampp\httdoc\os 

extract files from the add on under above location and overwrite any if prompted. still nothing!

 

Share this post


Link to post
Share on other sites

Check whether the files are in the correct location. The manual gives you the expected location for all of the files.

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Will this still work with the new Phoenix version?


Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites

@Peper

Quickest way to find this out for any add on is to try it on a test installation of Phoenix. This way you can install the add on without affecting your live shop and get your answer. Many add ons are still untested for later version of Phoenix. So the more people testing existing add ons and reporting back on compatability, the better!

Peter

 

Edited by peterpil19

CE PHOENIX SUPPORTER

Support the Project, go PRO and get access to certified add ons

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Share this post


Link to post
Share on other sites
9 hours ago, JcMagpie said:

Try this lest you make color changes in admin.

I tried the color tweak, works great.
Takes me a while to figure out what color goes where

Was using the theme switcher for promotional days even for black Fridays to switch the theme easily. <_<

 This part seems is issue for phoenix

<?php if ( !defined ( MODULE_HEADER_TAGS_THEME_SWITCHER_STATUS ) ||
MODULE_HEADER_TAGS_THEME_SWITCHER_STATUS != 'True' ); { ?>
<link href="ext/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<?php } ?>

 


Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites
24 minutes ago, Peper said:

This part seems is issue for phoenix

Have not used the switcher for some time but it should still work.

 

24 minutes ago, Peper said:

<link href="ext/bootstrap/css/bootstrap.min.css" rel="stylesheet">

Yes but Phoenix pulls Boostrap from CDN now but if you download and install localy and change link to your install path will work fine.

see file

public_html/includes/hooks/shop/siteWide/bootStrap.php

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites
15 hours ago, JcMagpie said:

Have not used the switcher for some time but it should still work.

 

Yes but Phoenix pulls Boostrap from CDN now but if you download and install localy and change link to your install path will work fine.

see file

public_html/includes/hooks/shop/siteWide/bootStrap.php

@JcMagpie

Thanks, gave it a try already. For now will have to use an alternative.


Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites

Ok sorry I've not looked at it in a long time so I probably got it wrong. Never mind here is a quick dirty solution that will do the same.

You can get more free themes from a number of sites just add the new .min.css  file to the themes folder with the others. Just copy the files over to your site, back up any original ones bit shoud be no need. Then simply select the theme you wish to use from the file public_html/includes/hooks/shop/siteWide/bootStrap.php by commeting out the current one and uncommeting out the one you need to switch to.

it's as simple as that. Could be easly made in to a admin side select if required but I'll let the pros do that.

here is my test 1.0.2.5 site changed in a few seconds. As you can see it is using Darkly theme. Enjoy.

 $this->sitestart .= '<!-- bs hooked -->' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/Cerulean-bootstrap.min.css">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/Journal-bootstrap.min.css">' . PHP_EOL;
    $this->sitestart .= '<link rel="stylesheet" href="ext/themes/Darkly-bootstrap.min.css">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/Cosmo-bootstrap.min.css">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/Cyborg-bootstrap.min.css">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/Litera-bootstrap.min.css">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/United-bootstrap.min.css">' . PHP_EOL;
    //$this->sitestart .= '<link rel="stylesheet" href="ext/themes/Yeti-bootstrap.min.css">' . PHP_EOL;

 

image.thumb.png.07ebf9324b0ee6e38155ee74922c9fd7.png

 

Phoenix Boostrap 4 themes.zip

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

@kymation

Hi Jim,

Thank you for this great addon. I had install it on CE 1.4.0, it is working, but I notice, if i enable it, then the Navi bar modules set to RIGHT/LEFT/HOME will not work. If remove or enable false, then the position work again. Is there a way to fix it?

Many thanks!  Lyn

Share this post


Link to post
Share on other sites

Hello!

I am trying to install this on a clean, fresh install of 2.3.4.1. I have not done anything to the install other than the initial database setup and a few of the recommended security measures (htaccess login).

I have installed the 3 files included in the correct directories.

My issue is when I go to Modules > Header Tags > Install Module.  When I click on the button on the right side for Install Module the next screen that loads only loads a single column and stops after listing 3 of the 5 modules that should be available (I only see Google Analytics, MailChimp E-Commerce 360, OpenSearch). This page does not give me the right side bar that has the option to actually "Install Module". All of the other module pages seem to work fine, it is only the Header Tag module page that is broken.  I am not getting any errors, nor does the header tag install module page look 'broken', but just incomplete. 

 

Thank you for any help!

 

Share this post


Link to post
Share on other sites
12 hours ago, retromog said:

I am trying to install this on a clean, fresh install of 2.3.4.1

Hi why using 2.3.4.1 and not the OSCOM CE Phoenix 1.0.7.10?

 

12 hours ago, retromog said:

I am not getting any errors, nor does the header tag install module page look 'broken', but just incomplete. 

You should at least one Fatal error, install local 2.3.4.1 with your mentioned addon and i got 1 fatal error
Fatal error: 'break' not in the 'loop' or 'switch' context in E:\xampp\htdocs\2341\includes\modules\header_tags\ht_theme_switcher.php on line 415

comment out or remove line 415 and all is good.

But wouldn't spend time on it and go for the Phoenix version like I said at the beginning.

Share this post


Link to post
Share on other sites
8 hours ago, Fiber said:

Hi why using 2.3.4.1 and not the OSCOM CE Phoenix 1.0.7.10?

 

You should at least one Fatal error, install local 2.3.4.1 with your mentioned addon and i got 1 fatal error
Fatal error: 'break' not in the 'loop' or 'switch' context in E:\xampp\htdocs\2341\includes\modules\header_tags\ht_theme_switcher.php on line 415

comment out or remove line 415 and all is good.

But wouldn't spend time on it and go for the Phoenix version like I said at the beginning.

 

Thank you so much! That was exactly what my issue was.

I did not go with Phoenix because I couldn't really find info on why or what the difference are. In my experience getting the newest thing is not always the best. This site is going to be super basic to start off. Right now it will be used as just a landing page, and may not expand much more than that. We don't even need the store functionality right now but if things go well that may change in the future. 

Thanks again!

Share this post


Link to post
Share on other sites
13 hours ago, retromog said:

I did not go with Phoenix because I couldn't really find info on why or what the difference are.
Thanks again!

Easy one. Anything before Phoenix is no longer being updated and could be insecure. Phoenix can be used on all sized devices as its based on bootstrap and is fully responsive, meaning that google and other search engines will not penalise you. Phoenix can run on the latest php environments. Once hosts stop using php3.something oscommerce will stop working or need lots of time spent getting the errors removed, and there will be hundreds if not thousands on a fully working store. Phoenix is still being worked on and is in a state of constant updating, which may go against it, but it is secure, and developers are only developing for this version.

If you want just a landing page why use oscommerce at all. Just create an html page to suit.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×