Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Horrible errors coming up after adding a contribution!


Mrs Minx

Recommended Posts

Hi All,

 

Please can someone help? I have tried to restore and undo changes I have made, but I have really messed up my site, since adding a min order contribution to my live store and now I am in a real pickle with these errors coming up:

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /homepages/19/d168749853/htdocs/catalog/includes/functions/database.php:13) in /homepages/19/d168749853/htdocs/catalog/includes/functions/database.php on line 13

 

Thing is I never had to change any code in database.php - so it must be linking in from another page.

 

Problem is when I go to add some thing to the shopping cart - the above error comes up. If I click on 'cart contents' link it also throws the same error up.

 

If anyone could help, it would be most appreciated. :)

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

Minxy :)

 

"Keep plodding on to achieve your dreams"

Link to comment
Share on other sites

search the contribution for tep_db_connect() this will let you know which page it is on then go to that page of your cart and remove the function call.

 

Would need to know the exact contribution in order to find code

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi, I used minimum order contribution :

http://www.oscommerce.com/community/contri...h,minimum+order

 

I will have a search - but it has stumped me - thanks for the help :)

Oh live store is: equineinternetsupplies dot co dot uk

(You can see the errors there). Thanks :)

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

Minxy :)

 

"Keep plodding on to achieve your dreams"

Link to comment
Share on other sites

have you installed any other contributions?

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

In checkout_confirmation.php, checkout_payment.php, checkout_shipping.php, and checkout_process.php pages after

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

add the following lines:

// check order total minimum

if ($order->info['subtotal'] < MIN_ORDER_AMOUNT) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));

}

 

was the code correctly added to each of the 4 pages

 

search your cart for tep_db_connect

 

there should be four files each with one instance of tep_db_connect

 

admin/includes/application_top.php

admin/includes/functions/database.php

catalog/includes/application_top.php

catalog/includes/functions/database.php

 

my guess would be that you may have a second instance of tep_db_connect in catalog/includes/application_top.php

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Just checked all four files and there is only one instance of tep_db_connect in each one.

 

I did double check each esp the file you mention where there maybe two instances .. but no sign of it :(

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

Minxy :)

 

"Keep plodding on to achieve your dreams"

Link to comment
Share on other sites

Just checked all four files and there is only one instance of tep_db_connect in each one.

 

I did double check each esp the file you mention where there maybe two instances .. but no sign of it :(

 

check to see if there any blank lines at the beginning or end of the files that you have edited when you added the contribution

 

that may be the problem

 

also you can send me the files by pm if you want and I can take a look for you

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Thanks, I need to hunt down the contr, find out what files I changed and then PM them to you - if thats ok with you?!

 

Thank you :)

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

Minxy :)

 

"Keep plodding on to achieve your dreams"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...