LeeFoster 219 Posted June 2, 2020 I am currently working on getting this add on working with Phoenix, it's almost there except for one issue. https://apps.oscommerce.com/BSHzP&cost-weight-matrix-shipping-rates I have set up 2 values for cost £50 and £100, the theory being that once the cart goes over £100 that shipping option should no longer be there. In case you didn't guess it's still there and showing the lowest shipping amount. Testing on Phoenix 1.0.7.1 PHP 7.3.3 Local Xampp server Share this post Link to post Share on other sites
LeeFoster 219 Posted June 2, 2020 Original developer appears to have had the same issue and added in the below code to fix. However it no longer fixes. if ($order_total > $table_costtable[$size-1]) { $table_pointer = $size-1; break; } Share this post Link to post Share on other sites
LeeFoster 219 Posted June 2, 2020 Added the below code and it now hides the shipping option in the cart $cart_total = $cart->show_total(); $table_costtable = preg_split("/[,]/" , MODULE_SHIPPING_UKFIRST_UT_COSTTABLE); $size = sizeof($table_costtable); for ($i=0; $i<$size; $i++) { if ($cart_total > $table_costtable[$size-1]) { $this->enabled = false; } } I now get this error in the shipping modules section of admin. Quote Fatal error: Uncaught Error: Call to a member function show_total() I know it's because the function doesn't exist there but how do I get around it? Share this post Link to post Share on other sites
hungryfrank 62 Posted June 2, 2020 if this is in a function u can add carts to the globals global $order, $cart; you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Share this post Link to post Share on other sites
LeeFoster 219 Posted June 2, 2020 Just now, hungryfrank said: if this is in a function u can add carts to the globals global $order, $cart; I added $cart to the globals which is why it works on the front end. Unfortunately this doesnt carry over to admin. Share this post Link to post Share on other sites
hungryfrank 62 Posted June 2, 2020 there is no cart in the admin section. so you have to check in the $order you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Share this post Link to post Share on other sites
♥ecartz 724 Posted June 3, 2020 Remove $cart from global and write if (isset($_SESSION['cart']) { $cart =& $_SESSION['cart']; } else { $cart = new shopping_cart(); } But it might be better not to use cart in admin at all. Always back up before making changes. Share this post Link to post Share on other sites
LeeFoster 219 Posted June 3, 2020 7 hours ago, ecartz said: Remove $cart from global and write if (isset($_SESSION['cart']) { $cart =& $_SESSION['cart']; } else { $cart = new shopping_cart(); } But it might be better not to use cart in admin at all. Made the change and now get this error Quote Fatal error: Cannot declare class shoppingCart, because the name is already in use in \includes\system\versioned\1.0.0.0\shopping_cart.php on line 13 Share this post Link to post Share on other sites
♥ecartz 724 Posted June 3, 2020 Sorry, new shoppingCart() not shopping_cart. Always back up before making changes. Share this post Link to post Share on other sites
LeeFoster 219 Posted June 3, 2020 6 minutes ago, ecartz said: Sorry, new shoppingCart() not shopping_cart. Thanks, looks like that's fixed it.. Share this post Link to post Share on other sites