Forums / Addon Shipping Modules / How do I Set usps priority mail only to the Certain Products?

How do I Set usps priority mail only to the Certain Products?

Views: 3,538

Results 21 to 25 of 25
22 Jul 2011, 2:13 PM
#21
marco_b avatar

marco_b

New Zenner

Join Date:
Dec 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

How do I Set usps priority mail only to the Certain Products?

Ok, It's looking like there is some confusion with setting the configurations.

Understandable since these filtering features are quite new and I haven't written the module documentation to cover that yet. Version 1.1 will be released this weekend with documentation since the code is looking pretty solid.

I'd like to thank the testers for helping me and spending allot of their time using the test version.

Thankyou :smile:

17 Nov 2011, 7:31 AM
#22
atfzc avatar

atfzc

New Zenner

Join Date:
Nov 2011
Posts:
22
Plugin Contributions:
0

Re: How do I Set usps priority mail only to the Certain Products?

I hope I'm in the right place. If not let me know.

I have 3 general categories of goods. Only one category can have USPS as a shipping option. How do I set it up so that the only option for the other two categories is pick up or UPS? I'm pretty new to all this and not all that code savvy so if you could dumb it down for me that would be great.

I'm using v1.39h.

Thanks

17 Nov 2011, 2:56 PM
#23
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How do I Set usps priority mail only to the Certain Products?

What you need to do is compare the number of Items in the cart and see if the total number of Items is the same as the number of Items from your specific Category ...

Assuming that they use the same master_categories_id, in this example categories_id 10, you can do this with the following code in RED:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
    }

// bof: only show if all Products are from master_categories_id 10
    if (!IS_ADMIN_FLAG) {
      global $cart;
      $chk_category_count = 0;
      $chk_category_count += $_SESSION['cart']->in_cart_check('master_categories_id','10');
    }
    if ($_SESSION['cart']->count_contents() != $chk_category_count) {
      $this->enabled = false;
    }
// eof: only show if all Products are from master_categories_id 10

    if ($this->enabled) {

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!

18 Nov 2011, 6:26 AM
#24
atfzc avatar

atfzc

New Zenner

Join Date:
Nov 2011
Posts:
22
Plugin Contributions:
0

Re: How do I Set usps priority mail only to the Certain Products?

Awesome!!! Worked perfectly.

18 Nov 2011, 3:08 PM
#25
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How do I Set usps priority mail only to the Certain Products?

Thanks for the update that this is working for you ... :smile:

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!