Jump to content



Latest News: (loading..)

- - - - -

[Addon] Generic Box


  • Please log in to reply
203 replies to this topic

#21   jellybean55

jellybean55
  • Members
  • 17 posts
  • Real Name:jen

Posted 16 February 2011 - 04:18 PM

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

#22   kymation

kymation

    Believers

  • Community Sponsor
  • 6,696 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 16 February 2011 - 05:39 PM

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

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#23   easyq

easyq
  • Members
  • 28 posts
  • Real Name:Edgar Smit
  • Gender:Male
  • Location:The Hague, The Netherlands

Posted 18 February 2011 - 09:45 AM

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
Everything is conditional, you just can't always anticipate the conditions.

#24   kymation

kymation

    Believers

  • Community Sponsor
  • 6,696 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 February 2011 - 05:44 PM

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

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#25   easyq

easyq
  • Members
  • 28 posts
  • Real Name:Edgar Smit
  • Gender:Male
  • Location:The Hague, The Netherlands

Posted 18 February 2011 - 09:04 PM

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?
Everything is conditional, you just can't always anticipate the conditions.

#26   kymation

kymation

    Believers

  • Community Sponsor
  • 6,696 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 February 2011 - 09:24 PM

If you change the language in any way, or add or remove a language, you must uninstall the box first, then reinstall after the changes are made. This is due to the way osCommerce is built.

You can get rid of the error by removing the line with the key value of MODULE_BOXES_GENERIC_CONTENT_DUTCH from your configuration database table, then uninstall and reinstall the module.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#27   easyq

easyq
  • Members
  • 28 posts
  • Real Name:Edgar Smit
  • Gender:Male
  • Location:The Hague, The Netherlands

Posted 19 February 2011 - 08:56 PM

OK Jim,

thanks, i will give it a go later, i have some higher priorities at this moment concerning my store :rolleyes: .

Edgar
Everything is conditional, you just can't always anticipate the conditions.

#28   jellybean55

jellybean55
  • Members
  • 17 posts
  • Real Name:jen

Posted 24 February 2011 - 11:54 PM

Thank you.  This works nicely.

#29   srphotos

srphotos
  • Members
  • 33 posts
  • Real Name:Simon Russell

Posted 25 February 2011 - 11:49 AM

Hi Jim,

works a treat, thanks.

Edited by srphotos, 25 February 2011 - 11:54 AM.


#30   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 28 February 2011 - 02:47 PM

Hi Jim

If I wanted to add a twitter feed in the column left would I need a box & if so would your add-on work for this?

I don't really want a box header or any box borders around the twitter feed as it is in it's own box already.

Thanks
Julie

#31   kymation

kymation

    Believers

  • Community Sponsor
  • 6,696 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 28 February 2011 - 05:12 PM

This will work just fine for Twitter. You can leave the header out by leaving the Header box blank in the Admin for the box. You cannot remove the box border since that's part of the box styling. Unless you remove the border from all boxes, that is. I suggest that you leave the border off the Twitter code instead.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#32   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 28 February 2011 - 10:27 PM

View Postkymation, on 28 February 2011 - 05:12 PM, said:

This will work just fine for Twitter. You can leave the header out by leaving the Header box blank in the Admin for the box. You cannot remove the box border since that's part of the box styling. Unless you remove the border from all boxes, that is. I suggest that you leave the border off the Twitter code instead.

Regards
Jim
Thanks Jim

I'll try that tomorrow. I will either make the box border the same colour as the background so you can't see it or look at the twitter feed code. That & not having a box header & you'll never know it was in a box!  ;)

#33   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 01 March 2011 - 08:15 PM

Hi Jim

How do I unzip it? I cannot find a programme that will do this extention? It's a .tar.gz & not a .zip?  :huh: Noticing more & more like this. Is .zip going out of fashion? Ant free programmes available?

Thanks

Not to worry...found 7zip :)

Edited by warrenerjm, 01 March 2011 - 08:30 PM.


