If this is your first visit, check our documentation. To post, register or login.

Configuring Shipping Problem

Started by panosx13 on 15 May 2013, 9:29 PM · Views: 1,923

Results 1 to 20 of 27
15 May 2013, 9:29 PM
#1
panosx13 avatar

panosx13

New Zenner

Join Date:
Feb 2013
Posts:
11
Plugin Contributions:
0

Configuring Shipping Problem

Hello,

I would like to ask you something,

I want to configure shipping like the above

for zone 1 if the items weight is 5kgs and above the cost is 10 euro
for each extra Kg over the 5Kg it should be added a cost of 2 euro per 1Kg.

and
for zone 2 if the items weight is 5kgs and above the cost is 16 euro
for each extra Kg over the 5Kg it should be added a cost of 3 euro per 1Kg.

Any suggestions on how I can configure this in zen cart?

Thanks in advance

16 May 2013, 7:56 PM
#3
panosx13 avatar

panosx13

New Zenner

Join Date:
Feb 2013
Posts:
11
Plugin Contributions:
0

Re: Configuring Shipping Problem

kobra:

You will first need to setup zones that contain your countries - this may help
http://www.zen-cart.com/content.php?308-prepared-zone-definitions
Then use the zones shipping module
http://www.zen-cart.com/content.php?111-how-do-i-set-up-the-zones-shipping-module

My problem with that module is that I have to use a maximum weight value.

Also I have to add manual for each extra kilo the extra cost.

Is there any other module that I can use for doing that?

16 May 2013, 9:25 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

This could be done with a bit of custom coding ...

Edit the file:
/includes/modules/shipping/zones.php

and add the code in RED:

[B]// bof: add additional charge to Zones      
//echo '<br>ZONE $dest_zone: ' . $dest_zone . ' $shipping_cost: ' . $shipping_cost . '<br>';  
if ($dest_zone == 1) {
    if ($shipping_weight > 5) {
        $additional = ($shipping_weight - 5) * 2;
        $shipping_cost += $additional;        
    }
//echo '$additional: ' . $additional . '<br>';    
}

if ($dest_zone == 2) {
    if ($shipping_weight > 5) {
        $additional = ($shipping_weight - 5) * 3;
        $shipping_cost += $additional;        
    }
//echo '$additional: ' . $additional . '<br>';    
}
// eof: add additional charge to Zones      
[/B]
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => $shipping_method,
                                                     'cost' => $shipping_cost)));

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 7:51 PM
#5
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

Hi there, first of all sorry if this is not the right place to post my problem, I couldn't find anywhere else.
I've got a problem with setting up a certain value for a certain zone, using freeoptions shipping module. The zones and zones definitions are properly configured.
For example, I need to set up 5$ shipping cost only for Bucharest.
I was trying to complete an order using my account (with address in Bucharest) but freeoptions didn't appeared and I thought that maybe I missed something with zones setup.
What I noticed is that everything works great if I add a NEW address, with Bucharest shipping address.
So I guess it is a problem with recognizing the existing shipping addresses, that customers already introduced into their account.
For new customers, there should be no problem, as they will create a new address, but what am I doing with my existing customers?
Any idea how I can "refresh" the zones?

13 Jun 2013, 8:01 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

What are you using in your Zone Definition on the DETAILS?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 8:08 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

Also, can you give an example of an address for Bucharest that is NOT work ... and an address for Bucharest that IS working?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 8:15 PM
#8
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

On Zone Definition I have Country - Romania, Zone - Bucuresti.
Also, I guess I was not explicite enough, it doesn't matter what customer writes in the address field, I was talking about the State field.
My old shipping address: State (zone) - Bucuresti - not working
My new shipping address: State (zone) - Bucuresti - working.

13 Jun 2013, 8:21 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

If you look in the table:
address_book

and pull the records for the address that works and compare the records for the address that does not work what do you see for:
entry_country_id
entry_zone_id

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 8:31 PM
#10
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

working: country id - 175, zone id - 190
not working: country id - 175, zone id - 0

13 Jun 2013, 8:38 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

The old addresses are missing the zone_id so it doesn't work ...

What happens if in phpMyAdmin you search the address_book for:
entry_country_id = 175

How many have a missing zone_id in them?

Did you add Zones for Romania at some point?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 8:52 PM
#12
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

Yes, I added the zones today... So almost all customers have 0 in zone_id field..

13 Jun 2013, 8:59 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

You will need to fix those then so that any Romania address is using its correct zone_id in the Address Book ...

How many Zones do you have for Romania?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 9:02 PM
#14
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

There are 41 zones.

13 Jun 2013, 9:06 PM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

Just for Romania?

That would take a bit of clean up ...

Currently, in the table:
address_book

do you notice if all of the:
entry_state

are set to:
Bucharest

on those addresses that should be using Bucharest and the zone_id of 190?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jun 2013, 9:34 PM
#16
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

It's strange. The old address (Test) appears in correct fields - city with city, state with state. Except zone - 0.
But for the new addresses, no information in entry_state, but the code is correct.

entry_firstname entry_street_address entry_city entry_state entry_country_id entry_zone_id
Test Chisinau 75 Bucuresti Bucuresti 175 0
test2 street2 Campulung 175 191
test1 street1 Castellon 195 144
test4 street4 Arad 175 193
test3 street3 Bucuresti 175 190

13 Jun 2013, 9:52 PM
#17
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

I attached a printscreen

Attachment 12656

13 Jun 2013, 10:29 PM
#18
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

Sorry, I just saw your last message.

No, not all addresses that should be using Bucharest and the zone_id of 190 actually have on entry_state "Bucuresti".

I exported a csv file, filtered and edited all the addresses from Bucharest, replacing zone_id with 190.

If I will upload the file, should it work? Should I modify anything else?
I hope I will not brake anything, it's the first time I deal with phpmyadmin.

14 Jun 2013, 1:18 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Configuring Shipping Problem

In theory you should be able to export the whole address_book and fix the missing zone_id for each of the zone_id set to 0 ...

1 Backup your database first

2 Backup the address_book separately so that you can empty it and re-import it

3 When you fill in the correct zone_id you can empty the entry_state as that is managed by the entry_country_id entry_zone_id combination

Once you import the address_book you should be able to edit the customer in the admin or, if you have Master Password encrypted install then login as the customer and test the address(es) for that customer ...

NOTE: Take the site Down for Maintenance while doing these changes to be safe

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Jun 2013, 12:12 PM
#20
mnitescu avatar

mnitescu

New Zenner

Join Date:
Dec 2011
Location:
Romania
Posts:
16
Plugin Contributions:
0

Re: Configuring Shipping Problem

Ok, I have followed all the steps you mentioned - backup database (sql) and address_book (sql)

Then I exported address_book in csv format to be able to fill the zone_id column with right values.
I completed all the files, opened in notepad, saved as CSV file in UTF-8 format.

When I tried to import it, I got the following error:
#1062 - Duplicate entry '2209' for key 'PRIMARY'

What am I doing wrong?

Thank you!