Jump to content

Archived

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

ck234

Creating a new infobox in osCommerce 2.3.1

Recommended Posts

Hello

I followed the instruction here, but when I go to the admin page/module I cannot see this file . What I am doing wrong?

Thank you in advance for any help

 

Cramli

Share this post


Link to post
Share on other sites

@@kymation

Hello

I followed the instruction here, but when I go to the admin page/module I cannot see this file . What I am doing wrong?

Thank you in advance for any help

 

Cramli

Share this post


Link to post
Share on other sites

Hello there

Is it possible that anybody could help me??

 

Thank you for that

 

Cramli

Share this post


Link to post
Share on other sites

It is very strange to understand, why nobody can get me a help.

Is it so complicated??

 

Best regards

Cramli

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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....

Share this post


Link to post
Share on other sites

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>';

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Ignore my last message. Me being an idiot. HFC Module handler wasn't installed. There is probably some maintenance going on here.. I'm unable to delete the previous message!

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I missed some single quotes in your code block. I fixed that, so please copy and try again.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

The width is set in the Twitter code -- that width="180" element. Reduce that number until it fits.

 

Regards

Jim


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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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>' .

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Not sure about twitter but know facebook has set minimum width for certain apps


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

×