Jump to content
kenthsoderholm

Shipping is not included in total on checkout

Recommended Posts

As stated in the title. When a customer goes through the checkout process it doesn't add the shipping cost to the total and then the order total is "order - shipping".

Example:

Customer A adds a 10SEK item to his/her basket.

Then goes through checkout (after signing in and all of that),

on checkout.php it states "This is the only shipping option available" and the cost of that shipping option.

But the shipping cost is set to 0 in the "Products" box above "confirm purchase".

The shipping cost continues to be 0 on all following steps.

 

Any ideas?

Been googling and looking through code for a couple of hours now.

Share this post


Link to post
Share on other sites

Pretty vague question.

 

What shipping module are you using?

 

Do you have free shipping enabled in your configuration section of admin?

 

These are only two of the possible outcomes.


Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Share this post


Link to post
Share on other sites

Sorry bout the vagueness, got this one dumped on me by senior dev who was swamped...

 

As far as I can see we are using the order_total module and shipping module that is stock in OSC 2.2.2 with no apparent modifications.

Allow free shipping is set to false in adminpages.

 

Not sure how to describe the problem further.

Share this post


Link to post
Share on other sites

I made a hack to fix it.

When the order_total object is created but before the process()

I set the $order->info['shopping_cost'] depending on the $order->info['shipping_method']

not pretty but it works as supposed to now...

Share this post


Link to post
Share on other sites

Is the shipping configured in the admin modules->order_total for the proper sort order?

 

This might be the problem, It also could be a bad database, but i'm glad you fixed it somewhat.

 

Not only that but OsComm has 5 different default shipping options

 

Flat rate

Table rate

per item

United States Postal Service

and

zone rates

 

so which one is marked off? // this will have a sort order of 0 or some other number in this column

 

Again with the order total modules they are

 

Low order fee

Shipping 2 //sort order

Sub-total 1 //sort order

Tax 3 //sort order

and

Total 4//sort order

 

the sort order determines where they show up in the shopping cart side of things. You want to have sub-total as your first option.

 

Next is your shop in "virtual" mode?

 

Next another possible outcome is that with all the confusion your sr lead might have uploaded the wrong vers of the checkout pages.

 

So for ex he uploaded v2.3 OsComm files instead of the v2.2 OsComm files.

 

If you can give a screen shot of the admin without the address bar on top that would help.

please make one of each modules->shipping and modules->order total.

Edited by rpetet

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Share this post


Link to post
Share on other sites

My hack didn't really solve the problem since it caused a problem with the payment module since the requested funds and the basket value didn't match )=

 

The info you requested:

 

The sort order of shipping methods are

"Country Based" 0 (zones.php)

"Collect at store" 99 (TiM's)

 

And the sort order of the order total is

 

low order fee 4

Shipping 2

Sub-total 1

Tax/VAT 3

Total 5

 

Newbie at OsC so what exactly is "Virtual mode"?

 

Have screens of each. Hopefully you can see what's wrong, despite the swedish and the remodelled UI.

 

Thanks in advance

 

//Kenth

http://kenthsoderholm.se/images/module_order_total.PNG

http://kenthsoderholm.se/images/module_shipping.PNG

Edited by kenthsoderholm

Share this post


Link to post
Share on other sites

I suspect your database entries are corrupted.

 

Uninstall ALL of your shipping modules, then use phpmyadmin to make sure that every shipping module is fully uninstalled.

Do the same for the Order Total modules.

 

Then re-install the shipping modules, and configure them.

Then re-install the order_total modules and configure them.

 

After doing this, report back.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Burt:

 

Tried your suggestion and nothing changed.

Then the senior dev remembered that this customer had a "special" checkoutpage that they wanted to have, and when we reverted to an older version of the webshop everything worked again so there was probably some buggy code in the special checkout.

 

Thanks for your time guys.

 

next time when I need help it will be for problem that hasn't been manufactured by my former colleagues...

 

//Kenth

Share this post


Link to post
Share on other sites

HI,

If you are using some module to make discount and free shipping by amount admin >> modules >> order total >> shipping / free shipping.

There's a bug in includes/modules/order_total/ot_shipping.php

In the line:

        if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
          $order->info['shipping_method'] = $this->title;
          $order->info['total'] -= $order->info['shipping_cost'];
          $order->info['shipping_cost'] = 0;
        }

Replace to:

		if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
		  if ($order->info['shipping_cost'] == 0) {
		  //$order->info['shipping_method'] = $this->title;
          $order->info['total'] -= $order->info['shipping_cost'];
          $order->info['shipping_cost'] = 0;
		  }
        }

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×