Page 1 of 2 12 LastLast
Results 1 to 10 of 25

Hybrid View

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

    Default Re: USPS Shipping Method vs Product Type

    If all Products that are Media Type are in one categories_id then you could check the count against the number of products with the master_categories_id that matches this categories_id and when they are the same, you know it is all media ... and when different then you know to skip it ...

    I thought I posted something similar on FIRST CLASS the other day that you could probably use to show you where in the code you need to manage a switch ...
    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!

  2. #2
    Join Date
    Dec 2007
    Location
    Dothan, Alabama
    Posts
    14
    Plugin Contributions
    0

    Default Re: USPS Shipping Method vs Product Type

    I like ChrisDrumm's idea. If mixed bag, then it would be nice to have the media option not appear. At the moment I have added text which informs the customer that only books and cd's qualify for the USPS media rate.

  3. #3
    Join Date
    Jan 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: USPS Shipping Method vs Product Type

    I very happy to see the discussion progressing on this issue, so the real question is, can someone do the coding? I do not have the ability to write this code.
    Can I temp someone with say a case of Moose Munch or a gift certificate to The Moose Store?
    Z

  4. #4

    Default Re: USPS Shipping Method vs Product Type

    Ok - here is the code you had for first class - It disables 1st class if the weight is over .6249

    I don't use first class mail, so I changed the code from 'FIRST CLASS' to 'MEDIA' to see if it works -

    Code:
    			if ($type == 'MEDIA' && $shipping_weight >= .6249) { 
                // skip First Class on >= .6249 
              } else { 
              $methods[] = array('id' => $type, 
                                 'title' => $title, 
                                 'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes); 
              }
    ...and it does, so the next step...

    How would you check the "Master Cat ID" of all the items in the cart against the categoy I have the Books & DVD's in? (for reference, my cat is 449)

    I'm not a coder, but I'm going to mess around a bit and see if I can figure it out -- But help is always welcome!

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

    Default Re: USPS Shipping Method vs Product Type

    This is based on DVDs Action ... categories_id 10 ...

    PHP Code:
              if ($type == 'MEDIA' && $_SESSION['cart']->in_cart_check('master_categories_id','10') != $_SESSION['cart']->count_contents()) {
                
    // skip MEDIA when whole cart is not from master_categories_id 10
              
    } else {
              
    $methods[] = array('id' => $type,
                                 
    'title' => $title,
                                 
    'cost' => ($cost MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
              } 
    Only if the whole cart is master_categories_id 10 will the MEDIA rate show ...
    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!

  6. #6

    Default Re: USPS Shipping Method vs Product Type

    Perfect!

    Now the wrench... I have 4 sub categories within a category -- The patch does not work when I put in the top category ID (499) but it works when I put in a sub category ID (500, 501, 502, etc...)

    So, how couls I get the Top category to work OR how could I enter the 4 sub-category ID's

  7. #7
    Join Date
    Jan 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: USPS Shipping Method vs Product Type

    Can someone outline what I'm supposed to modify and in which files. I'm not so good at modifying these things and usually screw them up. Thank you to everyone who helped come up with this option.
    Z

  8. #8
    Join Date
    Mar 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: USPS Shipping Method vs Product Type

    I tried copying the code Ajeh provided into usps.php .. No luck.
    Is there a specific place to place it. All i get is the blank page when testing.
    If there is some detailed instructions, maybe someone else as new as me will also benefit from it.

    ( I Edited the number 10 category ID to point to my media category 72 other than that no changes)

  9. #9
    Join Date
    Jan 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: USPS Shipping Method vs Product Type

    I'm in the same boat, if someone could point out where to insert this code in usps.php that would be very helpful.

    Secondly, when adding categories are there commas and spaces or just commas, etc. I know some of this can be very delicate... for example

    Would: master_categories_id','10'
    be: master_categories_id','10,11'
    or: master_categories_id','10, 11'

    to include category 10 and 11?

    Thanks in advance for anyone's help.

    Z

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

    Default Re: USPS Shipping Method vs Product Type

    Quote Originally Posted by zb21hay View Post
    I'm in the same boat, if someone could point out where to insert this code in usps.php that would be very helpful.

    Secondly, when adding categories are there commas and spaces or just commas, etc. I know some of this can be very delicate... for example

    Would: master_categories_id','10'
    be: master_categories_id','10,11'
    or: master_categories_id','10, 11'

    to include category 10 and 11?

    Thanks in advance for anyone's help.

    Z
    Are you wanting Media to show only if ALL products in the cart are from these two master_categories_id ...
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Shipping 1 item type USPS and 1 item type UPS
    By tenthmuse in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 9 Jul 2011, 07:10 PM
  2. Payment method based on shipping type?
    By celticwebsolutions in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 12 Dec 2010, 11:25 AM
  3. Set shipping method by product/product type
    By andycqos in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 19 Oct 2010, 11:29 AM
  4. Show shipping method based on product type
    By gpgoud in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 22 Sep 2009, 03:43 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