Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trouble with adding shipping NEW module...


phiberz

Recommended Posts

Hi!

 

i?ve made a new shipping module for Posten in Sweden and im having big problems with this.

 

I?ve taken the basesource from ../shipping/table.php

 

when the entire shipping module where done I uploaded to both ../languages/english/modules/shipping/

& ../catalog/includes/modules/shipping/

 

But when i open the adminsection and push modules/shipping i get:

---------------------------------------------------------------

Shipping Modules

 

1146 - Table 'flagdata_1.EKONOMIBREV_CONFIGURATION' doesn't exist

 

select configuration_value from EKONOMIBREV_CONFIGURATION where configuration_key = 'MODULE_SHIPPING_EKONOMIBREV_STATUS'

 

----------------------------------------------------

 

Shouldn?t the database by auto. add the new shipping??

 

Can someone thell me whats wrong??

 

RGDS Phiberz

Link to comment
Share on other sites

sorry, can't help you phiberz cos I'm new and don't know the osCommerce well but it seem that regulars only help each others. If you look at the newbie's post they are all "0" posting.

Link to comment
Share on other sites

Just found this thread....

 

http://www.oscommerce.com/forums/viewtopic.php...ghlight=lingual

 

so much for so called "non-commercial free advice" huh?

 

If you want the answer, you've got to pay the contributor!!!

Just about everything these days. There is always someone making money under the counter. *politics*

 

::AG::

====

:twisted: You have a chip on your shoulder!

:sarcasm: I wasn't born with it. Somebody decided to put it there. I was born pure & innocent!

Link to comment
Share on other sites

Hi!

 

I FOUND IT!!!! :D

 

the error was when i did the global replace of TABLE (cause i used table.php)

 

then it replaced the TABLE_CONFIGURATION with my replacement that was HEMPAKET with made a error cause now it became HEMPAKET_CONFIGURATION instead and the database DIDN`T know what it should do cause it didn?t EXIST.

Check below

FINE WORKING CODE:

function check() {

     if (!isset($this->_check)) {

       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_HEMPAKET_STATUS'");

       $this->_check = tep_db_num_rows($check_query);

     }

     return $this->_check;

   }



   function install() {

     tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );

    tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );     tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );     tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );     tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );    tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );     tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );   }



   function remove() {

     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

   }

 

WRONG CODE:

function check() {

     if (!isset($this->_check)) {

       $check_query = tep_db_query("select configuration_value from " . HEMPAKET_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_HEMPAKET_STATUS'");

       $this->_check = tep_db_num_rows($check_query);

     }

     return $this->_check;

   }



   function install() {

     tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );

    tep_db_query("insert into " . TABLE_CONFIGURATION . " ....... );     tep_db_query("insert into " . HEMPAKET_CONFIGURATION . " ....... );     tep_db_query("insert into " . HEMPAKET_CONFIGURATION . " ....... );     tep_db_query("insert into " . HEMPAKET_CONFIGURATION . " ....... );    tep_db_query("insert into " . HEMPAKET_CONFIGURATION . " ....... );     tep_db_query("insert into " . HEMPAKET_CONFIGURATION . " ....... );   }



   function remove() {

     tep_db_query("delete from " . HEMPAKET_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

   }[/

 

 

Well hope someone else finds this post if he/she have the same problem as I and get HELP!

 

RGDS Phiberz

Link to comment
Share on other sites

but it seem that regulars only help each others. If you look at the newbie's post they are all "0" posting.

 

That's absolutely not true, everybody is more then willing to help everyone, including NEWBEE's but the most newbee's are asking questions that are already answered more then 150 times.

They refuse to use the search option, the WIKI.oscommerce.com etc...

 

Most people get tired to answer the same questions EVERY DAY over and over again because people refuse/forget that there exists a search option, i hope you can understand that.

 

And we DO forget the search option ourselfs also sometimes, and then we get remembered also once again by someone else...lol

 

But overall, this is one of the coolest places for support with a free product.

Why does everyone keeps on spending time here to help others for free ?

I know the answer but just give it a shot ;)

 

Just see how many threads there are posted & ANSWERED every day !

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...