harperk Posted February 13, 2014 Posted February 13, 2014 Modded 2.3.3.4 store After recently adding ssl to my site my store does not process the check out correctly. I receive the following error. Strict Standards: Non-static method discount_coupon::is_recalc_shipping() should not be called statically in /mounted-storage/home2/sub001/sc17958-FIWR/mysite.co.uk/checkout_confirmation.php on line 90 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
♥mattjt83 Posted February 13, 2014 Posted February 13, 2014 @@harperk You can find the function (not sure where it resides for that addon) function is_recalc_shipping (){ //function code here } and try changing it to: public static function is_recalc_shipping (){ //function code here } Matt
harperk Posted February 13, 2014 Author Posted February 13, 2014 @ mattjt83 Hi, Thank you for helping. Unfortunately I can not find where this bit of code is to change it? I had no such issues before adding ssl to my site. My host provider said I'd purchased the cert for / and for it to work as before I needed to amend the virtual host to read /www.mysite.co.uk. I changed the appropriate admin and catalog config files but this still didn't work to give me ssl. So, In haste I purchased an ssl cert for the other domain path my site was originally set as /www.mysite.co.uk. I can't understand why I still no ssl working (not switching) after I had purchased two ssl certs on both domains? I thought adding ssl would be simple but not for me and this has caused me alsorts of problems.
harperk Posted February 13, 2014 Author Posted February 13, 2014 @mattjt83 Update: I searched recalc_shipping in catalog/checkout_confirmation.php and found this code //kgt - discount coupons if( tep_not_null( $coupon ) && is_object( $order->coupon ) ) { //if they have entered something in the coupon field $order->coupon->verify_code(); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG != 'true' ) { if( !$order->coupon->is_errors() ) { //if we have passed all tests (no error message), make sure we still meet free shipping requirements, if any if( $order->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 } else { if( tep_session_is_registered('coupon') ) tep_session_unregister('coupon'); //remove the coupon from the session tep_redirect( tep_href_link( FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode( implode( ' ', $order->coupon->get_messages() ) ), 'SSL' ) ); //redirect to the payment page } } } else { //if the coupon field is empty, unregister the coupon from the session if( tep_session_is_registered('coupon') ) { //we had a coupon entered before, so we need to unregister it tep_session_unregister('coupon'); //now check to see if we need to recalculate shipping: require_once( DIR_WS_CLASSES.'discount_coupon.php' ); 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 } } //end kgt - discount coupons Does this help locate the error I'm getting? Thanks
multimixer Posted February 14, 2014 Posted February 14, 2014 @@harperk I would check in file includes/classes/discount_coupon.php, look for the function "is_recalc_shipping" and do the change as suggested by @@mattjt83 under point #2 My community profile | Template system for osCommerce - New: Responsive | Feedback channel
harperk Posted February 14, 2014 Author Posted February 14, 2014 Hi, Problem with discount coupon codes on check out error now fixed after recommended code change above from @mattjt83 Thanks to George @multimixer with help with advise where to look for this code. Solution in catalog/includes/classes/discount_coupon.php changed function is_recalc_shipping() { to public static function is_recalc_shipping (){
Recommended Posts
Archived
This topic is now archived and is closed to further replies.