Jump to content

shippingcost by total order


Guest stijnj

Recommended Posts

Does anyone know how I can achieve the following:

Orders up to £20 = £5.99

Orders up to £30 = £6.99

Orders over £30 = Free

I have Stijn's mod installed for shipping cost by total order as per the top of this topic which takes care of the first two shipping costs but I don't think I can use the free shipping mod at the same time as the shipping cost by total order.

Thanks in advance for any help.

Simon

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

Hi Spechal, thanks for the reply.

Does that mean the two mods will work together? If not could you give me any pointers on what I need to change in the shipping cost by total order mod? I can find my way round easily enough but wouldn't know where to start modifying a mod.

TIA.

Simon

Link to comment
Share on other sites

Get the free ship mod.

When it comes time to modify order.php

Just make sure to place this code:

  if($free_ship=="Y"){

 	 if($cart_total>=$freeshipamount)

 	 {$total_ship="0.00";}

 	 }




Directly before




$total_ship = sprintf("%.2f", $total_ship);

  $pre_total_tax = sprintf("%.2f", $pre_total_tax);

  $payable = sprintf("%.2f", $payable);

Link to comment
Share on other sites

Spechal/Anyone can you help please? I thought this was working (doh!) but when I've checked again it's not quite right.

If the order is over £30 the shipping cost does show as £0 on checkout, but in Amount Payable it still adds the cost of shipping by total order so it looks like this:

Basket Total: £39.90

Tax (0.00%): £0

Postage & Packaging: £0.00

Amount payable: £47.89

The cost of shipping by total order is calculated as £7.99 correctly but it shouldn't be added to amount payable as shipping over £30 is free.

Any chance you could point me in the right direction please?

TIA

Simon

Link to comment
Share on other sites

Ok, panic over. Managed to fix it, maybe if I'd given it a little more thought before completley freaking out.

I just moved

if($free_ship=="Y"){

  if($cart_total>=$freeshipamount)

  {$total_ship="0.00";}

  }

up a bit so it comes before

$cart_total=$cart->cart_total($prefix,$session,$sale);

  //$total_ship = $total_per_item + $max_per_ship;

  $pre_total_tax = $cart_total * ($site_tax/100);

  $payable = $cart_total + $total_ship + $pre_total_tax; 

Link to comment
Share on other sites

Thanks for replying (again), I did see your initial reply to my post a couple of days ago and placed the code as you said and thought it worked fine but when I double checked tonight it wasn't calculating right so I tried (guessing) moving the code up a few lines, before it calculates the total amount payable and this seems to work Ok.

If I didn't have your advice in the first place I certainly wouldn't have got it to work at all, so thanks again.

Link to comment
Share on other sites

Hi!

i would like to install the free ship mod but

i'm not sure here, does it apply to all shipping alternatives i have

or can i just point it to one of them??

i would like it to be:

mailorders - customer pays for shipping

payment in advance - free shipping

thx

Link to comment
Share on other sites

  • 3 weeks later...

Hello, I installed this Mod today and all went smooth.. or so I thought.. I get no errors or anything but for some reason its not saving the shipping info I enter and therefore not applying it to the order when I check out?? Any advice would be great.

Ok I did notice I am getting this error on checkout

Warning: Division by zero in /home/creative/public_html/store/order.php on line 458

Thanks in advance,

Carrie

Never mind I figured it out.

Link to comment
Share on other sites

I assume you have the free_shipping mod installed. I assume that by the error you got, refer the the first post of this page, made by me, that says:

When it comes time to modify order.php

Just make sure to place this code:

 if($free_ship=="Y"){

  if($cart_total>=$freeshipamount)

  {$total_ship="0.00";}

  }








Directly before






 

$total_ship = sprintf("%.2f", $total_ship);

 $pre_total_tax = sprintf("%.2f", $pre_total_tax);

 $payable = sprintf("%.2f", $payable);

Do that.

Link to comment
Share on other sites

  • 3 weeks later...

so either i dont understand how this mod works or i installed it incorrectly ... :(

my assumption was that you could have several limits set, such as:

if a customer makes an order up to $20 his shipping is X

but if his order is $50 his shipping is X

but if his order is $70 his shipping is X

etc etc ....

is this indeed how it works?

cause every time i added values it returned me back to the complete page via the "click here to view result" I would always return to a blank form... is this correct? i would figure that if you can enter multiple amounts that they would appear on the shipping_by_ordersum page so that you could modify or delete as necessary ....

is this correct? If so then can this mod be modified to act as described?

thanx!! :D

Link to comment
Share on other sites

Sorry to bring back an old thread but ive run into an error.

I done exactly as said above and i get..

Warning: Division by zero in /home/vidcd/public_html/cart/order.php on line 459
Link to comment
Share on other sites

That error means your trying to divide something that is either zero or non-exsistant.

In your case, non-exsistant.

Please verify that you put the lines in the correct places, because your not placing the added code to the line just before $total_ship.

Link to comment
Share on other sites

I added stijnj shipping mod but keep getting the following error at hte 'edit shipping by total order' page

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/crev/public_html/admin/shipping_by_order.php on line 47

please help, im not too good with things like this. thanks!

Link to comment
Share on other sites

It looks like the table in your SQL database may not have been created correctly. (?)

View the table in your myPHPadmin to verify that the correct fields etc have been added to the proper location in the database.

Link to comment
Share on other sites

Hello...

i need some mod to make pay when delveri is that something u can make? and i DONT wonna pay £5 that is to much for this one... i come from denmark i will pay u but not that much its like 37,5DKK for 2min. work.. but iff u can make it plz let me know then we find out...

Link to comment
Share on other sites

Hi there,

I am getting this error in the admin area:

(CubeCart mod by Stijn Jammaers © www.pastij.be Warning: Supplied argument is not a valid MySQL result resource in /home/myfunkyshop/public_html/admin/shipping_by_order.php on line 47

I am also getting this message on the store at test checkout

Warning: Supplied argument is not a valid MySQL result resource in /home/myfunkyshop/public_html/order.php on line 561 Warning: Division by zero in /home/myfunkyshop/public_html/order.php on line 570

What does this mean!!!

Cheers

Louise

Link to comment
Share on other sites

  • 2 weeks later...

As it seems everyone has the same problem as I do.

I get this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fashio15/public_html/store/admin/shipping_by_order.php on line 47

and this one:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fashio15/public_html/store/order.php on line 450

do you have a prefix for your store?

if so

CREATE TABLE YOURPREFIXHEREstore_ship_by_ordersum (

  ship_amount decimal(30,2) NOT NULL default '0.00',

  ship_amount_base decimal(30,2) NOT NULL default '0.00',

  ship_amount_up decimal(30,2) NOT NULL default '0.00',

  ship_amount_up_base decimal(30,2) NOT NULL default '0.00'

) TYPE=MyISAM;

#

# Gegevens worden uitgevoerd voor tabel `store_ship_by_ordersum`

#

INSERT INTO YOURPREFIXHEREstore_ship_by_ordersum VALUES ('4.99', '25.00', '1.00', '25.00');

I don't know what a prefix is. This fix seemed to help someone but if I new what it was maybe it would help me.

Link to comment
Share on other sites




×
×
  • Create New...