close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding German shipping for European countries, even though shipping is set to 0.00

Thread began 1/20/2020 10:25 am by Roxana | Last modified 1/20/2020 3:34 pm by Ray Borduin | 136 views | 9 replies |

Roxana

Adding German shipping for European countries, even though shipping is set to 0.00

Since updating to MSQLi, the cart description does not recognize customers from Europe.

Europe is set to 0.00 for shipping rate, but the cart will add German shipping rate and include it in the tax calculation and total for customer from Europe. Apparently it does not recognize customers as being from the European Union. Before the upgrade to MSQLi this wasn't a problem.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like german shipping is added when there is a value set for $_SESSION['germanShipping'] and $_SESSION['mylocation'] is set to "not canada".

So my guess is that the issue is on the page where $_SESSION['germanShipping'] is being set and that you have to make sure that value is properly cleared or at least not set when someone is from another area.

Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

This is the code on the confirm page:

<?php if(isset($_SESSION['germanShipping']) && $_SESSION['germanShipping'] != ""){ 
$_SESSION['germanShipping'] == $_SESSION['euroShipping'];
}
?>
Sign in to reply to this post

Ray BorduinWebAssist

There has to be other code. The code you sent would set the german shipping value to the euro shipping amount if there is a value for german shipping set already. There has to be other code that sets the german shipping to begin with.

Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

This is on the cart page:

<?php
$_SESSION['germanShipping'] = on;
?>
Sign in to reply to this post

Ray BorduinWebAssist

How can you detect if someone is actually from Germany and you want German shipping applied?

It looks like it is automatically set to on and then automatically set to the european amount. I can't see how you could tell if someone is actually from Germany. Is there another session value you could use?

Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

When the customer enters their shipping address on the checkout page, they are redirected to confirm_germany, confirm_europe, confirm_international or confirm_canada depending on the shipping entry.

international has no shipping (so that works), and Canada has a higher amount for shipping (that works too). Just European shipping does not work.

Sign in to reply to this post

Roxana

I think I got it wrong. It is not the user entry, it is their location. With this code:

<?php
//Redirect to confirm.php if shipping_country is Germany
if($rseurope->getColumnVal('is_European') == 2){
header("Location: confirm_germany.php");
}
elseif($rseurope->getColumnVal('is_European') == 1){
header("Location: confirm_europe.php");
}
elseif($rseurope->getColumnVal('is_European') == 3){
header("Location: confirm_canada.php");
}
?>
Sign in to reply to this post

Ray BorduinWebAssist

On segufix_PHP.php line 117 you have:

php:
if (true && ((isset($_SESSION['germanShipping']) && ((isset($_SESSION['mylocation'])?$_SESSION['mylocation']:"") == "not_canada")))) {



I think this might work:

php:
if (true && ($_SESSION['languageID'] == 1)) {



maybe this:

php:
if (true && ($_SESSION["eCartCheckoutForm_shipping_country"] == "DE")) {
Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

OK, I got it to work. The language setting is not used to determine location (e. g. Austria is European Union, but German is the language), and shipping entries are one of four languages.

Instead building on what you mentioned before, I unset the germanShipping session and enabled euroShipping. It works now. What baffles me is, that it has worked for many years without the change.

<?php
unset($_SESSION['germanShipping']);
?>
<?php
$_SESSION['euroShipping'] = on;
?>



Thank you :)

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...