♥raiwa Posted January 21, 2017 Share Posted January 21, 2017 you need to add $customer_country_id, $customer_zone_id to the globals list. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted January 21, 2017 Share Posted January 21, 2017 Hello Nicolas @@cinolas, Forget the last post. I had a deeper look now and you just need to load the shipping class before the order total class: // load the selected shipping module require('includes/classes/shipping.php'); $shipping_modules = new shipping($shipping); require('includes/classes/order_total.php'); $order_total_modules = new order_total; $order_total_modules->process(); if ( MODULE_ORDER_TOTAL_INSTALLED ) { $pa_order_total .= ' <div class="panel-body">'; $pa_order_total .= ' <table class="pull-right">'; $pa_order_total .= $order_total_modules->output(); $pa_order_total .= ' </table>'; $pa_order_total .= ' </div>'; // end body } Like this you do not need anything else. You can also clean up your global list you need only: global $oscTemplate, $cart and if you remove : if (($cart->count_contents() > 0)) { which is not needed on the checkout payment page, you can leave only: global $oscTemplate If you have a look on the checkout confirmation page, you'll see that it's done there like this: // load the selected shipping module require('includes/classes/shipping.php'); $shipping_modules = new shipping($shipping); require('includes/classes/order_total.php'); $order_total_modules = new order_total; $order_total_modules->process(); rgds Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
cinolas Posted January 25, 2017 Share Posted January 25, 2017 Rainer, @@raiwaThank you SO MUCH. This is precisely the area of php that I know nothing about, that is to say most of php hehe. What I'm saying is I could've dug for a thousand years and not figured that out. Or taken an online course in php anyway... It works beautifully! best regards. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 14, 2017 Share Posted April 14, 2017 fyi, http_client.php is now removed as of pull #545 // shipping cost require('includes/classes/http_client.php'); // shipping in basket I haven't tested; however, I do not see any calls for this class in the latest code. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted April 14, 2017 Share Posted April 14, 2017 @@marcello, just remove this line, I'll upload an update ASAP. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥kymation Posted April 14, 2017 Share Posted April 14, 2017 osCommerce now requires cURL to be enabled for the base install, so that should be used in place of the HTTP class in any module that needs to communicate with an external server. I'm not aware of any modern module that still uses the HTTP class. If there is one, it should be converted to use cURL. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
koopmanh Posted August 10, 2017 Share Posted August 10, 2017 Hi Raiwa, Great work this modular shopping module! I made a small additional module called continue shopping. Basically its just a button that allows the user to get easy back to the store. (see attachment). If the code is ok by you maybe you can add it to an update of the modular shipping module. Also I would like to ask if you already managed to provide something that If the user selects a shipping method he is not guided to checkout_shipping but to checkout_payment. cm_sc_continue_shopping.php continue_shopping.php cm_sc_continue_shopping.php Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted August 10, 2017 Share Posted August 10, 2017 Hello Hans @koopmanh, Thank you, I'll check the modules, but I believe they should be upoaded as a separate add-on. They are independant from the ship in cart modules. Let me know if you wish to pack and upload them yourself. Otherwise I'll do it. Just please give me one week or so, I'm actually travelling. For the checkout issue, I sent you a PM. rgds Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Enzo_UK Posted September 6, 2017 Share Posted September 6, 2017 I have a tiny problem, and have had a quick look through some of the pages, but cant for the life of me find the fix for it. I am using the latest 3.7 Version, on a 2.3.4 BS site... If I have a shipping module that gives out a cost of 0.00 it does not show up in the list of delivery options for a customer who is not logged in, but does bring it up if the customer is logged in. If I used that same shipping module and get it to output a price of 0.01 it does come up, so don't think its anything to do with the store country being missing or anything like that, it simply doesn't give it as an option as it has a price of 0.00 Massive thanks to anyone that can help me out with this one. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 6, 2017 Share Posted September 6, 2017 Hello Andrew @Enzo_UK, Please check if you have the store country filled in and if your module is post code based, activate the post code option to show and fill in the store post code into the ship in cart module. If it still doesn't show, please post the module and I'll have a look. Just for curiosity: why 0.00 shipping cost. There are other free shipping modules or strore pick up modules which are proved to work correct with ship in cart. rgds Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Enzo_UK Posted September 6, 2017 Share Posted September 6, 2017 35 minutes ago, raiwa said: Just for curiosity: why 0.00 shipping cost. There are other free shipping modules or strore pick up modules which are proved to work correct with ship in cart The built in free shipping only seems to work on a whole country 'national' level, but this way I can offer free shipping just to some postcode areas. In the UK parcel delivery prices vary a lot according to postcode, so if I want to offer free shipping over £50... its okay for most of the country where it will only cost me £6, but I simply cant afford to subsidise someone on a remote Scottish island for £18 worth of delivery on a £50 order. Quote Please check if you have the store country filled in and if your module is post code based, activate the post code option to show and fill in the store post code into the ship in cart module. It was a silly error on my part, as I was trying to get this particular shipping module to only show if the cart subtotal is over £60, but for some reason it doesn't work for a first time visitor, but does once they are logged in. if ($this->enabled == true) { global $order; if ($order->info['subtotal'] > '60'){ $this->enabled = true; } else { $this->enabled = false; } But does work perfectly for both first time visitors and logged in customers if I use total instead of subtotal. if ($order->info['total'] > '60' Thanks for the speedy response, even if it was my own strange error that I had created rather than being something built in the contribution. Quote Link to comment Share on other sites More sharing options...
Enzo_UK Posted September 6, 2017 Share Posted September 6, 2017 (edited) No sorry, its still doing something weird... I haven't fixed it. lol.... It is something to do with the totals and stuff though, as if I use Subtotal it doesn't show up at all unless its a logged in customer, and if I use Total it behaves a bit weird, as if you have say £55 goods, and £5 shipping showing from another shipping module it will offer the choice of free shipping as the Total is £60, but as soon as you pick the free shipping module then the total has gone down to £55. Edited September 6, 2017 by Enzo_UK Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 6, 2017 Share Posted September 6, 2017 (edited) Hello Andrew @Enzo_UK, try to integrate your order total check in the class constructor function instead of the check function. See this example for the zone check: // class constructor function __construct() { global $order; if ( $this->enabled == true ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE_UK_MAIN_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } Edited September 6, 2017 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted September 6, 2017 Share Posted September 6, 2017 You could include a check if $order->info['subtotal'] is defined and use then $cart->show_total() instead. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
phi148 Posted December 29, 2017 Share Posted December 29, 2017 Hi Raiwa, Do you know what I may need to do in order to make this latest contribution of yours work with MVS on 2.3.4 Responsive? Thanks! Bill Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 29, 2017 Share Posted December 29, 2017 Hello Bill @phi148, Sorry, but what is MVS, can you explain please. rgds Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
phi148 Posted December 29, 2017 Share Posted December 29, 2017 Sorry, Multi Vendor Shipping. :) Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 30, 2017 Share Posted December 30, 2017 Hello Bill @phi148, Sorry, no experience with this I never used it. You may get support in the MVS support forum. Best regards Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted May 27, 2018 Share Posted May 27, 2018 Uploaded: Ship In Cart BS reloaded 4.0 Changes Vers. 4.0: - updated to 2.3.4.1. CE Frozen - Updated template name to 2.3.4.1 CE Frozen naming standard - Updated include template to 2.3.4.1 CE Frozen auto filename. - Hide message no shipping mwethod available for virtual carts - Hide shipping address for logged in users if virtual cart Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
inra311 Posted May 30, 2018 Share Posted May 30, 2018 I have installed this great addon :) I am wondering if there is an easy mod for the following problem: As EU dealer, I must display all prices with 19% VAT. I have many customers from outside the EU, and I was hoping the addon would not only display shippig costs for these but the order total as well - in other words the final price (with or without VAT, depending from the country they come from.) After selecting the country, all the VAT itself of the shipping costs and product costs is displayed properly (so there are all kind of routines to check tax rates for logged-in or non-logged-in customers anyway) BUT the subtotal is still the price with VAT , e.g. 400€ instead of 340€. The customer still needs to create an account an log-in just to see how much the product will cost him :( Any ideas how to change this? (sorry if this has already been discussed, I scanned the previous posts but there are 36 pages...) Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted May 30, 2018 Share Posted May 30, 2018 Hello Ingo @inra311, try the following: in includes/modules/content/shopping_cart/cm_sc_shipping.php, line47, add to the global list: global $customer_zone_id, $customer_country_id; same file around line 154, find: $cart_country_id = $_POST['country_id']; tep_session_register('cart_country_id'); //add state zone_id $cart_zone = isset($_POST['zone_id'])? $_POST['zone_id'] : null; tep_session_register('cart_zone'); $cart_zip_code = (isset($_POST['zip_code'])? $_POST['zip_code'] : null); tep_session_register('cart_zip_code'); change to: $cart_country_id = $_POST['country_id']; tep_session_register('cart_country_id'); $customer_country_id = $cart_country_id; tep_session_register('customer_country_id'); //add state zone_id $cart_zone = isset($_POST['zone_id'])? $_POST['zone_id'] : null; tep_session_register('cart_zone'); $customer_zone_id = $cart_zone; tep_session_register('customer_zone_id'); $cart_zip_code = (isset($_POST['zip_code'])? $_POST['zip_code'] : null); tep_session_register('cart_zip_code'); in: includes/functions/general.php, within the "tep_get_tax_rate" function find: if (!tep_session_is_registered('customer_id')) { and change to: if (!tep_session_is_registered('customer_country_id')) { this will update the subtotal if the country in shipping estimator is changed to a country without tax. The products price in shopping cart will be updated on the next page load, because the customer_country_id is registered after the product list loading. All product prices will then be shown without tax if the customer continues shopping. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
inra311 Posted May 30, 2018 Share Posted May 30, 2018 Big thank you, Rainer I will add the changes this evening and report back the result Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted May 30, 2018 Share Posted May 30, 2018 (edited) Ingo @inra311, just found that it is better to add the code to the product listing module cm_sc_product_listing.php: function execute() { global $oscTemplate, $cart, $products, $currencies, $languages_id, $any_out_of_stock; global $customer_zone_id, $customer_country_id; $content_width = (int)MODULE_CONTENT_SC_PRODUCT_LISTING_CONTENT_WIDTH; if ($cart->count_contents() > 0) { // register country_id for tax if ( isset($_POST['country_id']) ) { $customer_country_id = $_POST['country_id']; tep_session_register('customer_country_id'); $customer_zone_id = isset($_POST['zone_id'])? $_POST['zone_id'] : null; tep_session_register('customer_zone_id'); } $any_out_of_stock = 0; $products = $cart->get_products(); $products_name = NULL; and leave the shipping module unmodified but apply also the modification in general.php Like this the product prices in the shopping cart get immediately updated too. Please let me know if it is all ok. I'll then add it as an option to the package. rgds Rainer Edited May 30, 2018 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
inra311 Posted May 30, 2018 Share Posted May 30, 2018 I just added the first one, worked like a charm I will try the other option now... raiwa 1 Quote Link to comment Share on other sites More sharing options...
inra311 Posted May 30, 2018 Share Posted May 30, 2018 Perfect Thanks a lot raiwa 1 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.