Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating a new infobox in osCommerce 2.3.1


ck234

Recommended Posts

  • Replies 97
  • Created
  • Last Reply
  • 2 months later...

Iv got a big issue.. sad.gif

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

 

 

Exact same error I'm having in modules.php....

 

I'm not able to install the module which i had created.... :(

A man is great by Deeds, not by Birth....

Link to comment
Share on other sites

That sounds like a database problem. Try cleaning out all of the module constants in the configuration table and reinstalling.

 

This may have been caused by an error in your new module. The most common cause is a constant declared in the install() method that is not also declared in the keys() method.

 

Regards

Jim

 

I did that sir..... but it still won't work.....

 

I get these warnings..

 

Warning: reset() expects parameter 1 to be array, null given in C:\xampp\htdocs\oscommerce-2.3.3\catalog\admin\modules.php on line 228

 

Warning: Variable passed to each() is not an array or object in C:\xampp\htdocs\oscommerce-2.3.3\catalog\admin\modules.php on line 229

 

and I'm not able to install Shopping Cart module....

A man is great by Deeds, not by Birth....

Link to comment
Share on other sites

  • 2 months later...

Hi. I'm playing around with osCommerce 2.3.3. This thread has been most helpful. The box I created is for a store logo. I wanted to move it to the top of the left column (eccentric of me, I know).

 

I am not great at coding, but what I have bashed together seems to work. Do let me know if it's dodgy! And would it be better practice to have some fixed height and width?

 

The snippit from my new file - includes/modules/boxes/bm_logo.php

 

$data = '<div class="ui-widget infoBoxContainer">' .

' <div style="text-align: center;">' . ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) .

'</a>' .

 

' </div>' .

'</div>';

Link to comment
Share on other sites

There is a Store Logo module in the Header Footer Contents addon that you might want to look at. It's designed to put the logo in the header, but the logic is the same.

 

Regards

Jim

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

Link to comment
Share on other sites

There is a Store Logo module in the Header Footer Contents addon that you might want to look at. It's designed to put the logo in the header, but the logic is the same.

 

Regards

Jim

 

Looks interesting, Thanks! I just installed this on 2 test sites but no show in admin/modules. Curiously, if I click banner manager in tools I get this message -

 

054 - Unknown column 'language_id' in 'field list'

 

select language_id, banners_id, banners_title, banners_image, banners_group, status, expires_date, expires_impressions, date_status_change, date_scheduled, date_added from banners order by banners_title, banners_group limit 0, 20

 

[TEP STOP]

 

I will try installing this addon again on a fresh oscommerce install. I'll leave a message on the right thread for this plugin if there is still an issue with it.

Link to comment
Share on other sites

  • 6 months later...

Can anyone tell me where to add this code so that it works in execute()

 

<a class="twitter-timeline" width="180" height="300" data-dnt="true" data-chrome="noscrollbar" border-color="#cccccc" href="https://twitter.com/wombizclub" data-widget-id="401285614219194368">Tweets by @wombizclub</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

Link to comment
Share on other sites

In the execute() method, of course. Replace that long data string with this one:

 

 $data = '<div class="ui-widget infoBoxContainer">' .
		 ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_TWEETS_BOX_TITLE . '</div>' .
		 ' <div class="ui-widget-content infoBoxContents">' .
		 ' <a class="twitter-timeline" width="180" height="300" data-dnt="true" data-chrome="noscrollbar" border-color="#cccccc" href="[url="https://twitter.com/wombizclub"]https://twitter.com/wombizclub"[/url] data-widget-id="401285614219194368">Tweets by @wombizclub</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\'http\':\'https\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>' .
		 ' </div>' .
		 '</div>';

 

You also need to define MODULE_BOXES_TWEETS_BOX_TITLE in your language file(s).

 

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 played around with the width="180" element but no matter what figure I put there it remains the same width. The height does adjust but not the width. I am thinking of just making all my side boxes wider to fit it as I can't figure it out.

Link to comment
Share on other sites

Try removing the width="180" from the code. If that doesn't work, it's something Twitter is doing, and it's probably not possible to fix that.

 

Edit: Looking at your site with Firebug, there are hard-coded widths in elements being returned by Twitter. Looks like you have to adapt to them if you want to use this.

 

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 posted the JS locally so that I can customise the width but I cannot get my tweets to show now, any idea?

 

<a class="twitter-timeline" data-dnt="true" data-chrome="noscrollbar" border-color="#cccccc" href="https://twitter.com/wombizclub" data-widget-id="401285614219194368">Tweets by @wombizclub</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];. if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://www.womensbusinessclub.co.uk/js/twitter.widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>' .

Link to comment
Share on other sites

I don't know, but I suspect that Twitter has it blocked for foreign scripts, so you have to run their script on their site. I could be wrong. You might check their terms of service/API to see how they want you to use their site.

 

Regards

Jim

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...