Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Creating a new infobox in osCommerce 2.3.1


51 replies to this topic

#21 blairh

  • Community Member
  • 33 posts
  • Real Name:Blair

Posted 06 January 2011, 07:11

View Postkymation, on 05 January 2011, 21:39, said:

I can get more specific if you tell me what you don't understand. I'm not very good at shooting in the dark.

Regards
Jim
haha, ok
Well if I log into the PhpAdmin and find the table where would i the constants.. and what would I replace them with
do i have to find new constants or just re use the old ones?
This database stuff really confuses me.

#22 kymation

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

Posted 06 January 2011, 17:51

The constants always begin with MODULE_, so if you plug MODULE_% into the Search box next to configuration_key you should get a complete list. Then you'll need to search through that list and remove duplicates, or just remove them all. Removing all of them will uninstall all of your boxes, so that should be a last resort.

You could also search for each of the constants that you used in your module and remove them individually, or remove duplicates. That may work, depending on just what the problem is with your code. Of course you need to fix that problem before you try to install it again.

Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support

#23 PupStar

  • Community Member
  • 397 posts
  • Real Name:Mark
  • Gender:Male

Posted 06 January 2011, 18:21

View Postkymation, on 05 January 2011, 21:39, said:

I can get more specific if you tell me what you don't understand. I'm not very good at shooting in the dark.

Regards
Jim

Hi Jim,

I dont think blairh is having a problem with the template. I have this thread

http://forums.oscommerce.com/topic/368597-new-231-infobox/

which details more of the problems encountered converting the 'Year Make Model' contribution to 2.3.1

If you could offer any help then I would appreciate it.

Thanks

Mark
My Contributions (so far):

Join Us On Facebook & Twitter Infobox

Contributions currently installed into osCommerce 2.3.1

  • Ajax Attributes Manager
  • CKEditor
  • Column Listing with smart column (modified)
  • Documents Manager
  • Easy Map
  • EasyPopulate v2_76i_231
  • Mindsparx Specials
  • Mindsparx Admin
  • OTF Auto Thumbnailer v2.4
  • Star Product v1.6 + Mindsparx Pimped version
  • Ultimate SEO Urls
  • Who's Online Enhancement
  • Printer Filter V1.7 (modified)
  • Info Pages Unlimited v2.07
  • Google Feeder V2.6
  • Year Make Model

#24 badbo

  • Community Member
  • 141 posts
  • Real Name:Bo Mccoury

Posted 19 January 2011, 02:37

View Postkymation, on 05 January 2011, 21:39, said:

I can get more specific if you tell me what you don't understand. I'm not very good at shooting in the dark.

Regards
Jim
Jim why don't you add this to the Community Add-Ons for a paypal logo or ssl and I bet you become God over night.

#25 kymation

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

Posted 19 January 2011, 02:45

It's not really worthy of an Addon. More like something for Tips and Tricks. I'll write it up there when I have time. And finish my series on osC 2.3.1 while I'm at it.

Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support

#26 ErikMM

  • Community Member
  • 204 posts
  • Real Name:Erik M
  • Gender:Male

Posted 19 January 2011, 08:44

View PostBenjaminJ.Gremillion, on 31 December 2010, 18:50, said:

Not getting any error messages... just no title or sort order, and the new module won't display on my site.

maybe this is the issue:
function bm_search
rename it correctly
<p><span style="color: #FF0000"><a class="bbc_url" href="http://forums.oscommerce.com/topic/368458-231-a-how-to-road-mapno-questions-just-how-tos-please/page__view__findpost__p__1552428" title="">2.3.1 A How To Road Map</a></span> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/307356-oscommerce-road-map-for-the-newbies/" title="">Another Newbie Road Map</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=139426" title="">Basic oSc design</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=177838" title="">How to Make a Horrible Website</a> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/233458-how-to-install-ssl-on-osc-a-simple-1-2-3-instruction/" title="">SSL made simple</a> | <strong>Web Developer</strong> and Firebug are powerful free tools for web design.<br />
<br />
the consent theory of government is &quot;the universal demolisher of all governments, but not the builder of any.&quot;<br />
outside links in url's not allowed, thank you

#27 ErikMM

  • Community Member
  • 204 posts
  • Real Name:Erik M
  • Gender:Male

Posted 19 January 2011, 09:01

View Postblairh, on 05 January 2011, 07:37, said:

