Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default modify USPS module display text on checkout pages?

    I'm sure there is a way to do this, but I'm trying to launch an updated site in less than 3 days and frankly need to focus my attention elsewhere. What I'm trying to do is have the text on the checkout_payment page for the Shipping option selected say "Shipping:" no matter what option is selected. As it is now, if they select In-Store Pickup it says "Walk In" and if they pick USPS Priority Mail it says "United States Parcel Service (Parcel Post (4-7 days)):" which is really messing up the look I'm trying to achieve. I only want to modify this page, and leave the checkout_shipping page as is (where it would display the full text, delivery time, etc.). Does anyone have any suggestions on how I can achieve this?

    Thanks in advance!

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

    Default Re: How to modify USPS module display text on checkout pages?

    To change how this reads on the checkout_payment page only ... you can customize the code in:
    /includes/modules/order_total/ot_shipping.php

    with the code in RED:
    Code:
        function process() {
          global $order, $currencies;
    
    // bof: show different shipping title on checkout_payment
    if ($_GET['main_page'] == 'checkout_payment') {
            $this->output[] = array('title' => 'Shipping' . ':',
                                    'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                    'value' => $order->info['shipping_cost']);
    } else {
            $this->output[] = array('title' => $order->info['shipping_method'] . ':',
                                    'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                    'value' => $order->info['shipping_cost']);
    }
    // eof: show different shipping title on checkout_payment
        }
    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!

  3. #3
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default Re: How to modify USPS module display text on checkout pages?

    Thank you--this worked great!

    I found one more thing in the USPS module I have a question on: Is there a way to get rid of the ( ) around "Parcel Post" or "Priority Mail", etc? I only found the section with the ( ) around the transit time in modules/shipping/usps.php.

    Thanks again!



    Quote Originally Posted by Ajeh View Post
    To change how this reads on the checkout_payment page only ... you can customize the code in:
    /includes/modules/order_total/ot_shipping.php

    with the code in RED:
    Code:
        function process() {
          global $order, $currencies;
    
    // bof: show different shipping title on checkout_payment
    if ($_GET['main_page'] == 'checkout_payment') {
            $this->output[] = array('title' => 'Shipping' . ':',
                                    'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                    'value' => $order->info['shipping_cost']);
    } else {
            $this->output[] = array('title' => $order->info['shipping_method'] . ':',
                                    'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                    'value' => $order->info['shipping_cost']);
    }
    // eof: show different shipping title on checkout_payment
        }

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

    Default Re: How to modify USPS module display text on checkout pages?

    Look in the module:
    /includes/modules/shipping/usps.php

    and change the context of the two lines for:
    Code:
                if ($time != '') $transittime[$service] = ' (' . $time . ')';
    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!

  5. #5
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default Re: How to modify USPS module display text on checkout pages?

    Thanks, but that's not quite what I was looking for. I had already found that piece to adjust the ( ) around the transit days. I want to get rid of the ( ) around the whole shipping method:

    Instead of "USPS (Parcel Post [4-7 days])"

    I want "USPS Parcel Post [4-7 days]"

    In the line of code you referenced, that's where I changed the ( ) to [ ], but it does not get rid of the ( ) around the bigger element.

    Any thoughts?

    Thanks again for your help.



    Quote Originally Posted by Ajeh View Post
    Look in the module:
    /includes/modules/shipping/usps.php

    and change the context of the two lines for:
    Code:
                if ($time != '') $transittime[$service] = ' (' . $time . ')';

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

    Default Re: How to modify USPS module display text on checkout pages?

    Look in the file:
    /includes/modules/checkout_shipping/header_php.php

    Code:
                  $_SESSION['shipping'] = array('id' => $_SESSION['shipping'],
                                    'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
                                    'cost' => $quote[0]['methods'][0]['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!

  7. #7
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default Re: How to modify USPS module display text on checkout pages?

    Worked great! I used the same code on the flat-rate shipping module with a few tweaks and got it to switch between the two modules depending on weight. Thank you! You're a lifesaver

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

    Default Re: How to modify USPS module display text on checkout pages?

    You are most welcome ... thanks for the update that this is working for you ...

    Remember us when you are rich and famous!
    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. Text/image display question on attributes in the product info AND checkout pages
    By jeffmic in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 May 2010, 10:44 PM
  2. Replies: 2
    Last Post: 30 Sep 2009, 07:29 PM
  3. Q: How to add/modify text on various shopping cart pages...
    By mrmikal in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Mar 2009, 01:32 AM
  4. How do I modify the text in a 'checkout email'?
    By Tectic in forum General Questions
    Replies: 3
    Last Post: 5 Jan 2009, 06:33 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