Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Strict Standards: Non-static method discount_coupon::is_recalc_shipping() should not be called statically


REALGOODEAL

Recommended Posts

I've been getting this error when I test checking out. I've installed kgt's Discount Coupons AddOn and I didn't have this issue yesterday (or I didn't notice it?) but it's showing up today.

 

Strict Standards: Non-static method discount_coupon::is_recalc_shipping() should not be called statically in /catalog/checkout_confirmation.php on line 80

 

The line:

if( discount_coupon::is_recalc_shipping() ) tep_redirect( tep_href_link( FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode( ENTRY_DISCOUNT_COUPON_SHIPPING_CALC_ERROR ), 'SSL' ) ); //redirect to the shipping page to reselect the shipping method

 

I don't have tax or vat or what have you, and in addition to receiving this error, my subtotal calculation is wrong--it gets doubled. (I.e.: if a product costs 1.95, the subtotal is 3.90.)

 

Any ideas?

 

Full checkout_confirmation.php is attached.

checkout_confirmation.php

Link to comment
Share on other sites

sure ... you are using code that cannot be read. a few lines above you can see the code that would be working fine, so change to

 

if( $order->coupon->is_recalc_shipping() )

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

sure ... you are using code that cannot be read. a few lines above you can see the code that would be working fine, so change to

 

if( $order->coupon->is_recalc_shipping() )

 

I apologize for not responding sooner; it's been quite busy here.

 

I tried that and received this fatal error:

 

Fatal error: Call to a member function is_recalc_shipping() on a non-object in /catalog/checkout_confirmation.php on line 81
Link to comment
Share on other sites

i disagree with Monika.

class methods have to be modified

 

Thanks Fox!

 

This trick also applies to Discount Coupons for osc 2.3.x too.

 

YaNotCook! :thumbsup:

.

 

 

ref : http://www.oscommerce.com/forums/tracker/issue-349-configuration-shippingpackaging-non-static-method-should-not-be-called-statically/

Link to comment
Share on other sites

the other spot a few lines above worked fine though? that's confusing ...in any case, glad it's working!!!

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

  • 1 month later...

 

I understand the change I have to make, but I'm a bit confused as to where the original code you're talking about is located. Is it in the database? Is it in the checkout_confirmation.php? Or somewhere else? It looks like a perfect and easy solution to my problem and I'm eager to see if it will work for me.

 

~Jan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...