Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Location
    Midland TX
    Posts
    428
    Plugin Contributions
    0

    Default USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    @ajeh (since you provided the code for me)

    Have I done this correctly or do I have lines in the wrong place?

    // USPS_2014_0907_K5
    // ADDITIONAL CUSTOMIZED CONDITIONS CAN GO HERE TO MANAGE $type_rebuilt or $title on $methods
    // ************* START MODIFICATION USPS *****************

    // if quoted cost is lower than flat rate module cost, mark up the cost to equal flat rate
    $quoted_cost = ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes;
    $adjusted_cost = ($quoted_cost < MODULE_SHIPPING_FLAT_COST ? MODULE_SHIPPING_FLAT_COST : $quoted_cost);

    // switch comment marks to show $hiddenCost: from quote title
    //$show_hiddenCost = ' $hiddenCost: ' . $hiddenCost;
    $show_hiddenCost = '';

    $methods[] = array('id' => $type_rebuilt,
    'title' => $title . $show_hiddenCost,
    'cost' => $adjusted_cost);

    // ************* END MODIFICATION *****************


    Thanks

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

    Default Re: USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    The $cost is computed on line 557 ...

    So you could use:
    Code:
    $quoted_cost = $cost;
    You do not need to recalculate that ...
    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
    Apr 2006
    Location
    Midland TX
    Posts
    428
    Plugin Contributions
    0

    Default Re: USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    I am not understanding. Would you show what to leave out and where to put $quoted_cost = $cost;
    What is this $show_hiddenCost = ''; do or for

    Thank you,
    Larry Penny

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

    Default Re: USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    Try using:
    Code:
    // USPS_2014_0907_K5
    // ADDITIONAL CUSTOMIZED CONDITIONS CAN GO HERE TO MANAGE $type_rebuilt or $title on $methods
    // ************* START MODIFICATION USPS *****************
    
    // if quoted cost is lower than flat rate module cost, mark up the cost to equal flat rate
    $quoted_cost = $cost;
    $adjusted_cost = ($quoted_cost < MODULE_SHIPPING_FLAT_COST ? MODULE_SHIPPING_FLAT_COST : $quoted_cost);
    
    // switch comment marks to show $hiddenCost: from quote title
    //$show_hiddenCost = ' $hiddenCost: ' . $hiddenCost;
    $show_hiddenCost = '';
    
    $methods[] = array('id' => $type_rebuilt,
    'title' => $title . $show_hiddenCost,
    'cost' => $adjusted_cost);
    
    // ************* END MODIFICATION *****************
    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!

  5. #5
    Join Date
    Apr 2006
    Location
    Midland TX
    Posts
    428
    Plugin Contributions
    0

    Default Re: USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    That was quick. Now I follow what you were saying.

    Thanks a lot,

    Larry

  6. #6
    Join Date
    Apr 2006
    Location
    Midland TX
    Posts
    428
    Plugin Contributions
    0

    Default Re: USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    Works perfect -- Thank you very much


    Quote Originally Posted by Ajeh View Post
    Try using:
    Code:
    // USPS_2014_0907_K5
    // ADDITIONAL CUSTOMIZED CONDITIONS CAN GO HERE TO MANAGE $type_rebuilt or $title on $methods
    // ************* START MODIFICATION USPS *****************
    
    // if quoted cost is lower than flat rate module cost, mark up the cost to equal flat rate
    $quoted_cost = $cost;
    $adjusted_cost = ($quoted_cost < MODULE_SHIPPING_FLAT_COST ? MODULE_SHIPPING_FLAT_COST : $quoted_cost);
    
    // switch comment marks to show $hiddenCost: from quote title
    //$show_hiddenCost = ' $hiddenCost: ' . $hiddenCost;
    $show_hiddenCost = '';
    
    $methods[] = array('id' => $type_rebuilt,
    'title' => $title . $show_hiddenCost,
    'cost' => $adjusted_cost);
    
    // ************* END MODIFICATION *****************

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

    Default Re: USPS_2014_0907_K5--// if quoted cost is lower than flat rate module cost

    You are most welcome ... Thanks for the update that this is working for you ...
    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. v139e Combine Flat Rate shipping and shipping cost based on weight
    By dang in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 13 Nov 2012, 05:45 PM
  2. Multiple zone/flat rate and added cost per pound?
    By AmyCapolupo in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 14 Jul 2011, 09:21 AM
  3. I want both Shipping cost by weight and flat rate
    By AmazingGraze in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 8 Apr 2010, 03:34 PM
  4. Shipping - Different Flat Rate Freight Cost For Each Item
    By Donn in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 1 May 2009, 03:06 PM
  5. USPS rates calculated are lower than actual cost of shipping
    By CartCrazy in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 10 Feb 2009, 08:02 PM

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