Iv got a big issue.. :(
after following the steps my boxes strarted to uninstall themselfs.. NO JOKES!!!
now i cant re add catergories or best seller

these are the errors that are displayed
Warning: reset() [function.reset]: Passed variable is not an array or object in /home/automodi/public_html/shop/blair1/modules.php on line 227

Warning: Variable passed to each() is not an array or object in /home/automodi/public_html/shop/blair1/modules.php on line 228

Iv even removed the newly installed boxes and the issue stays the same :'(

Any help would be amazing

That happened to me as well. I don't remember what I did. I just know that when the first one disappeared I went to my last db back-up right away, and was really careful the next time around when adding a box. Talk about a heart-stopper...I was glad I made a back-up right before I tried the new box install.

Edited by ErikMM, 19 January 2011, 09:04.

<p><span style="color: #FF0000"><a class="bbc_url" href="http://forums.oscommerce.com/topic/368458-231-a-how-to-road-mapno-questions-just-how-tos-please/page__view__findpost__p__1552428" title="">2.3.1 A How To Road Map</a></span> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/307356-oscommerce-road-map-for-the-newbies/" title="">Another Newbie Road Map</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=139426" title="">Basic oSc design</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=177838" title="">How to Make a Horrible Website</a> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/233458-how-to-install-ssl-on-osc-a-simple-1-2-3-instruction/" title="">SSL made simple</a> | <strong>Web Developer</strong> and Firebug are powerful free tools for web design.<br />
<br />
the consent theory of government is &quot;the universal demolisher of all governments, but not the builder of any.&quot;<br />
outside links in url's not allowed, thank you

#28 burt

  • Community Sponsor
  • 6,970 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 19 January 2011, 11:25

Anyone wanting to know how to add an image to a box, here is an example with correct $data;

You do not need to add an extra div class of img. Unless that is doing something else such as centering the image or such.

$data = '<div class="ui-widget infoBoxContainer">' .
              '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_IMAGE_BOX_TITLE . '</div>' .
              '  <div class="ui-widget-content infoBoxContents">' . tep_image(DIR_WS_IMAGES . 'paypal.gif', 'We accept Paypal') .
              '  </div>' .
              '</div>';

The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...

Support is commercially available. The question is whether you value your business
highly enough to spend money on it.

For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/

#29 badbo

  • Community Member
  • 141 posts
  • Real Name:Bo Mccoury

Posted 19 January 2011, 17:49

View Postburt, on 19 January 2011, 11:25, said:

Anyone wanting to know how to add an image to a box, here is an example with correct $data;

You do not need to add an extra div class of img. Unless that is doing something else such as centering the image or such.

$data = '<div class="ui-widget infoBoxContainer">' .
              '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_IMAGE_BOX_TITLE . '</div>' .
              '  <div class="ui-widget-content infoBoxContents">' . tep_image(DIR_WS_IMAGES . 'paypal.gif', 'We accept Paypal') .
              '  </div>' .
              '</div>';

Burt I decided to give yours a go and see what happened. Installed box ok. Tried several ways for the Image.
When I tried yours.
Box title and we accept paypal shows- no image and no errors

$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_PAYPAL_ACCEPTED_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' . tep_image(DIR_WS_IMAGES . '/xxx/images/paypal_accepted.JPG', 'We accept Paypal') .
' </div>' .
'</div>';

This one produces image only:

$data = '<div class="img"><img src="http://xxx.com/xxx/images/paypal_accepted.JPG"></div>';

This one I thought I would have a little fun and try one my self.
It removes footer and places it in right column.

$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_PAYPAL_ACCEPTED_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
'<div class="img"><img src="http://xxx.com/xxx/images/paypal_accepted.JPG"></div>';
' </div>' .
'</div>';

Tried all of them on this thread and only one brings up the image the rest just bring up the box title and we accept paypal. There is no red x or image or errors. I am the only one that could manage to put the footer in the right Column. LOL!!!
$data = '<div class="img"><img src="http://xxx.com/xxx/images/paypal_accepted.JPG"></div>';

Thanks

Edited by badbo, 19 January 2011, 17:55.


#30 burt

  • Community Sponsor
  • 6,970 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 19 January 2011, 18:15

tep_image(DIR_WS_IMAGES . '/xxx/images/paypal_accepted.JPG',

is wrong.

UNless you have the paypal_accepted.JPG image named like that, and in

/images//xxx/images/

Remove this: /xxx/images/
The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...

Support is commercially available. The question is whether you value your business
highly enough to spend money on it.

For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/

#31 badbo

  • Community Member
  • 141 posts
  • Real Name:Bo Mccoury

Posted 19 January 2011, 18:19

View Postburt, on 19 January 2011, 18:15, said:

tep_image(DIR_WS_IMAGES . '/xxx/images/paypal_accepted.JPG',

is wrong.

UNless you have the paypal_accepted.JPG image named like that, and in

/images//xxx/images/

Remove this: /xxx/images/
/xxx/images/paypal_accepted.JPG' image is in /folder/images/paypal_accepted.JPG

Moved image to root

$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_PAYPAL_ACCEPTED_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' . tep_image(DIR_WS_IMAGES . 'paypal_accepted.JPG', 'We accept Paypal') .
' </div>' .
'</div>';

Edited by badbo, 19 January 2011, 18:27.


#32 badbo

  • Community Member
  • 141 posts
  • Real Name:Bo Mccoury

Posted 20 January 2011, 03:46

View Postbadbo, on 19 January 2011, 18:19, said:

/xxx/images/paypal_accepted.JPG' image is in /folder/images/paypal_accepted.JPG

Moved image to root

$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_PAYPAL_ACCEPTED_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' . tep_image(DIR_WS_IMAGES . 'paypal_accepted.JPG', 'We accept Paypal') .
' </div>' .
'</div>';

Found my mistake and Burt's code works just fine. Thanks Burt. Now to make the paypal image when clicked go to paypal verification page.
Thanks Bo

#33 burt

  • Community Sponsor
  • 6,970 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 20 January 2011, 09:58

 <div class="ui-widget-content infoBoxContents"><a href="http://example.com">' . tep_image(DIR_WS_IMAGES . 'paypal_accepted.JPG', 'We accept Paypal') .
'</a></div>' .

The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...

Support is commercially available. The question is whether you value your business
highly enough to spend money on it.

For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/

#34 badbo

  • Community Member
  • 141 posts
  • Real Name:Bo Mccoury

Posted 20 January 2011, 18:41

View Postburt, on 20 January 2011, 09:58, said:

 <div class="ui-widget-content infoBoxContents"><a href="http://example.com">' . tep_image(DIR_WS_IMAGES . 'paypal_accepted.JPG', 'We accept Paypal') .
'</a></div>' .

Thanks Burt,
tried a hundred times before I posted. I was forgetting the <a and when I used yours I forgot to open the div with ' div but all sorted out now. thanks.

#35 badbo

  • Community Member
  • 141 posts
  • Real Name:Bo Mccoury

Posted 21 January 2011, 03:11

Making a box to show SSL from Godaddy.
Follow kymation's how to build a box. Name it whatever you want the box to say.
Maybe this will help someone like me. LOL!!!

Add this in includes/boxes/bm_whateveryounamedbox.php
It will replace the content
$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_whateveryounameyourbox_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents"><span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=Your site seal number"></script><br/></a></span></div>' .
'</div>';

Edited by badbo, 21 January 2011, 03:13.


#36 thered

  • Community Member
  • 18 posts
  • Real Name:russ

Posted 20 February 2011, 20:00

Due to help from this thread I've managed to create a new 'box' to hold my adsense ads.

Thing is, I'm lost at how to insert the Google code into the bm_adsense file.

I think I have to 'parse' it into the $data variable. Is this correct?

Any help on how to do it would be great.

google code looks like this

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxx";
google_ad_slot = "xxxxxxxxxxxxxxxxxxxx";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Cheers

#37 kymation

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

Posted 20 February 2011, 20:14

$data = 'paste_code_here';
Or use the Generic Box addon and just paste the code in the Admin setup for the box. Whichever is easiest for you.

Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support

#38 thered

  • Community Member
  • 18 posts
  • Real Name:russ

Posted 21 February 2011, 00:08

Jim,

I thought I'd tried the $data = 'paste_code_here';

It gives me a blank page, but no alerts. I'm thinking though that I'm using my development apache server/localhost, and wonder if that's the problem, don't want to go live with it until I'm sure, the client has started populating the site, I would hate to lose it all! :smile:

I'm going trying the generic box addon, will report back.

#39 thered

  • Community Member
  • 18 posts
  • Real Name:russ

Posted 21 February 2011, 01:06

<blush> Oh dear... I had adblock plus running - soon as I exempted my localhost page it worked!!!

Thanks agan Jim.

Edited by thered, 21 February 2011, 01:06.


#40 kymation

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

Posted 21 February 2011, 01:56

I never even thought of that. Good old Adblock. Glad to hear you got it running.

Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support