Latest News: (loading..)
kymation

[Addon] Generic Box

269 posts in this topic

This addon produces a box in the left or right column. You can put text, images, or scripts in this box. It's ideal for adding credit card information, security logos, or important text to your osCommerce pages. The title and/or contents of the box can be linked to any other page for more information.

 

The one thing that you cannot do with this box is a list of links (like the Information box.) You can add a link list by copying the Information box and modifying it. There is a guide to doing that here.

 

The distribution is available here.

 

Regards

Jim

Edited by kymation
AAWISDOM likes this

Share this post


Link to post
Share on other sites

And I had an old version of the file in the package. Fixed now.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi,

 

when i changed the "sort order" to some other number beside 1000, i.e 1090 or any #, it display an error below

 

Fatal error: Cannot redeclare class language in /home/mc/public_html/example.com/includes/classes/language.php on line 16

 

Can you show me how to fix this error? Thanks

Share this post


Link to post
Share on other sites

That's very odd. I have my test box set to 1090 right now. No errors. Are you using the latest version? I put up an old design by mistake, then corrected it in the latest release. Check that the download is generic_box_1.0.2.tar.gz.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I downloaded the lastest version and it still shows that error, also the box does not appear on the main page either.

 

I don't know what's wrong.

Share this post


Link to post
Share on other sites

Hi Jim

 

I had the same problem

 

Fatal error: Cannot redeclare class language in C:\xampp\htdocs\ccb231\includes\classes\language.php on line 16

 

I uninstalled the box and then re-installed it and now its working fine.

 

I hope this helps you find the problem.

 

Regards

 

Ken

Share this post


Link to post
Share on other sites

Try this: In catalog/includes/modules/boxes/bm_generic.php, find these lines and comment out or delete them:

     unset($language_class);
     unset($languages);
     unset($language);

Let me know if that helps.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Try this: In catalog/includes/modules/boxes/bm_generic.php, find these lines and comment out or delete them:

     unset($language_class);
     unset($languages);
     unset($language);

Let me know if that helps.

 

Regards

Jim

 

same thing happens

Share this post


Link to post
Share on other sites

OK, another test. Find this code:

     $language_class = new language;
     $languages = $language_class->catalog_languages;

and replace it with:

     $bm_generic_language_class = new language;
     $languages = $bm_generic_language_class->catalog_languages;

Let me know if that changes anything.

 

Regards

Jim

Share this post


Link to post
Share on other sites

OK, another test. Find this code:

     $language_class = new language;
     $languages = $language_class->catalog_languages;

and replace it with:

     $bm_generic_language_class = new language;
     $languages = $bm_generic_language_class->catalog_languages;

Let me know if that changes anything.

 

Regards

Jim

 

same thing happens still

 

it always shows this error below

 

Fatal error: Cannot redeclare class language in /home/mc/public_html/example.com/includes/classes/language.php on line 16

Share this post


Link to post
Share on other sites

There's something really wrong here. We're not redeclaring a class, so the error message is highly suspect. Then it points to Line 16 of includes/classes/language.php which is a blank line. It appears that you have done something to that file. Try replacing it with a clean copy from the osCommerce distribution and see what happens.

 

Regards

Jim

Share this post


Link to post
Share on other sites

dear Jim

 

i have the same problem as well, i try to uninstall this module and then install it again, it looks work only one time, The same problem happen again after i refresh page

 

cheers

 

richard

Share this post


Link to post
Share on other sites

Then you've made the same error that the original poster made. Start by removing both files and reinstalling them from the distribution. Uninstall and reinstall the box. If you are still having problems, then copy and paste the error message here.

 

Regards

Jim

Edited by kymation

Share this post


Link to post
Share on other sites

Gentleman,

I am getting the same error message after installing the module. I am using OScommerce 2.3.1

Fatal error: Cannot redeclare class language in /home/bentonsc/public_html/includes/classes/language.php on line 16

 

Here is my install info:

osCommerce Online Merchant v2.3.1

PHP Version 4.4.8

Share this post


Link to post
Share on other sites

I'm going to have to ask you to read the post above yours.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Dear Jim

i try to upload the original files of oscommerce to replace the language.php, but the problem still happen

Fatal error: Cannot redeclare class language in /home/bentonsc/public_html/includes/classes/language.php on line 16

Share this post


Link to post
Share on other sites

There are two things that can cause this:

 

1. You put a file in the wrong place. This will happen here if you put the file that belongs in catalog/includes/modules/ in catalog/includes/languages/english/modules/.

 

2. You made a mistake editing a file and put something in twice. There are no edits in this Addon, so it would have to be something else that you added.

 

OK, there is actually one more:

 

3. PHP is throwing the wrong error and this has nothing to do with the language class or probably with any other class. This is extremely rare but it happens.

 

I'd bet on number 1 if I were inclined to gamble.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Did you have a question or are you just bitching?

Share this post


Link to post
Share on other sites

Hi Jim,

This add on worked great for me and my files are heavily modified. I am building a 2.3.1 store. Although the box is easy and works, what would I do to get a generic box 2 or 3 added?

Thanks

Share this post


Link to post
Share on other sites

You can copy this box and make some minor changes to the files.

1. Copy both files and rename them to bm_generic_2.php. Keep the copies in the same directories as the originals.

2. Using search-and-replace in your editor, set to Case Sensitive, change bm_generic to bm_generic_2 in both files.

3. Again using search-and-replace, change _GENERIC_ to _GENERIC_2_

4. Change Enable Generic Module to Enable Generic Module 2 on Line 98 of the code file..

 

Make similar changes for additional copies. Once you have all the changes made, upload and install the boxes.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Jim,

 

great contrib but only 1 small issue.

I have dutch language installed, double/triple/quadruple checked chcked teh files and all are installed properly.

Also in admin all green checks not a single red cross.

In English i get the box prefectly but in Dutch i get the language error and i cannot figure out why.

Running OCS 2.3.1 locally (still testing).

 

Any chance you can help me out with this one?

crossing out the language calling makes teh box disappear on both languages.

 

Thanks

Edgar

Share this post


Link to post
Share on other sites

First, check that your language is installed properly. Is the language name in your Admin >> Localization >> Languages exactly the same as the directory name the language files are in?

 

Regards

Jim

Share this post


Link to post
Share on other sites

Jim,

 

Name there is "Nederlands", folder of the languagefiles is "dutch" and the language Nederlands is referring to the folder "dutch".

 

In the generic boxes via admin control panel i have 2 boxes to fill, 1 for English and 1 for Nederlands.

 

If i rename the language Nederlands in admin localisation languages or directly in my database to "dutch" i only have the English generic box left.

In my shop in English i see the box, in Nederlands i keep getting the language error :

Warning: constant() [function.constant]: Couldn't find constant MODULE_BOXES_GENERIC_CONTENT_DUTCH in 
D:\wamp\www\dutch test\includes\modules\boxes\bm_generic.php on line 49

 

What is going wrong here?

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