Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Generic Box


kymation

Recommended Posts

You can't add PHP code to the generic box. It's not designed to do that. You need to create a new box to hold that external image.

 

Regards

Jim

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

Link to comment
Share on other sites

error: Warning: constant() [function.constant]: Couldn't find constant MODULE_BOXES_GENERIC_CONTENT_ESPANOL in .........

 

Problem this contribution in Spanish Language (I think same problem in other language that directory is different to language name).

Example: Spanish is: Español (language name) and espanol (language directory). To work it well I need change my language description in Admin from español to espanol (change Spanish caracter "ñ").

I don´t know make changes to the php code, but I find this problem on many contributions.

And my last Question: Is possible change in the PHP code from language_name to language_directory?, sove it this problems?.

Thanks.

Link to comment
Share on other sites

Thanks for the code. I just need to find the time to build a new version. You can upload it yourself if you want, but please make it a full upload.

 

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

  1. Hi, it has potential to be able to place any info/script on a custom box. I followed the steps, clicked on install and it looked like it did, but the box doesn't display under admin/boxes, anyone experiencing this issue? Thanks in advance!

 

I fixed it, I had placed the file somewhere else which helped me to install another module I had the same issue with. Now I am struggling with adding the following:

<a onclick="OpenBrWindow('msnlive.html','msnlive','scrollbars=0','400','400','true')" href="javascript:;">

 

I am looking to link my msn to provide live support, but I do get an error obviously because I am assuming it takes a little more than just adding that code, maybe modifying the module files?

Link to comment
Share on other sites

Escape the single quotes, like this:

 

<a onclick="OpenBrWindow(\'msnlive.html\',\'msnlive\',\'scrollbars=0\',\'400\',\'400\',\'true\')" href="javascript:;">

Regards

Jim

 

Thanks Jim, it sure got rid of the error message, and it properly displays the info but won't open the new window but rather tries to open on the same window. When I use this javascript I have to call it on the head of the html document, otherwise it will not work, so I believe this applies here as well. Should it be call on the php document? For example, this is the javascript code I use:

<script language="JavaScript1.2">

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0

if(window.screen)if(isCenter)if(isCenter=="true"){

var myLeft = (screen.width-myWidth)/2;

var myTop = (screen.height-myHeight)/2;

features+=(features!='')?',':'';

features+=',left='+myLeft+',top='+myTop;

}

window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);

}

 

</script>

 

But that have to be placed on the head of the html document, where to declare? Thanks in advance and happy holidays from Costa Rica :D

Link to comment
Share on other sites

Then you would have to add that code to the head in catalog/includes/template-top.php.

 

Regards

Jim

 

Thanks Jim, there is probably a little more tweaking involved, what would be the easiest way to add a custom pop up window inside the generic box? Thanks!

Link to comment
Share on other sites

There are any number of Javascript popup scripts available. I usually use the one from osCommerce 2.2RC2a ( the product_info.php page) but there are plenty more.

 

Regrds

Jim

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

Link to comment
Share on other sites

  • 2 months later...

Hi, got the same problem like easq, however with the german language. The english page runs verry well, but the german page shows that error:

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_BOXES_GENERIC_CONTENT_GERMAN in /home/www/web49/html/onlineshop/catalog/includes/modules/boxes/bm_generic.php on line 38

 

As you wrote, I can fix that error by removing the line with the key value of...

 

Where can I find those line ( in wich file?) and where can I find the configuration database table ( wich file?)

Greetings,

ms.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Jim,

 

On my dual language site (dutch and english) the generic box is showing Up in the English language but not in the Dutch language. I did some testing and found out why:

 

In Language.php the name for nl is Dutch.

In the admin however (during your install) the name is: Nederlands. Therefore the keys are named _NEDERLANDS instead of _DUTCH.

 

Maybe it is better to use the language.php from the client side instead of the admin or create an own one since most foreign language are named differently

 

Hopes this helps

 

cheers HAns

Link to comment
Share on other sites

I've uploaded a new version that fixes the bug with certain languages. If you have languages other than English installed, replace the module file with the one form this release. You will need to uninstall the module before you replace the file. You can download the package from the Addons area.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 1 month later...

Hi,

This is my first go of using 2.31 and got very used to using 2.2 for some years now, but after many atempts to fix my original version (badly corupt) I disisded to do a fresh install of 2.31 as it was time for a new look anyway.

All is going really well with the new installation (do miss many of the addons as I had many on my old store) but am getting there with what we have, just a bit of a new learning curve.

Anyway my question is: I making several copies of the generic box module and was wondering what exatly this meant

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

as I'm not sure which code file is being referred to in the above quote. I will be fine once I find the file that needs the change made to it.

 

Kind Regards and Thank you in advance.

Richard

P.S. the new site is at www.richies-rc.com.au still quite a bit to do but the bulk of coding is now finished(shipping, payments, other addons etc.

P.P.S. Could anyone point me in the right direction to add my old customers and there passwords to the new database. (from past experience existing customers don't really like having to re-signup).

"Measure Twice Cut Once"

Link to comment
Share on other sites

  1. Hi, it has potential to be able to place any info/script on a custom box. I followed the steps, clicked on install and it looked like it did, but the box doesn't display under admin/boxes, anyone experiencing this issue? Thanks in advance!

 

Hi I am experiencing this issue...I have uploaded generic box module, log in box module and Extra Info pages modules and it appears they are all waiting to be installed in the admin panel but I cannot. I click Install modules+ and it does not give me the edit/ remove module box as it did before when I click on the module name Please Please Ive posted several places on the different "add a box" forums.

 

I am not sure how to add an image but:

Link to comment
Share on other sites

One of your new boxes has a code error that is breaking the install, or you have uploaded one of the files to the wrong location. Remove all three of those Addons and then reinstall them one at a time. Install each box and check that it is working before installing the next one. If you see the same problem again, the last one that you installed has the error.

 

Regards

Jim

Edited by kymation

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

Link to comment
Share on other sites

  • 1 month later...

Hey Jim

First thank you for this. Very useful.

I’m having a problem with trying to display a image in the box. In the contents box I seem to be getting a slash added before each " and the image doesn’t show.

So if I input this

 

<img src="/images/myimage.png">

and submit, the system changes it to

<img src=\"/images/myimage.png\">

Same with if I input the exact url for the image.

Is there something I’m doing wrong or may have screwed up?

Thanks

Mark

Link to comment
Share on other sites

  • 3 months later...

I love your contribution! You make it so easy for those of us with no php skills. I am wondering, I'm using the generic box for my Live Chat link to Volusion's Free Live Chat. However, most of the time the online/offline image doesn't show up. It just says ecommerce with a link to Volusion, but when you hit the back button, the image shows up. Any suggestions?

Link to comment
Share on other sites

Is the image hosted on your site or on a Volusion server? If it's on their server, the image may not load or load slow if their server is overloaded.

 

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

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