Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Shipping To: iso_code_2 for perweightunit clone

    Having cloned a number of copies of the perweightunit module for various zones, I would quite like to have the 'Shipping to [iso_code_2]' from the Zones module, display instead of 'Best Way' in perweightunit.

    Changing the language file is obviously simple but incorporating the code for producing the iso_code_2 from zones.php into perweightunitclone.php looks to me as pretty complicated.

    So if, it's been done before or doesn't involve too much work on 'your' part then it would be good to know how.

    Cheers

    Simon

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping To: iso_code_2 for perweightunit clone

    You could customize the file:
    /includes/modules/shipping/perweightunit.php

    or whatever clone you are on ...

    with the code in RED:
    Code:
      function quote($method = '') {
        global $order, $shipping_weight, $shipping_num_boxes;
    
    // bof: destination iso_code_2
        $dest_country = '[ ' . $order->delivery['country']['iso_code_2'] . ' ]';
    
        $total_weight_units = $shipping_weight;
        $this->quotes = array('id' => $this->code,
                              'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                              'methods' => array(array('id' => $this->code,
                                                       'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY . $dest_country,
                                                       'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                                       (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));
    // eof: destination iso_code_2
    
    Then edit the language file for:
    Code:
      define('MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY', 'Ship To ');
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Re: Shipping To: iso_code_2 for perweightunit clone

    Thank you Linda, that's great - tidied things up, nicely.

    Cheers

    Simon

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping To: iso_code_2 for perweightunit clone

    You are most welcome ... thanks for the update that this was what your were needing ...
    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: v1.5.5]
    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!

 

 

Similar Threads

  1. v151 perweightunit Shipping Module, different shipping prices for different quantities
    By kelley777 in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 29 Aug 2013, 06:09 PM
  2. Shipping - Table clone for all the rest
    By dkervin in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 30 Nov 2010, 06:42 PM
  3. perweightunit shipping
    By codrakon in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 10 Jun 2010, 02:47 PM
  4. Need Per Unit perweightunit shipping to appear ONLY for items OVER certain weight
    By Donn in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 8 May 2009, 05:04 PM
  5. Shipping estimate for perweightunit module
    By neteasy in forum Bug Reports
    Replies: 1
    Last Post: 20 Sep 2007, 05:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR