Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Theme Switcher


kymation

Recommended Posts

Hi guys. I seem to be getting a error and dont know what to do. Can someone help me?

 

This is the error

 

Warning: include(/home/theboecm/public_html/includes/languages/english/modules/header_tags/ht_theme_switcher.php) [function.include]: failed to open stream: No such file or directory in /home/theboecm/public_html/admin/modules.php on line 129

 

Warning: include() [function.include]: Failed opening '/home/theboecm/public_html/includes/languages/english/modules/header_tags/ht_theme_switcher.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theboecm/public_html/admin/modules.php on line 129

 

Warning: include_once(includes/functions/modules/header_tags/theme_switcher.php) [function.include-once]: failed to open stream: No such file or directory in /home/theboecm/public_html/includes/modules/header_tags/ht_theme_switcher.php on line 34

 

Warning: include_once() [function.include]: Failed opening 'includes/functions/modules/header_tags/theme_switcher.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theboecm/public_html/includes/modules/header_tags/ht_theme_switcher.php on line 34

Link to comment
Share on other sites

The error message says that /includes/languages/english/modules/header_tags/ht_theme_switcher.php is missing. Is it?

 

Regards

Jim

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

Link to comment
Share on other sites

  • 2 weeks later...

You unpack that archive using your archive program (WinZip, 7zip, Winrar, etc.) and then follow the instructions in the User's Manual in that package.

 

Regards

Jim

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

Link to comment
Share on other sites

I've given up on the previous upload. I stripped out all of the Addons, including the full Theme package, to make it fit without approval. If you want the full version with all of the extras, download from the link in my previous post.

 

Regards

Jim

 

If we are upgrading from a previous version, do we need the extras? Or is the one you posted here enough to upgrade?

Link to comment
Share on other sites

The one posted here is enough for anyone to install and use. The Extras are just that. If you really want the whole thing, the link I posted above still works.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I installed theme switcher in my shop.

when i create a them everything works, but weh i go to the product info page the images are all big.

They are the same size as normal in the popup lightbox.

 

Can anybody help me to get the small images back with my new template?

 

Thank you

 

Twindaddy

Link to comment
Share on other sites

Hello,

 

I installed theme switcher in my shop.

when i create a them everything works, but when i go to the product info page the images are all big.

They are the same size as normal in the popup lightbox.

 

Can anybody help me to get the small images back with my new template?

 

Thank you

 

Twindaddy

Link to comment
Share on other sites

  • 4 weeks later...

I've uploaded a new version to the usual place. This one sorts the themes in alphabetical order. It makes it easier to find a theme if you have a lot of them. I also added some text to the manual about the ThemeRoller version numbers, and some more debugging information.

 

If you need to upgrade an older version of Theme Switcher, or just want to, upload the three new files over the top of your old ones. There's no need to uninstall the module first.

 

Regards

Jim

 

I think my confusion starts here... Initially, I wanted to install Theme Switcher, and have done that(tho' I'm not seeing it as something functional in the admin); and have subsequently upgraded jquery (as this is a fresh install of osc{2.3.1} from my server's Fantastico).

 

jQuery upgrade to 1.7.2 and UI to 1.8.20 - not sure if this is compatible or not.

 

I found that those 2 important files of jQuery were still needed by the admin of osc (Else they "cut off" some of the admin menu) and so had to leave both copies of those files - jquery-1.4.2.min.js & jquery-1.4.2.min.js - there... And now I still don't have the new jQuery working (*excuse the mentioning of this problem here tho' it is related).

 

Bun NOW this thread starts to talk about Theme Roller! I realize this is a function in jQuery but am confused as to why we are suddenly talking about that. Is it that this Theme Roller is now the module that we will use to switch the themes?? What of Theme Switcher?? Is this still required? Do they work in unison to get the job done?

 

Thank you for any clarification on this. :)

~Doug

Link to comment
Share on other sites

Theme switcher allows you to switch themes by changing a setting in your osC admin. Themeroller allows you to get themes to use in your store. It's useless to be able to switch themes if you only have one installed, so Themeroller is essential to the use of Theme Switcher.

 

For your problem of not seeing the Theme Switcher module to install -- check that you have all of the files in the correct locations, and check that the files are approximately the same size as the ones in the distribution package.

 

jQuery 1.7.2 and jQuery UI 1.8.20 are compatible. I use those versions myself. You will need compatible (current version) themes to make them work properly. The Redmond theme that ships with osC will not work properly.

 

Regards

Jim

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

Link to comment
Share on other sites

The Admin also depends on jQuery and the jQuery UI. Don't delete the old versions of those files or you'll mess up the Admin. As an alternative, there is an Admin Theme Switcher that allows you to change the theme on the Admin side and use the updated jQuery files.

 

Regards

Jim

 

I just spent a couple hours trying to figure this one out. When I installed Theme Switcher, I removed the original jquery js and css files because I didn't think they were needed any more. This totally messed-up the admin panel. Once I put them back, the admin panel returned to normal. Maybe a note in the docs saying don't delete the originals might prevent another dope like me from making that mistake?

 

Anyway, I just wanted to say that this is a REALLY nice add-on! Except for the goof with the admin panel, the install went flawlessly, the docs were understandable, and the features work perfectly!

 

Thanks SO much for your work, and for helping all of us folks out here get Theme Switcher working!

 

Regards,

 

Chris

Edited by Chrison
Link to comment
Share on other sites

