LeeFoster Posted June 2, 2020 Share 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 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted June 2, 2020 Author Share 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; } Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted June 2, 2020 Author Share 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? Quote Link to comment Share on other sites More sharing options...
hungryfrank Posted June 2, 2020 Share Posted June 2, 2020 if this is in a function u can add carts to the globals global $order, $cart; Quote 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 Link to comment Share on other sites More sharing options...
LeeFoster Posted June 2, 2020 Author Share 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. Quote Link to comment Share on other sites More sharing options...
hungryfrank Posted June 2, 2020 Share Posted June 2, 2020 there is no cart in the admin section. so you have to check in the $order Quote 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 Link to comment Share on other sites More sharing options...
♥ecartz Posted June 3, 2020 Share 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. Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
LeeFoster Posted June 3, 2020 Author Share 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 Quote Link to comment Share on other sites More sharing options...
♥ecartz Posted June 3, 2020 Share Posted June 3, 2020 Sorry, new shoppingCart() not shopping_cart. Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
LeeFoster Posted June 3, 2020 Author Share Posted June 3, 2020 6 minutes ago, ecartz said: Sorry, new shoppingCart() not shopping_cart. Thanks, looks like that's fixed it.. Quote Link to comment Share on other sites More sharing options...
jegego5609@mitigado.com Posted April 3 Share Posted April 3 (edited) Double-check the settings in the administration panel to ensure that the cost and weight ranges are set up correctly. Specifically, make sure that the shipping option for £100 has a maximum cost of £100 and a minimum cost of £50. Verify that the correct version of the module is installed and that it is compatible with Phoenix 1.0.7.1. You may want to check the documentation for the module or contact the developer for assistance. Clear the cache and refresh the page to ensure that any changes made to the configuration settings are being recognized by the system. If the issue persists, try disabling any other shipping modules that may be conflicting with the Cost Weight Matrix module. This will help to isolate the problem and determine if there are any conflicts. Check the error logs to see if there are any error messages related to the module or shipping calculations. This may provide additional clues as to what the issue might be. If none of these steps resolve the issue, you may need to seek additional support from the developer of the module or the Phoenix community. Edited April 3 by jegego5609@mitigado.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.