Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ship In Cart


Guest

Recommended Posts

The Shipping Module I have set up for Australia uses State names though, not Post (Zip) Codes.

 

Is there any way around it? I would love to get this working for my setup.

 

thanks

 

 

Jen

I haven't lost my mind - I have it backed up on disk somewhere.

Link to comment
Share on other sites

A nice contribution - however I have one problem: The tax calculation

on the merchandize is not corrected. I.e. if one selects a non-taxable

country there is still tax calculated on the merchandize and the total.

Any idea?

 

Best regards

 

Werner

Link to comment
Share on other sites

I wanted to do some more modifications because it seems there still is a problem with tax calculation (the prices in my database are net, but they are displayed with tax, because the German authorities require that a B2B shop shows all prices with tax). We have also customers from other countries outside the EU and those customers do not need to pay tax. Therefore, I have 3 tax and shipping zones: Germany, Rest of the EU, Rest of the World. The first and the second need to pay tax, the third does not pay tax.

 

The idea is, when a non-taxable country is selected, all (also the cart content) prices do not include tax, in the other case all do.

 

I am a novice in PHP and I am also new to this great shop package, so it is hard to find out what to do. I (and I'm sure many other) would be grateful, if you could help.

 

Thanks for your attention and time!

 

regards

Werner

Link to comment
Share on other sites

  • 3 weeks later...

I think DIFFERENT prices on the items in the

pages of the store will be good if your store

is for a local market. But the idea of an ON LINE

store is to take advantage of the global market.

 

To such a market one price everywhere will be

more reassuring as they see the same and compare

with others when they are searching for something to buy.

 

ocS and the contributions together can be set up

to do this as I discovered by trial and error.

 

setting

define('DISPLAY_PRICE_WITH_TAX', false);

in catalog/includes/application_top.php

 

IN THE ADMIN :

Creating TWO Tax Zones, Taxable and rest of the world

 

setting TWO tax rates whatever rates for taxable and ZERO for

the rest of theworld

 

Loading your Tax inclusive prices while creating items

 

and setting the SORT ORDER in the Order total module

gives me the following result when I login from a taxable

country

 

Payment Type Discount: $1.11

Customer Discount: $4.64

No VAT to be charged: $8.13

Sub-Total: $47.40

Table Rate (Best Way): $6.00

Total: $56.18

 

Notice

No VAT to be charged: $8.13

This is the VAT included in the price but I think for

clarity it should be " VAT includedin the price"

 

When you log in from a non taxable country

I get this

 

No VAT to be charged: $8.30

Sub-Total: $47.40

Table Rate (Best Way): $6.00

Total: $62.75

 

Actually

No VAT to be charged: $8.13

must be reduced from the

TOTAL which will give a GOOD incentive to the BUYER

 

Can anyone suggest what need to be corrected ?

Also I would like to know how this can be done for

the shipping cost.

Though I have set the Shipping cost TAXABLE in the admin

it doesn't show.

If you need to test this all ocsers are welcome to

checkout our LIVE site

http://affiliatesexcel.com

 

For payment chose " By cheque" option to complete

the sale . Please put in remarks or by seperate E mail

you are testing

Link to comment
Share on other sites

i found solution about width.

 

about 225 and 227 lines (ship in cart v 1.7)

 

change the width and size to whatever your want!

 

 

sean

 

by the way

 

since maybe some people don't want display the weight in the shipping option

 

just delete this:

 

 - Weight: ' . $total_weight . 'lbs

 

in line 208 and 222

Link to comment
Share on other sites

Has anyone tried this contrib with the Canada Post shipping module (with dimensions)? I'm using Loaded 5, and everything works if I use table or zone rates. But if I use the Canada Post module, nothing shows up. It only shows up once the buyer is logged in.

 

I read this entire post and also did a search, but I couldn't find enough info to help.

Link to comment
Share on other sites

Hello,

 

I like this contribution but am a bit confused which version to take. I dont have any yet. The shipincart_v7 doesnt have all the files.

 

Another questions: Does it work with cod fee and german post and show both options? And if I a customer is not logged in how does the contribution know which country to consider for shipping costs. In my shop it is Germany and uropean Union?

 

Thanks for answering.

 

Devon

Link to comment
Share on other sites

  • 3 weeks later...

Nice contribution, easy to install. I've got 1.7 up and running on my live site:

 

http://www.dm-gremlin.com/sales

 

I've also got the 'Free Shipping with Minimum Amount' shipping module installed, and I have noticed that this Ship in Cart contribution doesn't allow me to select the 'Free Shipping' method to calculate the total price.

 

Go ahead and put something in the cart to test it out (but don't checkout, because the site is live), try to select 'free shipping' and you'll see what I mean.

 

Any thoughts?

-D. M. 8)

Link to comment
Share on other sites

Ok, found a solution for the problem I was having and here it is in case anyone is interested.

 

It seems that this contribution won't let you select a shipping method if the cost of shipping is 0 - this probably has something to do with the code trying to keep a customer from selecting a shipping method that has an error, since typically shipping is not free.

 

Anyways, I removed that bit and now it works for me. Here's where that bit is:

 

in the 'shipping_estimator.php' file, find this line:

if($selected_quote[0]['error'] || !tep_not_null($selected_quote[0]['methods'][0]['cost'])){

and replace with:

if($selected_quote[0]['error'] || !tep_not_null($selected_quote[0]['methods'])){

 

the line isn't that far after this comment:

// begin shipping cost

 

I'm not sure what negative side-effects this may have. If anyone has a better solution, please share.

-D. M. 8)

Link to comment
Share on other sites

Is anyone using the free shipping and free charge from Webmakers able to use the Ship In cart without errors and without commenting out the free shipper and free charge functions?

I get this error code in shipping

Fatal error: Call to undefined function: tep_get_free_shipper() in /home/virtual/site70/fst/var/www/html/catalog/includes/modules/shipping/flat.php on line 23

 

and this code in payment

 

Fatal error: Call to undefined function: tep_get_free_charger() in /home/virtual/site70/fst/var/www/html/catalog/includes/modules/payment/authorizenet.php on line 22

even without the free shipping and free charge being selected.

 

If I do not remove this code

if ( tep_get_free_shipper($this->code) ) {

$this->enabled = MODULE_SHIPPING_FLAT_STATUS;

}

In shipping and the free charge equivalent in payment - then the ship in cart breaks all my shipping and payment optiions

 

I doublechecked and allthe functions are defined in the webmakers_added_functions.php.

 

Any suggestions?

Link to comment
Share on other sites

Hi,

I use osc 2.2 ms1 with shipincart_1.7, ship2pay_1.3.1a, german_post_1.36, cop_1.0, cod_fee_calculation_1.00.

I have show_price_with_taxes turned on and defined a free shipping for an amount greater than 50 euro.

 

I tested the following:

- added a product (49.95 euro) to my cart. the shipincart shows correctly 49.95 plus 7.45 euro (for shipping), summary 57.40

- clicked on checkout and then the bug appears: it tells me that I am free of shipping!!!

 

And now that:

- went back to the cart

- chose cop as delivery with a charge of 0 euro

- clicked on checkout and there appeared nothing like free shipping any more.

 

Is there a bug in shipincart?

Link to comment
Share on other sites

I have Ship In Cart v1.7 installed in a Dec 17, 2002 snapshot and everything is working well, except:

 

When a customer is not logged in, the state sales tax that is set in my catalog will not show in the total cost box for ZIP codes that are in the taxable area. Once logged in, then the tax shows correctly, based on shipping destination as it should.

 

Has anyone run into this and found a fix?

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Is that a bug in shipincart?

If you have different shipping options with the same charge, e.g. free shipping 0 EUR and some other with 0 EUR, and click on the second one (under the first :wink: ) the page is reloaded but still the first is checked!

 

Can anyone help me, please?

Link to comment
Share on other sites

  • 2 weeks later...

I just added the changes offered by Strider 42 for showing the tax and still don't get the desired result.

 

I am running a snapshot from 12/17/02 and the Show In Cart works fine except for the tax display. The cart is NOT set to show the tax included in product price and when logged in, taxes display OK, but the customer who is not logged in does not see the appropriate tax when the ZIP code is set to a destination within the taxable area.

 

The problem seems to be somewhere in the following part of the code and I don't see here where the ZIP code could be used to determine if they are in the taxable zone:

$info_box_contents = array();

 $info_box_contents[] = array('text' => $ShipTxt);

 new infoBox($info_box_contents);



 if (CART_OT_SHOW == 'true'){

   // bof damned we need the taxes if not logged in ...

   if (!tep_session_is_registered('customer_id')){

     $products = $cart->get_products();

     for ($i=0, $n=sizeof($products); $i<$n; $i++) {

       $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']);

       $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']);

       if (DISPLAY_PRICE_WITH_TAX == 'true') {



        //

        //Modified by Strider 42 to correct the tax calculation when a customer is not logged in

        //

        // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity'];

         $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; 

       } else {

         $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity'];

       }

       $order->info['tax'] += $tax_val;

       $order->info['tax_groups']["$products_tax_description"] += $tax_val;



       //

       // Modified by Strider 42 to correct the order total figure when shop displays prices with tax

       // $order->info['total']+=$tax_val;

       $order->info['total'];

     }

   }

   // eof damned we need the taxes if not logged in (seems like less code than in order class ???)

   require(DIR_WS_CLASSES . 'order_total.php');

   $order_total_modules = new order_total;

   //echo '</td><td align="right">';

   // order total code

   $order_total_modules->process();

   

   $info_box_contents = array();

   $info_box_contents[] = array('text' => CART_OT);

 

   new infoBoxHeading($info_box_contents, false, false);

   $otTxt='<table align="right">';

   $otTxt.=$order_total_modules->output().'</table>';

   

   $info_box_contents = array();

   $info_box_contents[] = array('text' => $otTxt);

 

   new infoBox($info_box_contents);

Can anyone offer a solution?

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Stuart,

 

The fix I uploaded only affected the tax calc if 'Display Prices with Tax' is set to true.

 

I have uploaded another file to the contribution because the fix for the Order Total calc only catered for 'Display Prices with Tax'. That is now changed to take account of both scenarios.

 

I'm not sure where your problem is. The code to calculate the tax when 'Display Prices with Tax' is false works fine for me. I have changed my shop settings to test it and it calculated fine. Manually calculating the figure using the algorithm also works.

 

Does it have anything to do with your Zones setup? I'm shooting in the dark here really as I'm not a PHP programmer, but there seems to be a reference to zones in a DB query if the customer is not logged in.

 

Sorry I can't be of more help.

Cheers

Paul.

Link to comment
Share on other sites

Paul;

 

Thanks for your reply :)

 

I uploaded the new file and am still getting the same scenario:

I have an 8.3% WA state sales tax enabled for delivery destinations within the state of WA. It appears just as it should when someone is logged in (both in the cart checkout section and in the Ship In Cart - which makes sense, since I would think that both are presented from identical calls), but no tax will appear if the user is not logged in, even when they select a WA ZIP code.

 

I will take a look through the code (like you, I am not a programmer either) when I get a moment this weekend to see if I can isolate the problem. If so, I will post here for anyone else who might be having this issue.

 

Of course, any input from someone who is more capable with coding than I or who has solved this issue would be most welcome :wink:

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

I am using this contribution with the TAX Zone contribution

at http://affiliatesexcel.com and everything works great.

 

Many thanks for this great software package

and all the contributions which have enhanced the product.

 

However there is FUNDAMENTAL issue I am not able to solve.

 

Though the site is multicurrency, in real terms the selling prices

cannot be set by a ratio because of tax, custom duty, transportation

and local shipping etc which determine the final price based on the

source of the product.

 

For example I source products in the US and sell in Europe so the

price to european customers for the same product needs to be higher

than for the US customers.

 

So it is necessary to link the prices to the Location of the CUSTOMER

As this is a cataloge the only way to do is to force a direct relation

between the CURRENCY and customer shipping location.

For example a UK based customer can only Pay in GBP, a US customer

in USD etc

 

This contribution alrady identifies the country of the customer

and assignes the right type of tax at the check out.

 

I wonder if the same CODE ogiccannot be applied for

changing the currency accoording to the ZONE

The tax Zones I use are UK, (?) Europe (EURO) Rest of the world (USD)

 

I would appreciate If you can help me to implement this or let me know

if there is way around already in OScommerce.

 

Many thanks

 

Sreedharan

Link to comment
Share on other sites

If someone could double-check my thinking here, I would appreciate it...

 

It seems that the tax zone that I have set (WA state) is not identified by ZIP code, rather by the statement of the state.

 

If the only input from ShipInCart is based on country and ZIP code, then the script can't know if a non-logged in customer is in the taxable zone and therefore can't correctly decide to show the tax.

 

If this is the case, has anyone adapted this mod to add a state dropdown, or is there something inherent in the ZIP code information (which I assume is pulled from the shipping modules) that would allow state identification based on ZIP code only?

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Hi Stuart,

 

It seems the the only information from the customer

logi in info used by the the SHIPIN Cart contribution

is the country code.

 

the TAX zones contribution sets up the zones

according to your choicre with countrycodes.

 

So presumably, the SHIPIN cart is using these two

to calculate and show the tax

 

This is my understanding , I hope I am right.

This is also the reason I think, it is possible to

change the chosen currency as well in this contribution.

 

I only hope I knew enough PHP to do that

Link to comment
Share on other sites

I did a dirty little hack that made it work.

 

1. I determined range of zip codes for Washington which looked like numbers from 98000 to 99999.

 

2. Then I added an if statement above this line

  if (CART_OT_SHOW == 'true'){

   // bof damned we need the taxes if not logged in ...

   if (!tep_session_is_registered('customer_id')){

     $products = $cart->get_products();

 

that changed code to this

 

  if ($cart_zip_code >= '98000'  && $cart_zip_code <= '99999') { $tax_zone_id = '62';

 }



 if (CART_OT_SHOW == 'true'){

   // bof damned we need the taxes if not logged in ...

   if (!tep_session_is_registered('customer_id')){

     $products = $cart->get_products();

 

3. Then I changed the following lines

        $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']);

       $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']);

 

to this

        $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$tax_zone_id);

       $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $tax_zone_id);

 

I did some quick testing and do not see any problems.

Link to comment
Share on other sites

Bob;

 

A million thanks!

 

That seems to do the trick (as you, I just did some quick testing, and all seems to be OK)

 

One note about the ZIP code range: I believe that WA stops at 99499 and Alaska starts at 99500

 

Reference:

http://www.acrhq.com/promos/zipstate.htm

 

Thanks again :wink:

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...