Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Generic Box


kymation

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
Link to comment
Share on other sites

  • 2 weeks later...
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:

Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
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.

Link to comment
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 :)

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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.

Link to comment
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...

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

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