Post by speedimpex » Sun Sep 25, 2011 5:54 pm

I'm sorry to start a new topic but I got no response from my last submission, when I added it to the end of other questions. I'm trying to set up shipping costs for the UK only. But in this everything is the same cost, except for 3 remote areas. So anywhere with a postcode of HS (1 - 9) or ZE (1 - 3) (I can't find any region that would cover IM - Isle of Man postcodes - does anyone know?) needs to have an extra cost added. I've worked out how to add to the rates an additional charge for these areas (or I think I have), but when checking out, it is showing both costs, and you can choose the normal rate, or the remote area rate. How do I get it so that the shipping cost only shows once, based on the postcode you put in for where you are? So if e.g. you're postcode is HS1, it's showing 2 weight-based shipping costs. One is for HS1, which is more expensive, and the other is for UK shipping (which is the general charge). For those in the HS1 area, we don't want it to show the general charge, as they could select it. The other area we have is for free shipping. If you put this postcode in, it's showing the free shipping cost and the weight based cost. I think I've set it up wrong somewhere. Either I've put it in the wrong place. I've put 3 GeoZones in. Should I have set it up somewhere else. I've only done HS1 as I wanted to see how it worked, but I need to set up for the other 11 remote postcodes so that they have the same additional charges.
Many thanks, Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by grgr » Sun Sep 25, 2011 6:37 pm

I do a similar thing for weight based shipping:

I've edited ..catalog/model/shipping/weight.php

Code: Select all

		foreach ($query->rows as $result) {
			if ($this->config->get('weight_' . $result['geo_zone_id'] . '_status')) {
				$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$result['geo_zone_id'] . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");
			
				if ($query->num_rows) {
					$status = true;
				} else {
					$status = false;
				}
			} else {
				$status = false;
			}
		
#### this bit of code disables this module if the cart weight is under 40 units.
			
		    if ($this->cart->getWeight() < 40) {
                    $status = FALSE;
    }
#### End of code.
Not knowing exactly what you've done it's a little difficult to say but I guess you need to do something similar but with the geo zone instead?

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by speedimpex » Sun Sep 25, 2011 6:53 pm

I have enabled weight-based shipments, then when I edit it I have CH7, HS1 and UK Shipping as my 3 Geo Zones. For CH7 shipping is free. For UK shipping I have put the following in for my costs: - 1:2.75,2:3.49,5:4.99,10:5.95,15:6.99,16:9.74,17:10.48,20:11.98,21:12.94,22:15.39,25:16.89,26:19.64,27:20.38,30:21.88,9999999:1000.00
For HS1 I have put 1:2.75,2:3.49,5:4.99,10:5.95,15:6.99,16:11.40,17:12.14,20:13.64,21:14.60,22:17.05,25:18.55,26:21.30,27:22.04,30:23.54,9999999:1000.00 with a base cost of 1.66
If I put HS1 in as my postcode when checking out, I get 2 options. To pay the HS1 shipping costs or to pay the UK shipping costs. I don't want both of these to show. It should just show the HS1 info. I know it replies on people putting the correct County in as well, so they'd have to pick 'Western Isles'.
Many thanks
Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by grgr » Sun Sep 25, 2011 9:28 pm

I wager that you have the UK Shipping geo zone set to 'all zones'

Although a little tedious (there may be a quicker way but I don't know) you will have to specify all the different counties (zones) in the UK Shipping Geo Zone EXCEPT for Western Isles.

In the HS1 geo zone ONLY add the 'Western Isles' zone (county)

So now, if they select Western Isles, only the HS1 Geo Zone will show as Western Isles is excluded from the UK Shipping Geo Zone.

The Western Isles postcodes are HS1 through 9 and are commonly exclued/incur higher cost so I presume when you say HS1 you are infact refering to all of the HS postcodes (or 'Western Isles' as you put it).

If you have any other shipping methods that you need to exclude the western isles from then you can do that bit by using:

Code: Select all

					if ((int)$address['zone_id'] == 3609) {
		$status = false;
		}

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by Johnathan » Sun Sep 25, 2011 11:11 pm

It seems like you could use Formula-Based Shipping...that might save you some time if it would work for your set-up.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by speedimpex » Mon Sep 26, 2011 1:13 pm

thanks grgr and Jonathan. I'll have a play around. Yes I need to exclude HS1 - HS9 and ZE1 - ZE3. I only mentioned HS1 initially, as I wanted to test that first. Rather than set them all up and then realise I've done it wrong! Cheers, Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by speedimpex » Tue Sep 27, 2011 3:50 pm

Many thanks for your help. I have sorted it so that I have 1 geo zone that has all the counties except for the ones that cost extra for delivery, then I've got those in a separate geo zone.
Brill. Thanks again. Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by speedimpex » Sat Oct 08, 2011 6:18 pm

I have discovered something else that I hope someone can help with. For free shipping I only want it to be for 1 postcode. At the moment, the county determines whether it's free or not. Unfortunately the county is huge. Is there any way of restricting it to 1 specific postcode in that county? The county is Denbighshire. I only want to have free shipping if your postcode is CH7.
Many thanks
Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by grgr » Sat Oct 08, 2011 7:00 pm

I'd have thought the only way you're going to do that is putting something like an if (substr('$postcode', 0, 3) = CV7); into the free shipping module php file.

Only a guess though...

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by speedimpex » Sun Oct 09, 2011 12:46 am

I know I'm being extremely dim, but exactly which page would I find this in? You suggest the php for the shipping module, but I'm at a loss as to where ecactly that is. Is it under catalog\view\theme\default\ or is it somewhere else? I can see there's a few php files at the root of the upload folder, but should I be looking sonewhere else? What's the exact file structure of where I'm going?!? I can't seem to find something that references shipping, but I'm pretty certain it's just me :-) Many thanks. Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by grgr » Sun Oct 09, 2011 1:34 am

Look at the second post, substitue 'weight' for 'free'.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by speedimpex » Sat Oct 15, 2011 8:28 pm

SOLVEd. Many thanks for your help. I've edited the free shipping module to include the postcodes where I want free delivery. Thanks again. Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by visnetmedia » Mon Oct 31, 2011 11:55 am

Hi could you please tell me how you edited the free shipping - I have a few local postcodes that I want to have as free delivery and the rest to pay via weight based or zone based.
Thanks ...

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by KarenT » Wed Nov 02, 2011 10:11 pm

Hi All

I have a similar query.

We have a franchise that only covers certains areas of NW England. The whole of Merseyside and parts of West Lancs, Preston, Leyland, Chorley, Skem, Wigan, Ormskirk etc. We are therefore restricted to selling to our customers in these areas. The main bulk of our business is done face to face in offices etc. However a lot of customers have asked if they could order online and have their purchases delivered to them in the usual way, which is hand delivered. Therefore what I would like to achieve is to restrict people outside our allotted area being able to place an order.

I have already disabled all the Zones not applicable to us, but I need to further restrict the postcodes within the Lancashire area. Merseyside is not a problem as we have the whole of this area. Do I need to amend the free shipping file as note above and cite every postcode we will not deliver to? If so, as a newbie can you help?

I have amended the Free Shipping text to say "Deliver to Workplace", all other elements remain as is.

Hope you can help.

Thank you.

Karen

Newbie

Posts

Joined
Wed Oct 19, 2011 5:50 pm

Post by jojo27 » Fri Nov 04, 2011 7:34 pm

Hi,
We have a similar problem. We deliver loose hardwood logs in different quantities by volume. We deliver ourselves up to approx 30 mile radius but charge different rates, roughly in bands, the further we go. We then deliver by courier per pallet at a fixed fee to mainland UK (but this would be rare)

In the checkout we need to charge our customers for delivery depending how far away they are. Some postcodes straddle two of out bands as they are so large.

We found a company who could design us a clickable map so the customer can see the bands and click on their location so that the delivery charge would be placed into the basket but our web designer says it is not possible to marry up the clickable map with Opencart.

Getting desperate to sort this problem out as we may have to abandon Opencart if we cannot resolve this.
I personally am totally non-technical so I am trying to find a solution to pass on to our web designer.

Can anyone help??

Thanks

Newbie

Posts

Joined
Fri Nov 04, 2011 7:15 pm

Post by Johnathan » Fri Nov 04, 2011 8:59 pm

It's always possible to integrate some piece of technology with OpenCart -- it just depends on how much time you want to spend on it. Most likely, your web designer just doesn't want to spend the time doing it (or doesn't have the skills to).

If this is something you really want, you might try posting a request in the Commercial Support forum. You may be able to find someone interested in the job at a price you could afford.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by speedimpex » Sun Nov 06, 2011 6:27 pm

You can edit the catalog/model/shipping/free.php and the catalog/model/shipping/weight.php files, to put in the postcodes that you want free delivery to. I can post what I put in ours later. I'm not on the pc that has those files at the mo.
Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by KarenT » Tue Nov 08, 2011 6:01 pm

Hi Gill

That would be wonderful if you could. Much appreciated.

Thanks

Karen

Newbie

Posts

Joined
Wed Oct 19, 2011 5:50 pm

Post by speedimpex » Tue Nov 15, 2011 2:00 pm

Hi Karen
Here's what I put in the free.php (including the before and after bits so you can see the structure, and where it goes)

Code: Select all

<?php
class ModelShippingFree extends Model {
    function getQuote($address) {
        $this->load->language('shipping/free');

        if (strtoupper(substr($address['postcode'],0,3))=='CH5' || strtoupper(substr($address['postcode'],0,3))=='CH7' || strtoupper(substr($address['postcode'],0,3))=='CH6' )
            {
            $status = True;
            }        
        else
            {
            
                if ($this->config->get('free_status')) {
                    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('free_geo_zone_id') . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");

                    if (!$this->config->get('free_geo_zone_id')) {
                        $status = TRUE;
                    } elseif ($query->num_rows) {
                        $status = TRUE;
                    } else {
                        $status = FALSE; 
Here's what I put in the weight.php.

Code: Select all

<?php 
class ModelShippingWeight extends Model {
    public function getQuote($address) {
        $this->load->language('shipping/weight');
        
        $quote_data = array();
            if (strtoupper(substr($address['postcode'],0,3))!='CH5' && strtoupper(substr($address['postcode'],0,3))!='CH7' && strtoupper(substr($address['postcode'],0,3))!='CH6' )
            {
                if ($this->config->get('weight_status')) {
                    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name"); 
I hope this helps.
Gill
Last edited by Johnathan on Tue Nov 15, 2011 10:33 pm, edited 1 time in total.
Reason: Added [code] tags for readability

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am

Post by speedimpex » Wed Nov 30, 2011 10:29 pm

I have an addition to the questions I've already been asking. Is there a way to tie in the payment method with the weight? E.g. we want everything up to 2kg to go with Royal Mail, for which there is no VAT. Then for everything 2kg and over we want to use our courier, for which there is VAT on. I've got it set up in the shipping module, where it looks like you have to account for all your weights. So e.g. if I've put 1.5:3.50 it means anything up to 1.5 kg it costs 3.50. But is there a way you can set it so that it's from a specific weight, e.g. 2kg. Then I could add another shipping method to cover the below 2kg and no VAT. Although I've incorporated the prices into the weight, so that the no VAT is accounted for, when you go to checkout, it adds 20% VAT on for shipping. Which isn't strictly true. Although the price ends up being right. If that makes sense.

Many thanks
Gill

New member

Posts

Joined
Tue Jul 12, 2011 2:17 am
Who is online

Users browsing this forum: No registered users and 1 guest