Thread: USPS Question

Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: USPS Question

    Hi Ajeh,

    The product ID's for Express Mail International (EMS) Flat-Rate Envelope and Priority Mail International Flat-Rate Envelope are 15,42,16,43. And for First Class Mail International Package 42 and 43.

    Hope this is right!

    Cheers!
    Last edited by yoppo; 28 Oct 2009 at 04:54 AM. Reason: Mistake

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

    Default Re: USPS Question

    Now adapt the code in #6 to use them ...
    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. #13
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: USPS Question

    To be honest I'm not sure what to do. Can I just put that same code in twice. One for the 4 products and again for the two?

    I am really really bad at PHP!

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

    Default Re: USPS Question

    This gave you the total of what is in the cart for categories based on the master_categories_id when set to 11 or 12 ...
    Code:
    $chk_cats = $_SESSION['cart']->in_cart_check('master_categories_id','11')  + $_SESSION['cart']->in_cart_check('master_categories_id','12');
    This would work for products:
    Code:
    $chk_prods = $_SESSION['cart']->in_cart_check('products_id','11')  + $_SESSION['cart']->in_cart_check('products_id','12');
    have more than 2 products_id values to check, keep adding them on ...

    Now you want to check how many products are in the cart you have $chk_prods ...

    You want to check the $type for the shipping method ...

    Not sure what the shipping method is, then do an echo on it by uncommenting the:
    Code:
    //          echo 'shipping ' . $type . ' chk_cats: ' . $chk_cats . '<br>';
    NOTE: you can also add to that echo the $chk_prods to see the results ...
    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. #15
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: USPS Question

    Last question!!

    Would this work?

    PHP Code:
    global $cart;
              
    $chk_cats $_SESSION['cart']->in_cart_check('products_id','15')  + $_SESSION['cart']->in_cart_check('products_id','16' $_SESSION['cart']->in_cart_check('products_id','42' $_SESSION['cart']->in_cart_check('products_id','43');
            
    //  echo 'shipping ' . $type . ' chk_cats: ' . $chk_cats . '<br>';
              
    if ($type == 'Express Mail International (EMS) Flat-Rate Envelope' && $chk_cats 0) {
          if (
    $type == 'Priority Mail International Flat-Rate Envelope' && $chk_cats 0) {

    $chk_cats $_SESSION['cart']->in_cart_check('products_id','42')  + $_SESSION['cart']->in_cart_check('products_id','43');
            
    //  echo 'shipping ' . $type . ' chk_cats: ' . $chk_cats . '<br>';
              
    if ($type == 'First Class Mail International Package' && $chk_cats 0) {
          
    // skip shipping
              
    } else { 

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

    Default Re: USPS Question

    Not if you are trying to add them all up ...

    Can you type out slowly what it is you want this to do in detail ...

    You have Category issues with shipping types ...

    You have Product issues with shipping types ...

    You need to break these out carefully so that each shipping type that needs to be tested is using the correct testing ...
    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. #17
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: USPS Question

    Hi Ajeh,

    I want products 15,16,42,43 to ship by everything but Express Mail International (EMS) Flat-Rate Envelope and Priority Mail International Flat-Rate Envelope. I also want products 42 and 43, as well as not being shipped using the above two shipping types but also First Class Mail International Package.

    Thanks a million!

  8. #18
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: USPS Question

    Ajeh, would you please help me!

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

    Default Re: USPS Question

    I have not had the time to rewrite the code for you ... when I get some time I will try to look into this further ...

    Hopefully there is enough information in this thread to show you how to count the number of products in the cart based on master_categories_id or products_id etc. and how to find the $type for the shipping method to try coding this for yourself ...
    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!

  10. #20
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: USPS Question

    Trust me. I have tried! If you get a chance that would be great.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. usps question
    By unmasked in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 21 Oct 2010, 07:13 AM
  2. USPS question
    By GraniteMan44 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 8 Apr 2008, 04:35 AM
  3. USPS Question
    By Tulameen in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 19 Oct 2006, 07:41 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