simike Posted May 9, 2015 Share Posted May 9, 2015 Anybody help me. This modification work fine customer site, but the admin site do not work. (Osc 2.3) Target: table method depend product value. (cart show_total) Admin site error message: Fatal error: Call to a member function show_total() on a non-object in /www/www.shop_name/html/includes/modules/shipping/table.php on line 119 -------------------------------------------------------------------- table.php -------------------- if ($check_flag == false) { $this->enabled = false; } } //start if ($cart->show_total() > 100)) { $this->enabled = false; } // end } Thank you, Link to comment Share on other sites More sharing options...
MrPhil Posted May 9, 2015 Share Posted May 9, 2015 If this is in the class constructor function table, you will need to add global $cart; somewhere near the top of the function (say, after global $order;). It sounds like you didn't completely follow the installation instructions. Link to comment Share on other sites More sharing options...
simike Posted May 9, 2015 Author Share Posted May 9, 2015 Unfortunately, you can either good. Added $cart class table { var $code, $title, $description, $icon, $enabled;// class constructor function table() { global $order, $cart; Link to comment Share on other sites More sharing options...
BrockleyJohn Posted May 10, 2015 Share Posted May 10, 2015 You'll need to include and instantiate the shopping cart class in admin/modules.php to get rid of this error. Frankly, I think this mod is an ugly hack and not how I remember shipping modules are supposed to be used. It's the quote() method which should check the cart. Did you get this from somewhere or make it up? Anyway, to make the error go away, edit admin/modules.php and after the inclusion of application top add something along the lines of include DIR_FS_ADMIN.WS_CLASSES.'shopping_cart.php' $cart = new shoppingCart(); Please note I've done this from memory and not tested it so there may be something daft as well as any tyops! It should get you on the right track though. Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.