Shipping discount

Hi all,

I knowq this feature is to crop up in some later release but was wondering if someone could provide me with the code and location to hard code it for the time being.

I simply need the system to charge the fixed shipping fee IF the ‘subtotal’ (before tax) is below £100 ( in other words the pre-tax total for goods ). If it comes to over £100 then shipping should be free. I’m guessing some sort of if statement would do the trick but that’s as far as I go with this one.

I also noticed, incidentally, that if you check the delete item from cart box and update cart the item still displays in the cart until you refresh again

Thanks in advance

Daniel

  • mobilityproducts4u.org
    • Flash Drive

    Thanks Aaron,

    tearing my hair out. Haven’t implemented that change yet becasuse my shopping cart, all of a sudden, has stopped showing both VAT and shipping charges!! I’ve tried a few things none of which have worked. Could something in the 1.0.4 upgrade have caused this?

    Daniel

  • Mason
    • DEV MAN’s Sidekick

    Hiya Daniel,

    I haven’t had a chance to test this with 1.0.4 yet. Could you try downgrading back to the earlier version and seeing if that works (not sure whether you had 1.0.2 or 1.0.3 before)?

    Aaron may be around with another suggestion, but it’s the weekend so response times can be a bit longer and I know you’re wanting to launch first of the week.

    Thanks!

  • mobilityproducts4u.org
    • Flash Drive

    Hi masonjames,

    Thanks for your reply. These problems always seem to happen on a weekend!

    Tried downgrading to both versions you suggested but it hasn’t helped the issue. This makes absolutely no sense whatsoever. Nothing has been changed except something in the blogs settings that Aaron asked me to do. I changed it back to the old setting but it didn’t help either. I can’t say I noticed exactly when this happened.

    Daniel

  • mobilityproducts4u.org
    • Flash Drive

    Tried that but that’s not it. Google chrome was a fresh installation and have also tested on other computers that had never been on the site incase cookie were being stubborn. This does, however, seem to be completely arbitary. Where it was showing vat/shipping earlier in IE on my computer earlier it has now stopped again on any of the three browsers. I have not made any changes to code or the admin side of MP since it worked earlier. I also logged in to see if being a registered user or not mattered but it didn’t make a difference. Additionally, disablling thinmnails in the shopping cart widget seems to have no effect either for me on any browser/computer.

    We have gone live today but at the moment we are having to offer free postage and display all of our prices inclusive of VAT.

    I’ve created a few new threads over the past couple of week but was just wondering if there was one particular place where I should be reporting bugs? I have another one to point out but not sure where to put it and don’t want to clutter the forum wirth new threads.

    Thanks

  • mobilityproducts4u.org
    • Flash Drive

    You’ve got it in one. Thankyou Aaron. Next question leading on from that then would be how can I get it to show when viewing the cart also? I can understand waiting for shipping details because the shipping rate would obviously vary from country to country but we only ship to one country so it’s all fixed. Same applies to VAT/TAX. I’d rather show my customers their total before checking out. Saves them working it out manually if they are compiling an order to a budget. Some of my customers will also be vat exempt ( we refund it afterwards ) and this will allow them to see how much they are getting back. Maybe it’s a bit picky but I don’t feel you should have to checkout in order to find out your total.

    Thanks in advance

    Daniel

  • Aaron
    • CTO

    We can’t calculate tax or shipping until they have an address on file. Though if they are logged in and have checked out before it’s in their usermeta, or if they’ve gone back after entering it it’s saved in the SESSION so it will show in the cart page. But at the moment the widget will never show it as it would be too busy.

  • mobilityproducts4u.org
    • Flash Drive

    Ahh, I don’t ned the widget to show it, sorry for not clarifying. The widget can just show products excluding vat and shipping, that’s fine. It’s when they click on “checkout” and it shows the “Your shopping cart page” that I would ideally like it to assume that everyone is in the UK and therefore show VAT and shipping regardless of weather they are a ‘guest’ returning customer, entered shipping deails or not. I’m guessing it would mean just manually setting some vars somewhere?

    Thankyou Aaron.

    Daniel

    P.S. I still can’t get the thumbnails to go away in the shopping cart widget!!

  • Aaron
    • CTO

    For shipping you could comment this out in the shipping_price() function:

    //check required fields

    if ( empty($address1) || empty($city) || empty($state) || empty($zip) || empty($country) || !(is_array($cart) && count($cart)) )

    return false;

    For tax you could just lock the country in tax_price():

    $country = ($_SESSION) ? $_SESSION : $meta;

    to

    $country = 'UK';

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.