I try to cover everything, but people keep finding new ways of breaking things. The most important advice I can give is to follow the instructions exactly. Don't do anything that isn't explicitly stated. Of course that only works if the instructions are correct to start with.

 

Regards

Jim

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

Link to comment
Share on other sites

Thank you for your code, you excellent documentation and the help you offer here.

After installing Theme Switcher I have lost the localization of the datepicker. I have copied catalog/includes/languages/english/modules/header_tags/ht_theme_switcher.php to catalog/includes/languages/swedish/modules/header_tags/ht_theme_switcher.php (by the way, it would be a good idea to warn in the documentation that this step is needed when using more languages), and I have checked that I have the line

define('JQUERY_DATEPICKER_I18N_CODE', 'sv');

in both catalog/includes/languages/swedish.php and catalog/admin/includes/languages/swedish.php,

and that i have the filecatalog/ext/jquery/ui/i18n/jquery.ui.datepicker-sv.js with the right settings, but the default English datepicker appears on Swedish pages.

Edited by figuera
Link to comment
Share on other sites

The datepicker localization code (in template_top.php) is:

 

<?php
 if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>
<?php
 }
?>

 

Move that code after this line:

 

<?php echo $oscTemplate->getBlocks('header_tags'); ?>

 

Please let me know if that works.

 

Regards

Jim

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

Link to comment
Share on other sites

The ThemeRoller Dev Tool bookmarklet seems to be working nicely for seeing changes directly on the store pages but not for downloading. If I click on a download button under a theme name within the gallery tab, the ThemeRoller control panel just goes black and I have to reload the page to get it to work again. If I click on the Download theme button after editing a theme, it does download but without giving the opportunity of checking/choosing the components or version, and the resulting theme folder under development-bundle/themes only contains five .css files (plus the images folder), and does not work properly if I try to use it.

Regards,

Link to comment
Share on other sites

This is a continuing problem. It seems that nearly every update breaks something. I'll take a look at it as soon as I get a chance.

 

For now, you can download the missing files from the jQuery UI site. Open the jquery-ui-1.8.20.css file (or whatever version yours has) that the Dev Tool downloaded and find the line that starts with

* To view and modify this theme, visit http://jqueryui.com/themeroller/....

Use that URL to get the Themeroller page with your theme on it. You can then download the full version.

 

Regards

Jim

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

Link to comment
Share on other sites

Using external hosting will increase your site's load time due to the additional DNS lookup(s). I don't recommend it.

 

Regards

Jim

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

Link to comment
Share on other sites

on the contrary, it will decrease the load time since it's able to load the file from a domain other than the site's domain (the concurent connection limit per domain issue) ... ie, if www.example.com is your main site, and cdn.example.com is your cdn. the browser will have one less file to try and get from www.example.com

 

specifically on the case of jquery's js hosted by a popular CDNs like googleapis, it's more than likely already in your browser's cache, since many many many sites use it that way in their headers.

Link to comment
Share on other sites

If your DNS is using my ISP's crappy servers, you can add a couple of seconds for the lookup. That wipes out the tiny fraction of a second you save with concurrency. Then you get the Google bandwidth crunch. The reason I see this forum hang is usually "waiting for googleapis.com". I'll give you the benefit if the files are already in cache.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi

 

I have installed a fresh copy of OSC v.2.3.1

I have added the files as stated but as I edit the Module and click save i get the error:

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/gyjfvido/public_html/admin/modules.php on line 35

 

Warning: Variable passed to each() is not an array or object in /home/gyjfvido/public_html/admin/modules.php on line 36

 

Warning: Cannot modify header information - headers already sent by (output started at /home/gyjfvido/public_html/admin/modules.php:35) in /home/gyjfvido/public_html/admin/includes/functions/general.php on line 34

 

I have been batteling with this all morning please can you guys help!? :'(

Link to comment
Share on other sites

@@BarterBin

if that doesn't work, it's likely other modules' settings don't work either.

the configuration dialogue is generated by modules.php, which is part of oscommerce itself...

 

What does chrome say you sent to it in the network tab?

e.g. it should be something like:

 

Form Data:	
configuration[MODULE_HEADER_TAGS_THEME_SWITCHER_STATUS]:	True
configuration[MODULE_HEADER_TAGS_THEME_SWITCHER_SORT_ORDER]:	1
configuration[MODULE_HEADER_TAGS_THEME_SWITCHER_JQUERY_UI_VERSION]:	1.8.20
......

 

(Chrome, Developer Tools > 'Network' tab, post the config form and afterwords click on the top file (modules.php) andsee the headers you sent to it. )

Edited by mpalasis
Link to comment
Share on other sites

The most likely cause is a corrupted file. It could be catalog/includes/modules/header_tags/theme_switcher.php, so try reloading that.

 

Regards

Jim

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

Link to comment
Share on other sites

Okay, I have scoured this forum and others for hours now trying to find answers...

 

I am using a clean install of osCommerce 2.3.1, and trying to install Theme Switcher 1.3.1.

 

I did everything the manual said, including extra bits from the forum, like creating the directory admin/includes/functions/modules/header_tags for the theme_switcher.php file. The theme redmond stays visible until I modify the includes/template_top.php file. At no point does the Install Module button in the backend section show any module to be installed. I've tried everything I can find, including an update of jQuery. Nothing is working. Please help?

 

P.S. All the links work in the View Source file.

Edited by definitivefreak
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...