Jump to content
kymation

[Addon] Generic Box

Recommended Posts

OK I've downloaded generic_box_1.0.tar.gz so I just upload it to catalog/includes/modules

 

rather than catalog/includes/languages/english/modules/ or catalog/includes/modules/boxes

Edited by Acknowledeged74

Share this post


Link to post
Share on other sites

Did you try reading the instructions?

 

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
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

 

 

EXACTLY what I was looking to do! Thanks for ALL of your effort and time. My box works and worked the first time without hitch. I love it, Thanks again! :thumbsup:

Share this post


Link to post
Share on other sites

Hmmmm. Well, Actually I have found an issue. After using the box for awhile, I find I need to make some extremely minor changes to the contents. Unfortunately, the "English Contents: Enter the contents that you want in your box in English" section has no editable box under it anymore! :/ It was there when I first installed and configured, but I can't alter it because it's gone.

 

http://shopforstickers.com/Generic_box_1_0_2_ERR.png

 

Any clues?

 

EDIT: I just noticed this after clicking the edit box for the generic module. It's at the top...

 

"Parse error: syntax error, unexpected T_STRING in /home/content/99/7848599/html/catalog/adminx/modules.php(232) : eval()'d code on line 1"

 

http://shopforstickers.com/generic_BOX_PARSE_ERROR.png

 

 

I'm sorry to hassle, but, I don't know much about PHP.

Edited by tdejesus

Share this post


Link to post
Share on other sites

Heh. One last post, I promise! I noticed you had somebody with this issue trying to add the word C'est. I don't think I have any quotes or single quotes in my code, so I am still lost.

 

Just a note to add to my last post. Thanks again.

Edited by tdejesus

Share this post


Link to post
Share on other sites

Ok. I narrowed my problem down to the single quotes, located the database entry, and carefully modified it to remove only the suspect quotes. Clicked, "GO", refreshed admin, Success! I am now able to modify my code.

 

I don't know much about PHP and MySQL, (learning), but I do know how dangerous and intimidating the database can be. In the end, I logged into my database manager, and did a search of a portion of the code I could remember. Ultimatley, it narrowed to exactly 1 match where my problem rested.

 

Thanks for reading my other posts and I'm sorry if I wasted any of your time.

Share this post


Link to post
Share on other sites

Hi Jim,

 

Great title idea!

The language class was redeclared. It works without language class errors.

bm_banner.php

 

Regards,

Gergely

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

so guys i read the all forum till now i don't find nothing similar

i install the last version of generic box "generic_box_1.0.2.tar"

after copying the new files in the right location

i go in admin i install the module and i delete / blank the language name i have 2 languages for my site US and RO

i click save and i reload my site

Now the box appears without name like i set with Generic content text inside nothing strange still now .

now i go back to the admin section to fill my generic box ...i just put names for box title for RO and US i use the same mane "Contact" i hit save i reload my page ....but my page didn't load it's load just main bg and logo site.

i delete the name i leave blank same thing

till i remove the box ..i install it again and i don't make any change the same thing page didn't load it's load just main bg and logo site.

so i can't use this magnificent box pls help me.

Share this post


Link to post
Share on other sites

The code has a problem with some special characters used in non-latin character sets. Try putting both box names in English and see what happens. If that works, try escaping all apostrophes with a backslash (\') in your other languages.

 

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

The code has a problem with some special characters used in non-latin character sets. Try putting both box names in English and see what happens. If that works, try escaping all apostrophes with a backslash (\') in your other languages.

 

Regards

Jim

 

 

Jim ....i explain in my post above i try to use with blank ....if i wanna use something in my language i copy the text from english section ....and the same thing happens.

 

but this is good in 1 way i learn how to make a new box and a new page now i can put there same thing like generic but i must edit both en / ro boxes :)

Share this post


Link to post
Share on other sites

Thanks Jim for this very easy and helpful addon!

 

I have one question though:

I would like to have the banner redirect to a link outside my ecommerce-site. When I add the link in the admin side (=content link), it always adds / in the beginning of the link I added (=meaning that the link would be in my e-commerce) --> the link is broken. Could you or somebody else please tell me how to get rid of that / ?

Thank you so much!

 

BR,

yadetar

Share this post


Link to post
Share on other sites

Ok folks, sorry about my previous question. I have solved the problem.

 

In case somebody else needs help in this:

Add the code by defining the link you want into the "your language contents". As simple as that!

 

Great addon!

 

BR,

yadetar

Share this post


Link to post
Share on other sites

I've uploaded a new version to the Addons page. This should fix the language error that some people were seeing (Thanks to Gergely for the code.) Maybe someday I'll fix osCommerce's problem with the apostrophes.

 

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

One more update -- fixed the apostrophe bug. This fix requires replacing or editing one of the stock osCommerce files. It's not quite as easy as the original version, but it does prevent those annoying errors that some people are having.

 

Download is at the same place.

 

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 all

 

I seem to have a problem with the scrolling box. When I activate the box without scroll, the pictures show up fine and change with each refresh etc. However, when I set scroll to true, the box is just empty... what am I doing wrong?? I have installed all updates on the forum...

Share this post


Link to post
Share on other sites

There is no scroll function in this box. If you have added one, the problem is in the code you added.

 

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

I am new to osCommerce and this is the first add-on I am trying to install. I know there are supposed to be install instructions, but could someone please tell me where I can find them? I have downloaded the file and unzipped it but don't know how to proceed from here.

 

Thanks for your help.

Share this post


Link to post
Share on other sites
There is no scroll function in this box. If you have added one, the problem is in the code you added. Regards JIm

 

Ok, let me re-phrase, what I meant by scroll was the rotator function. When I turn it to true no image appears in the box, when it is false then the images appear and change with every refresh.

Share this post


Link to post
Share on other sites

function.reset

Warning: reset() []: Passed variable is not an array or object in /homepages/19/d386568345/htdocs/catalog/backend/modules.php on line 228

 

Warning: Variable passed to each() is not an array or object in /homepages/19/d386568345/htdocs/catalog/backend/modules.php on line 229

 

is the error i get when installing generic box

Share this post


Link to post
Share on other sites

How can I add this to a generic box ?

 

<?php
   $info_box_contents = array();
   $info_box_contents[] = array('text' => BOX_HEADING_QRCODE);
   new infoBoxHeading($info_box_contents, false, false);
   $info_box_contents = array();
   $info_box_contents[] = array('align' => 'center',
						   'text' => '<img src="https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '" width="100" height="100"><br>');
   new infoBox($info_box_contents);
?>

Edited by ShaGGy

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

×