Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 46
  1. #11
    Join Date
    Jul 2009
    Location
    Crystal Lake, IL
    Posts
    50
    Plugin Contributions
    0

    Default Re: Media Mail Option

    That's awesome! It seems like everything works now, and if I need to add more categories I can. You are incredible!

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

    Default Re: Media Mail Option

    Glad to hear that this works 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!

  3. #13
    Join Date
    Sep 2006
    Location
    Oregon
    Posts
    217
    Plugin Contributions
    0

    Default Re: Media Mail Option

    Hi Ajeh!

    I was wondering if you would help me with media mail!

    I have:

    Books (Parent id:4) no child categories

    Computer (Parent id:11) with child categories:
    Games (id:19)>
    1.00 games (id:22)
    Educational games (id:25)
    Other games (id:24)
    Programs (id:20)>
    1.00 programs (id:23)

    I want media mail to show up when ever there is only one or more item from one of these categories, or a combination of only these categories, but I don't want it to show up if there is anything in the cart that is not one of these categories...for example: if they bought 3 books and 10 cd games, then media mail would show up, but if they bought 3 books, 10 cd games and a basketball, then media mail would not show up.

    I am really not savy at all when it comes to code or knowing where it should go, so PLEASE include this in your instructions! Thank you so, so much!
    Shipping has been really expensive without the media mail option, as I have turned it off.

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

    Default Re: Media Mail Option

    You would use the same thing as what I posted but put in your master_categories_id for as many categories that are allowed in:
    Code:
            $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','22');
    What this is doing is counting how many products come from that categories_id ... in this case it is testing for categories_id 22 when that is the master_categories_id ...

    If they are added up and do not match the count of all items in the cart, then the Media Mail is skipped ...
    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
    Sep 2006
    Location
    Oregon
    Posts
    217
    Plugin Contributions
    0

    Default Re: Media Mail Option

    Thank you! So is this an example of what it should look like?

    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','22');('master_categories_id','4');('master_categories_id','11');('master_categories_id','19');

    and so on?

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

    Default Re: Media Mail Option

    In a word ... no ...

    If you peek at the code in post #10, for the categories_id 22, 4, 11 and 19 that are used as the master_categories_id of the Products in the products table, you should change the code to:
    Code:
    // test contents for Media Mail
            $skip_media = false;
            $chk_media = 0;
            $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','22');
            $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','4');
            $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','11');
            $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','19');
    You need 1 line per categories_id that ARE allowed ...

    Now if you have a lot of categories you may want to customize this code even further than it is ...
    Last edited by Ajeh; 1 Feb 2010 at 02:41 AM. Reason: changed for clarity
    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
    Sep 2006
    Location
    Oregon
    Posts
    217
    Plugin Contributions
    0

    Default Re: Media Mail Option

    Ok! Thanks Ajeh!

    But...I am a bit confused at what you said, quote: You need 1 line per categories_id not allowed ...

    The categories you have listeded in your code you wrote for me ARE the categories I want to ALLOW for media mail. Those categories I listed are the only categories I have right now that would warrant media mail. So....the code you wrote will allow media mail to show up if they choose ONLY from those categories...is that correct?

    I'm so sorry Ajeh...I feel so dumb...I wish I understood code. I only understand a little bit of html and I mean only a little bit! Thank goodness there are people out there who know what they are doing like yourself!!!!

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

    Default Re: Media Mail Option

    Sorry ... my bad ... that one is written for which categories "are allowed" ... I write too many of these things ...
    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!

  9. #19
    Join Date
    Sep 2006
    Location
    Oregon
    Posts
    217
    Plugin Contributions
    0

    Default Re: Media Mail Option

    Ok! I will give it a whirl!

    Thank you!

  10. #20
    Join Date
    Sep 2006
    Location
    Oregon
    Posts
    217
    Plugin Contributions
    0

    Default Re: Media Mail Option

    Ugh...not working... this is what I've plugged into my usps.php:

    // test contents for Media Mail
    $skip_media = false;
    $chk_media = 0;
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','4');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','19');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','20');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','22');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','24');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','25');
    if ($chk_media != $_SESSION['cart']->count_contents()) {
    $skip_media = true;
    }

    Each of the above id's have either computer cds/programs or books. Media mail is showing up ALL THE TIME. Even if there is only one item that is NOT EVEN FROM THE ANY OF THE ABOVE MEDIA ID'S...what am I doing wrong?

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. v139h USPS Media Mail problem.
    By Beau91324 in forum Addon Shipping Modules
    Replies: 4
    Last Post: 8 Jul 2014, 08:50 PM
  2. v150 USPS Module RateV3 -- trying to integrate Media Mail eligible option
    By jaheadlee in forum Addon Shipping Modules
    Replies: 1
    Last Post: 24 Jul 2012, 10:59 PM
  3. Media mail surcharge
    By Arunachala in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 13 Jun 2011, 01:42 AM

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