Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

UK Zones


kioni2005

Recommended Posts

When a UK customer tries to Buy a Product it tells them that shipping is unavailable, ive not added any UK Zones as i thought that the Attributes ive used for each item would be fine. Am i right in thinking that i have to add every zone in the UK? Attributes i have used are UK free shipping and International at a set price makes life a bit easier than trying to find all UK Zones even though i live in the UK it would be hard trying to find all the UK Zones.

Any Ideas?

Link to comment
Share on other sites

It sounds more like you have not installed a shipping module that is available for the order's delivery address.

 

If you want UK zones there are several add-ons for them.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

It doesn’t make sense i set up Attributes to avoid the complication of installing a Shipping Module, if i install a shipping module will the Attributes not be a waste of time? i looked at the royal mail mod but to be honest way above my capabilities. i was running 2.3.3.4 and wiped my site trying to upgrade to 2.3.4 and had to start over i have already spent 3 months and i am no where near complete, if i try setting up a shipping mod i might wreck my site again. i tried adding Zones for UK there are so many its a months work just for post codes. i could say i am pulling my hair out here but i dont have much of that either :)

Link to comment
Share on other sites

 i didnt mention that ive got paypal express installed, and when i checked that the attributes are adding up in check out the total works fine etc, when either UK free shipping or international is selected. So if i install the royal mail add on will i then have to use the product weights & remove attributes ive created for all the products? and do i have to have an SSL Certificate for the site for any of this to run if customers are using paypal express.

 

HTH? G? no idea what that means

Link to comment
Share on other sites

UK zones would be counties not postcode areas surely. If you want to use postcodes as an area, they are thousands of them. Even using just the first two letters of the postcodes will produce a huge list.

 

The royal mail addon is a really simple install. Once you have copied all the files to the correct folder on your site, its just a case of installing the module in your admin area buy clicking the install button. The modules are based on weight. If you have not included any weight into any of your products, then it will give a zero shipping cost as there is no weight regardless of what shipping option is available. You can just use the1st or 2nd class options and airmail with a fixed cost for both services. If you then want to charge for areas like the highlands of Scotland, you may have to figure something else out. You will have to alter the shipping costs in what ever RM option you use, which is very simple to do. There is also a simple addon that will bypass the shipping option if there is no weight of an order.

 

If you are storing any personal information of the customers in your database then you really should have an SSL certificate. This will give your customers peace of mind and show that you care about the security of the information they enter. An SSL is not expensive to buy for the year. Some payment modules require you to have an SSL. Your payment provider will tell you if they are required. If you are also PCI DSS compliant you may have to have one also.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

David, what exactly are you trying to accomplish here? Normally, product attributes are for things like colors and sizes, and have nothing to do with shipping. Possibly you could do something with attributes to control availability or restrictions on shipping for certain locations, but you still need at least one properly configured shipping method. The shipping method, not attributes, would be used to charge different amounts per weight/size and distance.

Link to comment
Share on other sites

My products are from 100gram to anything up to 35kg, and are sent anywhere UK and worldwide except for Russia, i set up attributes to add the shipping cost as the shipping modules that come with OS didn't suit. i much prefer to add the weight of the product and let a customer choose there own shipping, I want to allow free UK shipping on some products as it attracts buyers, also it is rare they will buy 1 product most buy more and will want to combine postage by weight. But i have 2 types of customers, retail and trade. Trade will not always want to pay Royal Mail as some couriers are lower costs but for now retail are more important. i downloaded the royal mail add on there were 2 files one i opened with Libra office as i am using Ubuntu, opened as an xls if i try editing the string it brings up mumbo jumbo to me so i cant edit the files and have no idea what i am doing anyway. I read for hours and i came up with the well maybe its Zones. So set about using postcodes and as steve says there are thousands, infact the royal mail down load on csv i stopped the download at 60mb when i realized it was a 650mb file and started typing all the postcodes eg dn1, 2,3,4,5,6 i must have added 500 maybe more and it would take weeks to finish them. OS should use customer account address details and populate its own zone list as it goes, that way we wouldnt have to mess about with creating any Zones at all.

Link to comment
Share on other sites

So, you want to offer several shipping methods, some with rates based on weight and distance, and perhaps others flat rate, and in some cases, free shipping or reduced shipping (multiple items). That's not something that product attributes was designed for -- you're trying to drive in a nail with a Phillipe Patek watch. I would start over with several shipping modules, perhaps adding more over time as you get each one working. Some may have to be modified or extended to do what you want. Be sure to carefully check for existing add-ons to handle some of these (free shipping, reduced shipping).

Link to comment
Share on other sites

below is one of the downloads i was able to edit and shows in shipping under module. but is a php file 

 

