sinopia Posted December 19, 2017 Share Posted December 19, 2017 Hello, I've ot_shipping.php activated orders over 29,90€ have free shipping (that works fine) but recently I've added flat.php as a new shipping method but that one should stay even if the shipping is free. I'm using zones.php that with ot_shipping works fine, but as I'd to add flat (always the same price) when a order is over 29,90€ it disables zones and flat and show that the shipping is free. Anyone know how to fix this? Quote Link to comment Share on other sites More sharing options...
sinopia Posted December 19, 2017 Author Share Posted December 19, 2017 Well if this get a bit confusing the real question is: Anyone knows a way to ot_shipping.php display that the shipping is free but show flat.php always as a option? For example: ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) { // output flat.php as a option... } Quote Link to comment Share on other sites More sharing options...
♥clustersolutions Posted December 20, 2017 Share Posted December 20, 2017 @sinopia, ot_shipping.php is to show order total, so you can have zone.php and flat.php installed but at the end ot_shipping.php will only show the one that the user had selected. making sense? so whatever it is that you want isn't gonna work the way that you want it to work. clear!? Quote Link to comment Share on other sites More sharing options...
sinopia Posted December 20, 2017 Author Share Posted December 20, 2017 @clustersolutions thank you for your answer, actually I did a little hack that worked. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 20, 2017 Share Posted December 20, 2017 @sinopia, instead of the free shipping option in ot_shipping, just use for example the flat shipping module. Rename the title and description to free shipping and modify the code to show it only if order total is more than 29.90. within the class constructor if ($order->info['total']) > 29.90) { $check_flag = true; } if ($check_flag == false) { $this->enabled = false; } 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...
♥clustersolutions Posted December 21, 2017 Share Posted December 21, 2017 8 hours ago, sinopia said: @clustersolutions thank you for your answer, actually I did a little hack that worked. @sinopia, welcome and that's great! I had always wondered if the free shipping setup should be in ot_shipping.php as it really should be in the shipping modules. I moved mine into the shipping modules and allowed the ot_shipping.php to display the savings, like this... Quote Link to comment Share on other sites More sharing options...
♥John W Posted December 22, 2017 Share Posted December 22, 2017 (edited) @clustersolutions Wow, sales tax in CA is 9%!!!!!!!!!!! While OSC has always shown Florida sales tax tat 7%, that is wrong. It's 6% state sales tax with counties having additional tax. In Orange county, it's .5% for a total of 6.5%. I do like the way you show that. I notice on Amzn and some other large ones they show it then have a subtraction line for it. Edited December 22, 2017 by John W Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
ArtcoInc Posted December 22, 2017 Share Posted December 22, 2017 (edited) @John W California State sales tax varies from county to county too. Where I live, it's 9.25%. There are places here in California where it is 10.25% Malcolm Edited December 22, 2017 by ArtcoInc Quote Link to comment Share on other sites More sharing options...
♥John W Posted December 26, 2017 Share Posted December 26, 2017 @ArtcoInc That's a big difference from FL to CA, because I think the highest in FL is only 7% but I'm not sure about the Miami area. CA has state income tax also, doesn't it? No state income tax in FL either. Overall, it's a good state to live in. Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
ArtcoInc Posted December 26, 2017 Share Posted December 26, 2017 @John W Yes, we have a state income tax too. Got kin in Florida. Good state to live in, if you don't mind the mugginess or the hurricanes Malcolm (living in earthquake country) Quote Link to comment Share on other sites More sharing options...
♥clustersolutions Posted December 29, 2017 Share Posted December 29, 2017 @John W , I lived in FL's Space Coast for more than 10 yrs. I do miss the State income tax free...I think I won't mind moving to Sebastian Inlet area...got surf there, too... Quote Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 Some places in CA go all the way to City Tax. From memory I had some troubles working with taxes in I think Santa Monica... where it's City Tax, County Tax and State Tax on sales. Also WA state has Sales Tax based on where the buyer lives (not where the seller is) - but they have an online API to make it super simple to get the correct Tax rate for the buyers Zip Code. Quote Link to comment Share on other sites More sharing options...
♥John W Posted December 30, 2017 Share Posted December 30, 2017 @clustersolutions, I'm in Winter Park, which is basically East Orlando. Talking to one of my customers today about Sebastian Inlet and the fishing there. I used to live in Tampa/Clearwater, then Ft Myers/Cape Coral. Did a lot of fishing in both of those. Lot of lakes in my area and the coast is not too far. @burt, The tax in Florida is supposed to be where the buyer lives also, but I just charge where I am. For any state outside, I don't charge tax, which is the bulk of my sales. The California peeps have pretty good weather, but Florida kind of shines right now for weather. It's actually cold right now in the 50's, but most of our days in winter are 70's or even 80's. I imagine the UK is pretty cold right now. A lot of the US is very cold right now. Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 30, 2017 Share Posted December 30, 2017 (edited) @John W 50's...cold....seriously...what do you know about cold? In Edmonton yesterday it was colder then at both the North and South poles. Now that's cold. Dan Edited December 30, 2017 by Dan Cole typos greasemonkey 1 Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥John W Posted December 30, 2017 Share Posted December 30, 2017 (edited) @Dan Cole It's going to be 67 today for the high. What I know about cold is I would die living where you live! This is the best time of year in Fl with mainly sunny skies and nice days. Stays green all year long, which I also like. No changing of leaves, but I sense that's overated! Personally, I like wearing shorts all year round, so I'll stay here. I think the coldest I've been in is the upper teens back in Louisiana. I built a snowman in 1974 when there was snow on the ground In La. Sorry, didn't mean to make you jealous. Well, maybe a little! Edited December 30, 2017 by John W Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
greasemonkey Posted December 30, 2017 Share Posted December 30, 2017 Unfortunately I’m stuck up north with @Dan Cole But it’s nice a sunny 😂 Quote Link to comment Share on other sites More sharing options...
♥John W Posted December 30, 2017 Share Posted December 30, 2017 I checked the weather up there and it shows -23 for @Dan Cole! I can't even imagine what that's like for you guys. However, I'm going play poker wiht friend's tonight and I think I'll have to put on long pants becase it's getting down to 50. Probably need a long sleeve shirt too! Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 30, 2017 Share Posted December 30, 2017 4 hours ago, John W said: Personally, I like wearing shorts all year round, so I'll stay here. Some people wear shorts year round up here too... I think our dogs are a bit smarter though... raiwa, greasemonkey and John W 3 Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
greasemonkey Posted December 30, 2017 Share Posted December 30, 2017 Boy... did this thread go off topic... lol Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 30, 2017 Share Posted December 30, 2017 2 hours ago, greasemonkey said: Boy... did this thread go off topic... lol And it was all John's fault. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥John W Posted December 31, 2017 Share Posted December 31, 2017 This cold weather is getting to me! Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
♥John W Posted December 31, 2017 Share Posted December 31, 2017 Another part of Florida. My friend took this pic yesterday Kayaking. They think it was at least 10ft. Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
sinopia Posted February 15, 2018 Author Share Posted February 15, 2018 On 21/12/2017 at 12:46 AM, clustersolutions said: @sinopia, welcome and that's great! I had always wondered if the free shipping setup should be in ot_shipping.php as it really should be in the shipping modules. I moved mine into the shipping modules and allowed the ot_shipping.php to display the savings, like this... @clustersolutions Hi. That code for the savings looks very nice. You could possibility public it? Quote Link to comment Share on other sites More sharing options...
sinopia Posted February 15, 2018 Author Share Posted February 15, 2018 Just need to get the value of the cost now.. $total_saving = '<span style="color: red; text-decoration: line-through;">' . $order->info['shipping_cost'] . '</span>'; ...... $this->output[] = array('title' => $order->info['shipping_method'] . ':', 'text' => $total_saving . ' ' . $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['shipping_cost']); } Getting 0 because it's free.. Quote Link to comment Share on other sites More sharing options...
sinopia Posted February 15, 2018 Author Share Posted February 15, 2018 // The line telling the savings on the shipping when it's free $total_saving = '<span style="color: red; text-decoration: line-through;">' . $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']) . '</span>'; if (($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) { // if free shipping $this->output[] = array('title' => $order->info['shipping_method'] . ':', //'text' => $total_saving . ' ' . $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'text' => $total_saving, 'value' => $order->info['shipping_cost']); } else { $this->output[] = array('title' => $order->info['shipping_method'] . ':', 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['shipping_cost']); } 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.