#34   kymation

kymation

    Believers

  • Community Sponsor
  • 6,696 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 01 March 2011 - 08:36 PM

Most programs that will unpack a ZIP file will also unpack a GZIP. Try yours; it will probably work. If it doesn't, there are plenty of free programs that will. Just search for one for your operating system.

Part of the reason for using GZIP is that it results in a smaller archive. This saves on storage space and bandwidth. The rest of the reason is that the tools are supplied with our Linux distros and we're too lazy to hunt down something else. :-" :)  

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#35   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 01 March 2011 - 08:56 PM

View Postkymation, on 01 March 2011 - 08:36 PM, said:

Most programs that will unpack a ZIP file will also unpack a GZIP. Try yours; it will probably work. If it doesn't, there are plenty of free programs that will. Just search for one for your operating system.

Part of the reason for using GZIP is that it results in a smaller archive. This saves on storage space and bandwidth. The rest of the reason is that the tools are supplied with our Linux distros and we're too lazy to hunt down something else. :-" :)  

Regards
Jim
:lol: Good enough reason! None of mine did & realised I had already downloaded 7 zip but it doesn't automatically load when you try to open this type of file. Now I have it on my desktop & I have to click on it to then view through the manager folder.

I cannot complain as I apreciate the effort you have put in to help me/us modify our own stores. ;)

Just uploaded so now to install & add twitter html.

#36   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 01 March 2011 - 09:04 PM

Hi Jim

Ok all is well...but

I added the code for the twitter feed & then realised that it was too big for the column, so I went back into edit. The trouble is there is only this at the bottom

English Contents
Enter the contents that you want in your box in English

There isn't a white box with the code in?

How do I edit the code again?

Thanks
JUlie

#37   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 01 March 2011 - 09:11 PM

Just seen this error message at the top of the boxes list


[cquote]Parse error: syntax error, unexpected T_STRING in /home/mystore/public_html/catalog/xxxxx/modules.php(232) : eval()'d code on line 5[/quote]

Is this from my code that I have put in?

I didn't have any links (deleted index.php etc) or a box header.
I cannot see any box borders either, but if it is white I wouldn't. I just see the twitter feed box in the left column.

It is 250 wide & I have a grid_6 which I think is 240, so it is slightly into the middle, but it isn't pushing anything out of line?

What would be the biggest you would suggest the width should be inside the generic box?

Thanks

#38   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 01 March 2011 - 09:16 PM

Me again! I think it is my code but how can I add this as it has '
Should I change them all to " ?
It does say that you can copy & paste html code snippets directly in. It is showing on the catalog side by the way.

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
  version: 2,
  type: 'profile',
  rpp: 4,
  interval: 6000,
  width: 250,
  height: 300,
  theme: {
	shell: {
	  background: '#333333',
	  color: '#ffffff'
	},
	tweets: {
	  background: '#000000',
	  color: '#ffffff',
	  links: '#4aed05'
	}
  },
  features: {
	scrollbar: false,
	loop: false,
	live: false,
	hashtags: true,
	timestamp: true,
	avatars: false,
	behavior: 'all'
  }
}).render().setUser('mysite').start();
</script>


#39   kymation

kymation

    Believers

  • Community Sponsor
  • 6,696 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 01 March 2011 - 09:28 PM

HTML is safe, but it appears that Javascript is not. You will need to escape the single quotes like this: \'

I'm just using the standard osCommerce input box here. It appears that I'll need to write my own to make it safe to use.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#40   warrenerjm

warrenerjm
  • Members
  • 1,144 posts
  • Real Name:Julie
  • Gender:Female
  • Location:UK

Posted 01 March 2011 - 09:32 PM

Thanks Jim

How to I edit it though, as it won't show the code when I click on the edit button?

Do I need to uninstall & re-install?
Do I need to upload both or one of the files again?

Also am I supposed to see the generic box css outside the twiter box?

Fab contribution though. :)