Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Generic Box


kymation

Recommended Posts

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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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! ;)

Link to comment
Share on other sites

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

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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

You might be able to fix it by uninstalling the module and reinstalling. If that doesn't work, you'll have to edit the database directly. Search your Configuration table for MODULE_BOXES_GENERIC_CONTENT_ENGLISH and delete that row. You should then be able to uninstall.

 

Regards

Jim

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

Link to comment
Share on other sites

OK I have un-installed & changed all ' to \' then re-installed & added new code. It shows on the admin side but not on the catalog side.

 

As it worked on the catalog side & shows on the admin side I'm guessing I'll have to make the colour & size adjustments but leave the ' as original. The error message doesn't seem to stop it from working, unless you have another work around java script?

 

All it means is that I cannot edit the code. I have to un-install & re-install. Will this make any difference?

I'm hoping un-installing & re-installing many times won't have an adverse affect?

Link to comment
Share on other sites

Yes, I forgot something. You need to make a change to includes/modules/boxes/bm_generic.php. find Line 77:

 

       $module_contents .= $content . PHP_EOL;

and change it to:

 

       $module_contents .= stripslashes($content) . PHP_EOL;

The box should now work correctly in both the Admin and Catalog.

 

Regards

Jim

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

Link to comment
Share on other sites

I have changed all the ' for a " & it shows both admin & catalog without an error message.

 

Not sure if this is a default with the generic box, but you only seem to be able to add code to the contents once?

After that you do not get the option of the code in the white input box?

 

I'll leave it at that for the moment, until you say any different.

 

Thanks once again.

Link to comment
Share on other sites

Yes, I forgot something. You need to make a change to includes/modules/boxes/bm_generic.php. find Line 77:

 

       $module_contents .= $content . PHP_EOL;

and change it to:

 

       $module_contents .= stripslashes($content) . PHP_EOL;

The box should now work correctly in both the Admin and Catalog.

 

Regards

Jim

Cross posts. Do I still need to do this as I have changed all ' to " & it works both admin & catalog side?

Link to comment
Share on other sites

No, that was only to account for the escaped single quotes.

 

I think you've found a bug. I have no idea what is doing that, but I'll find out and fix it. Thanks for letting me know.

 

Regards

Jim

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

Link to comment
Share on other sites

No, that was only to account for the escaped single quotes.

 

I think you've found a bug. I have no idea what is doing that, but I'll find out and fix it. Thanks for letting me know.

 

Regards

Jim

ohhhh my first bug :) sorry

Link to comment
Share on other sites

The Best Sellers box appears on subcategory pages, manufacturer pages, and review pages. Is this what you want?

 

Regrds

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

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