Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    3
    Plugin Contributions
    0

    red flag UPSXML shipping discount

    I am using the UPSXML shipping module and need to discount all UPS shipping prices by 20%. We only ship 40 lb sacks of live crawfish overnight. The high shipping cost usually equals or exceeds the product cost, thus our shipping discount keeps our prices competitive. At the very least, I would like the price displayed in the shipping estimate to show the discounted shipping price before the customer initiates the checkout process.

    Ideally, I would like the shipping estimator to show:
    • the higher, original UPS shipping price,
    • our 20% discount,
    • and the new, discounted UPS shipping price.


    I tried to adjust the shipping cost by adding a negative fraction for the handling fee, but this didn't work; it only gave me a blank page during checkout

    From upsxml.php line 269:

    ORIGINAL-
    $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->(handling_fee * $cost) + $cost));

    CHANGED TO-
    $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->handling_fee + $cost));

    Example:

    UPS shipping cost is $100
    handling_fee is -0.2

    (handling_fee * $cost) + $cost)
    (-0.2 * $100) + $100)
    -20 + $100 = $80
    UPS shipping cost with discount is $80

    Maybe my php coding is incorrect.
    Other possible options include:
    • a permanent or default coupon without entering a coupon code,
    • a negative tare value,
    • or lowering the shipping weight (last resort)


    Viewed these threads while looking for answers:

    Can you give a % discount on the UPS shipping mod ?

    Handling Fee as Percentage?

    Adding Percentage Handling fee UPS

    Help a Cajun out, please.

  2. #2
    Join Date
    Apr 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: UPSXML shipping discount

    Oops, looks like I reversed the order of the code from line 269.
    CHANGED TO: is the ORIGINAL snippet and ORIGINAL: should be CHANGED TO.

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

    Default Re: UPSXML shipping discount

    IF this is the line you are using now, there is a typo:

    Code:
    $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->(handling_fee * $cost) + $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!

  4. #4
    Join Date
    Apr 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: UPSXML shipping discount

    Not sure I follow, what/where is the typo ? The part in red is the same as mine. Are you saying that is the invalid part ? If so, what do I change it to ? Kinda new to this and thanks for being patient.

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

    Default Re: UPSXML shipping discount

    I do not have a copy of your code but that part in red I am pretty certain would not be written as:
    $this->(
    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!

 

 

Similar Threads

  1. v155 UPSXML Breaking Shipping Estimator
    By llmcdonald in forum Addon Shipping Modules
    Replies: 4
    Last Post: 14 Jul 2016, 06:56 PM
  2. UPSXML Shipping Weight
    By Marooned in forum Addon Shipping Modules
    Replies: 1
    Last Post: 20 Feb 2015, 11:49 PM
  3. UPSXML - minimum shipping charge
    By gwolanin in forum Addon Shipping Modules
    Replies: 4
    Last Post: 12 Jan 2011, 09:33 PM
  4. UPSXML and FREE Shipping
    By buckit in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 1 Dec 2009, 09:58 PM
  5. UPSXML Quantity Discount wanted
    By rthomas79 in forum Addon Shipping Modules
    Replies: 1
    Last Post: 30 Jun 2008, 06:34 PM

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