Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 62
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    Glad that this is working for you now ...

    Thanks for the kudos and support we really appreciate it a lot ... coffee and donuts keep the Zen Cart Team humming right along ...
    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!

  2. #12
    Join Date
    Jul 2014
    Posts
    5
    Plugin Contributions
    0

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    I was trying to get the Media Mail restrictions to work as well and added the code per the instructions above.

    I am using the latest version Version: 2014-09-07 K5

    And instead of using Media MailRM, I had to use Media Mail Parcel

    I used the print_r($type_rebuilt);
    that linniedarling suggested and it output:
    First-Class Mail ParcelMedia Mail ParcelPriority MailTM

    So I guess that's what you all were doing and it seems to have worked for me.
    I am not that good with PHP at all (took me 2 hours just to get this working)
    So if anyone could double check to make sure

  3. #13
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    Quote Originally Posted by regjimbob View Post
    I was trying to get the Media Mail restrictions to work as well and added the code per the instructions above.

    I am using the latest version Version: 2014-09-07 K5

    And instead of using Media MailRM, I had to use Media Mail Parcel

    I used the print_r($type_rebuilt);
    that linniedarling suggested and it output:
    First-Class Mail ParcelMedia Mail ParcelPriority MailTM

    So I guess that's what you all were doing and it seems to have worked for me.
    I am not that good with PHP at all (took me 2 hours just to get this working)
    So if anyone could double check to make sure
    Yes, the USPS changed the name of Media Mail from Media MailRM to Media Mail Parcel going from the 3/7 to 9/7 implementations.

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

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    Yes, you need to use:
    Code:
    $type == 'Media Mail Parcel'
    USPS renamed it on the September 7, 2014 changes ...
    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. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    Dontcha hate when you get interrupted when posting only to find your answer posted 2 minutes before your own ...
    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!

  6. #16
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    Tee-hee, it happens to me all the time!

  7. #17
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    Hi

    I have added this modification to my shop. My media related items are located within sub-categories of the parent category

    EX:

    books (id 342)

    - cookbooks (id 24)
    - childrens books (id 52)
    - old school books (id 72)

    I have 32 sub categories in the books category but that sub category amount will probably increase over time. Is there a way to add the parent category ID 342 in such a way that all its sub categories would be included without having to add the ID for each subcategory manually?

    using

    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','342');

    doesn't work so I need to add the sub cat id instead

    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','24');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','52');
    $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','72');

    If it's possible it would be good because I have a feeling a few months from now if I add a new sub cat I will probably forget to edit the usps.php file.

    thanks

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

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    You could use this code in RED to count how many products are in the cart for that parent categories_id:
    Code:
    // see below use of $chk_cart
    // eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
    
    // bof: skip Products in any subcategory for parents_id 3
          $subcategories_array = array();
          $chk_cat = '3'; // parent categories_id
          $chk_cart = 0;
          zen_get_subcategories($subcategories_array, $chk_cat);
          for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {
            $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id', $subcategories_array[$i]);
          }
    //echo 'USPS products in parent category 3: ' . $chk_cart . '<br>';
    // eof: skip Products in any subcategory for parents_id 3
    
          for ($i=0; $i<$PackageSize; $i++) {
    Just change the $chk_cat to your parent categories_id 342 and $chk_cart will have the quantity that is in the cart ...
    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!

  9. #19
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    thank you

    ohhh I'm sorry, I forgot that some books are in sub sub cats too. Would that significantly change the code you provided?

    For instance

    books (id 342)

    - cookbooks (id 24)
    - childrens books (id 52)
    - old school books (id 72)
    - crafts and hobbies (id 97)
    -- a sub sub cat (id 231)
    -- a sub sub cat (id 321)
    -- a sub sub cat (id 523)

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

    Default Re: Media Mail restriction mod to new, 3-7-14 usps module, any help?

    If you need to calculate the Products in the Shopping Cart for both a Parent Category and then additional categories, beneath the code that I gave you to calculate the Products from all categories within a parent category, you can add the additional categories you need with:
    Code:
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','231');
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','321');
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','523');
    to combine the products that match ...
    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!

 

 
Page 2 of 7 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. USPS-Offering Media mail on all items
    By flyred77 in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 2 Dec 2009, 12:04 AM
  4. Product Customization USPS Media Mail
    By rfloyd in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 30 May 2008, 09:46 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