<?php
/*   $Id: Royal Mail First Class Standard by Stuart Newton 21 August 2006
     Demo: http://www.almatcomputers.co.uk
     Rates: .1:1,.25:1.27,.5:1.7,.75:2.2,1:2.7,1.25:4.74,1.5:5.59,1.75:6.44,2:7.29,2.25:8.14,2.5:8.99,2.75:9.84,3:10.69
     Limits Applied: 3.00Kg orders over this value will not be shown this method.
*/
 
/*    
   Release date:  29th of May 2009
   Modified contribution by: Alexander Dimelow
   Email: customer.service@@web-project.co.uk
   Website: http://oscommerce.web-project.co.uk
*/
 
  class rmfirst {
    var $code, $title, $description, $enabled, $num_zones;
 
// class constructor
    function rmfirst() {
    global $order, $total_weight;
      $this->code = 'rmfirst';
      $this->title = MODULE_SHIPPING_RMFIRST_TEXT_TITLE;
      $this->description = MODULE_SHIPPING_RMFIRST_TEXT_DESCRIPTION;
      $this->sort_order = MODULE_SHIPPING_RMFIRST_SORT_ORDER;
      $this->icon = DIR_WS_ICONS . 'shipping_rmuk.jpg'; // upload icon to catalog/images/icon directory
      $this->tax_class = MODULE_SHIPPING_RMFIRST_TAX_CLASS;
      $this->enabled = ((MODULE_SHIPPING_RMFIRST_STATUS == 'True') ? true : false);
      $this->num_zones = 1;
       
         if ($total_weight > 3) {         // If total ship weight is over 3.00Kg do not show this shipping method
              $this->enabled = false;    // Anything over 3Kg its not economically wise to use this method
         }                                 // To remove this 3.00Kg limit, simply delete these 3 lines.
            
    }
 
// class methods
    function quote($method = '') {
    global $cart, $order, $shipping_weight, $shipping_num_boxes;
      $dest_country = $order->delivery['country']['iso_code_2'];
      $dest_zone = 0;
      $error = false;
          if ($order->delivery['country']['iso_code_2'] == 'GB')  {  // Only UK Customers to see shipping method. Hide everbody else.
          for ($i=1; $i<=$this->num_zones; $i++) {
          $countries_table = constant('MODULE_SHIPPING_RMFIRST_COUNTRIES_' . $i);
          $country_zones = split("[,]", $countries_table);
          if (in_array($dest_country, $country_zones)) {
            $dest_zone = $i;
            break;
          }
        }
 
      if ($dest_zone == 0) {
        $error = true;
      } else {
        $shipping = -1;
        $zones_cost = constant('MODULE_SHIPPING_RMFIRST_COST_' . $dest_zone);
 
        $zones_table = split("[:,]" , $zones_cost);
        $size = sizeof($zones_table);
        for ($i=0; $i<$size; $i+=2) {
          if ($shipping_weight <= $zones_table[$i]) {
            $shipping = $zones_table[$i+1];
            if(tep_not_null($method) )
            // Text shown on Checkout_Confirmation
            $shipping_method = ''; // Leaving this entry blank causes only the shipping title to show i.e Royal Mail 1st Class Std        
            else
            // Text shown on Checkout_shipping -  Delivery Weight : 0.7 Kg's (Ships normally within 1 to 3 days)
            $shipping_method = MODULE_SHIPPING_RMFIRST_TEXT_WAY . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_RMFIRST_TEXT_UNITS . ' ' . MODULE_SHIPPING_RMFIRST_DELIVERY_TIMES;  
            break;
          }
        }
 
        if ($shipping == -1) {
          $shipping_cost = 0;
          $shipping_method = MODULE_SHIPPING_RMFIRST_UNDEFINED_RATE;
        } else {
          $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_RMFIRST_HANDLING_' . $dest_zone);
        }
      }
 
  //extra
       
            $cats_array = explode(',',MODULE_SHIPPING_RMFIRST_PER_CATS_CATEGORIES);
            $cat_names = '';
            
            for($i=0, $x=sizeof($cats_array); $i<$x; $i++){
                 $cats_array[$i] = (int)$cats_array[$i];
           $cat_names .= tep_get_categories_name($cats_array[$i]).', ';
            }
            
            $cat_names = substr($cat_names, 0,-2);
 
             $pID_list = $cart->get_product_id_list();
 
             $pID_list = explode(',',$pID_list);
                for($i=0, $x=sizeof($pID_list); $i<$x; $i++){
                     $pID_list[$i] = (int)$pID_list[$i];
                }
                $pID_list = implode(',',$pID_list);
 
             if (MODULE_SHIPPING_RMFIRST_PER_CATS_ALL_OR_ONE == 'One'){
                  $products = $cart->get_products();
                        for($i=0, $x=sizeof($products); $i<$x; $i++){
                                        $check_query = tep_db_query('select * from '.TABLE_PRODUCTS_TO_CATEGORIES.' where categories_id in ('.implode(',',$cats_array).') and products_id="'.(int)$products[$i]['id'].'"');
                                        if (tep_db_num_rows($check_query))
                                          $enable_rates = 1;
                        }
             } elseif (MODULE_SHIPPING_RMFIRST_PER_CATS_ALL_OR_ONE == 'All'){
                     $count = 0;
                    for($i=0, $x=sizeof($cats_array); $i<$x; $i++){
                                        $check_query = tep_db_query('select * from '.TABLE_PRODUCTS_TO_CATEGORIES.' where categories_id="'.$cats_array[$i].'" and products_id in ('.$pID_list.')');
                                        if (tep_db_num_rows($check_query))
                                                $count++;
                    }
                    if ($count == sizeof($cats_array))
                                          $enable_rates = 1;
             } else {
               $this->enabled = false;
               return false;
             }
 
             if ( MODULE_SHIPPING_RMFIRST_PER_CATS_ONLY_OR_ANY == 'Only' ){
                    $check_query = tep_db_query('select * from '.TABLE_PRODUCTS_TO_CATEGORIES.' where categories_id not in ('.MODULE_SHIPPING_RMFIRST_PER_CATS_CATEGORIES.') and products_id in ('.$pID_list.')');
              if (tep_db_num_rows($check_query))
                                          $enable_rates = 0;
             }
                
      //end extra
       
     if($enable_rates==1){
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_RMFIRST_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => $shipping_method,
                                                     'cost' => $shipping_cost)));
 
      if ($this->tax_class > 0) {
        $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
      }
 
      if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);
 
      if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_RMFIRST_INVALID_ZONE;
 
      return $this->quotes;
    }
    }}
 
    function check() {
      if (!isset($this->_check)) {
        $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_RMFIRST_STATUS'");
        $this->_check = tep_db_num_rows($check_query);
      }
      return $this->_check;
    }
 
    function install() {
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable RM First Class Postage', 'MODULE_SHIPPING_RMFIRST_STATUS', 'True', 'Do you want to offer this shipping option?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_RMFIRST_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
       
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_RMFIRST_SORT_ORDER', '1', 'Sort order of display (1 shown first 99 etc shown last to customer)', '6', '0', now())");
       
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Categories List', 'MODULE_SHIPPING_RMFIRST_PER_CATS_CATEGORIES', '', 'For what categories do you want to offer shipping?<br />NOTE! not recurcive - select all subcategories if you need it.', '6', '0', 'tep_cfg_show_multicategories', 'tep_cfg_select_multicategories(', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('All or One', 'MODULE_SHIPPING_RMFIRST_PER_CATS_ALL_OR_ONE', 'All', 'Do you want to offer a shipping for orders with products from all mentioned categories, or with at least from one of them?', '6', '0', 'tep_cfg_select_option(array(\'All\', \'One\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Only or Any', 'MODULE_SHIPPING_RMFIRST_PER_CATS_ONLY_OR_ANY', 'Only', 'Do you want to offer a shipping for orders with products only from mentioned categories, or with products from any categories (including mentioned)?', '6', '0', 'tep_cfg_select_option(array(\'Only\', \'Any\'), ', now())");
       
      for ($i = 1; $i <= $this->num_zones; $i++) {
        $default_countries = '';
        if ($i == 1) {
          $default_countries = 'GB';
        }
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('ISO Country Code', 'MODULE_SHIPPING_RMFIRST_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Enter the two digit ISO code for which this shipping method applies too. (Default: GB)', '6', '0', now())");
       
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RM First Class Rates', 'MODULE_SHIPPING_RMFIRST_COST_" . $i ."', '.1:1,.25:1.4,.5:1.8,.75:2.7,1:3.7,1.25:4.74,1.5:5.59,1.75:6.44,2:8.90,2.25:9.14,2.5:9.99,2.75:10.84,3:11.69', 'Enter values upto 5,2 decimal places. (12345.67) Example: .1:1,.25:1.27 - Weights less than or equal to 0.1Kg would cost \A31.00, Weights less than or equal to 0.25g but more than 0.1Kg will cost \A31.27. Do not enter KG or \A3 symbols.', '6', '0', now())");
        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packaging / Handling Fee', 'MODULE_SHIPPING_RMFIRST_HANDLING_" . $i."', '0', 'If you want to add extra costs to customers for jiffy bags etc, the cost can be entered below (eg enter 1.50 for a value of \A31.50)', '6', '0', now())");
      }
    }
 
    function remove() {
      tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
    }
 
    function keys() {
      $keys = array('MODULE_SHIPPING_RMFIRST_STATUS', 'MODULE_SHIPPING_RMFIRST_TAX_CLASS', 'MODULE_SHIPPING_RMFIRST_SORT_ORDER', 'MODULE_SHIPPING_RMFIRST_PER_CATS_CATEGORIES', 'MODULE_SHIPPING_RMFIRST_PER_CATS_ALL_OR_ONE', 'MODULE_SHIPPING_RMFIRST_PER_CATS_ONLY_OR_ANY');
 
      for ($i=1; $i<=$this->num_zones; $i++) {
        $keys[] = 'MODULE_SHIPPING_RMFIRST_COUNTRIES_' . $i;
        $keys[] = 'MODULE_SHIPPING_RMFIRST_COST_' . $i;
        $keys[] = 'MODULE_SHIPPING_RMFIRST_HANDLING_' . $i;
      }
 
      return $keys;
    }
  }
?>

Link to comment
Share on other sites

Use the following addon http://addons.oscommerce.com/info/4473

 

Warning - If you are using the very latest version of oscommerce some alterations may be needed to these files, but they are minor.

 

Save the files to your computer and open them and find the file named readme. Read that file and follow the instructions.

 

Once you have completed the install go to your websites admin area and click on admin - modules- shipping and then locate the install module button. Click on that and you will have a list of modules that can be installed. Click the ones you wish to install.

 

You will need to update any prices to match what you are wanting to offer.

 

I am very suprised by looking at this addon that to date no one has updated it so it can be used on the latest version and also bootstrap. I will look into this over time as I need it for my new site, but it will take a while as there are more important files to do first.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

ive looked at these it down loads 2 files 1 xls and 1 ods and i had a lot of trouble editing them when i finally managed to edit one and posted it to my site it did nothing, there was nothing different in shipping. also what format are they sent to site? xls? XLS is what i sent them to site as. the info on the download says theres an image with the download but there wasnt. at least the file ive posted shows in shipping even if it doesnt work.  

Link to comment
Share on other sites

You are looking at the update files not the full package. XLS files are just spreadsheets that contain the price increases. That is why I directed you to specific files to be downloaded. It contains all the php files, instructions and the images and is a full package.

 

I forgot to mention that you need to click on the history tab of the download to get to the files. Sorry.

 

This addon is a simple 5 - 10 minute install including copying the files to your server, so its not hard in any way, shape or form. It may take a while to get the prices right bit its not rocket science to do. I could even send you the lists that I currently use.

Edited by 14steve14

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

OMG ive spent 24 hours trying to sort this to find ive downloaded the wrong files in the first place i took them from the top anyway finally getting somewhere, trying an order shows first & second class in order but

MODULE_SHIPPING_RMSECOND_TEXT_TITLE shipping_rmuk.jpg MODULE_SHIPPING_RMSECOND_UNDEFINED_RATE £0.00 MODULE_SHIPPING_RMFIRST_TEXT_TITLE shipping_rmuk.jpg MODULE_SHIPPING_RMFIRST_UNDEFINED_RATE

zero the cost and how do i change the test to first and second class & how come i am getting undefined rate i did add the weight to the item in product

 

Thanks steve much appreciated for pointing out the file i wanted was miles down the list shame there isnt a way to keep the download seperate from updates i had no idea being a newbie.

Edited by kioni2005
Link to comment
Share on other sites

right sorted the weight and it now charges correctly just the texts i need to change

 

MODULE_SHIPPING_RMSECOND_TEXT_TITLE

MODULE_SHIPPING_RMSECOND_TEXT_WAY : 0.1

MODULE_SHIPPING_RMSECOND_TEXT_UNITS

MODULE_SHIPPING_RMSECOND_DELIVERY_TIMES

 

also i need to increase img size

Link to comment
Share on other sites

The texts are in the includes/languages/modules/shipping/royalmail whatever your module is files.

 

If the text you have on your site is in capital letters and shows the definitions as you have them types in your last post, that means you have not copied the language files in the addon to the correct place on your server. Just check the files are in the correct place.

 

There may also be some other texts in the database, Be carefully when modifying these. Save a copy of your database first before going anywhere near the database.. They will be in the configuration database.

 

As you have never said which version of oscommerce you are installing this on, you may have to make a few minor modifications to the code to get it to work.

 

No idea how to actual ly specify a larger image size. You could try just enlarging the actual image supplied and upload it to your site, but I doubt that it would be that easy.

REMEMBER BACKUP, BACKUP AND BACKUP

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...