New Zenner
- Join Date:
- May 2013
- Location:
- Long Branch, NJ
- Posts:
- 49
- Plugin Contributions:
- 0
New Zenner
Oba-san
If you do not check any of the checkboxes for what you want USPS to quote you will get an error ...
NOTE: I think that version should have warned you ... You might check, as there should have been an error showing on the Modules ... Shipping ... USPS indicating that there wasn't anything selected ... I kinda forget if that version has the nifty warning or the one that I am currently working on ... :lookaroun
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
New Zenner
Ajeh:
If you do not check any of the checkboxes for what you want USPS to quote you will get an error ...
NOTE: I think that version should have warned you ... You might check, as there should have been an error showing on the Modules ... Shipping ... USPS indicating that there wasn't anything selected ... I kinda forget if that version has the nifty warning or the one that I am currently working on ... :lookaroun
Yeah, silly mistake. Thank you for catching this.
Do you happen to know if there's a way to offer media mail options? So if it's only a CD or vinyl it's media mail but if it's bundled with anything else it's no longer media mail?
Oba-san
What identifies a Product as a CD or Vinyl?
Anything like master_categories_id or some other field that can be used to identify Products to know who is what?
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
New Zenner
Ajeh:
What identifies a Product as a CD or Vinyl?
Anything like master_categories_id or some other field that can be used to identify Products to know who is what?
We have them separated by categories in our store but that's it. Unfortunately I've been thrown in the fire with learning Zen Cart at a crazy learning curve.
I don't even know what master_categories_id is :dontgetit
For reference - www.piratespressrecords.com/store.
Oba-san
The master_categories_id is the immediate categories_id that "owns" the Product in the table:
products
If you edit a Product, it will show you the master_categories_id at the top of the page:
Product Master Category:
The master_categories_id can be used as an identifier that a Product is a CD or Vinyl, if all CDs and Vinyls are in Categories that hold only CDs and/or Vinyls ...
This would allow a count on Products in the shopping_cart that match the master_categories_id numbers of CDs and Vinyls vs the total item count in the cart ...
The idea is, if the count of Products using these master_categories_id values matches the total items in the cart, then all Products are Media ... if not, then the whole cart is not Media ...
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
New Zenner
Ajeh:
The master_categories_id is the immediate categories_id that "owns" the Product in the table:
productsIf you edit a Product, it will show you the master_categories_id at the top of the page:
The master_categories_id can be used as an identifier that a Product is a CD or Vinyl, if all CDs and Vinyls are in Categories that hold only CDs and/or Vinyls ...
This would allow a count on Products in the shopping_cart that match the master_categories_id numbers of CDs and Vinyls vs the total item count in the cart ...
The idea is, if the count of Products using these master_categories_id values matches the total items in the cart, then all Products are Media ... if not, then the whole cart is not Media ...
Amazing. Thank you.
So I guess I have to add a code to the PHP file that would allow the check out to ONLY use media mail for the selected Master ID Categories?
Oba-san
You might look over this thread:
http://www.zen-cart.com/showthread.php?126077-Media-Mail-Option
and see if it gives you some idea of how to do this ...
If you really start to cry and pull your hair out, I might casually try to do a quick review on how to adapt that to the current USPS 3-27-2013 shipping module when I get some time ... :lookaroun
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
New Zenner
Ajeh:
You might look over this thread:
http://www.zen-cart.com/showthread.php?126077-Media-Mail-Optionand see if it gives you some idea of how to do this ...
If you really start to cry and pull your hair out, I might casually try to do a quick review on how to adapt that to the current USPS 3-27-2013 shipping module when I get some time ... :lookaroun
I'll check this out. Thank you! Sadly, I have no hair to pull out :/
New Zenner
Ajeh:
You might look over this thread:
http://www.zen-cart.com/showthread.php?126077-Media-Mail-Optionand see if it gives you some idea of how to do this ...
If you really start to cry and pull your hair out, I might casually try to do a quick review on how to adapt that to the current USPS 3-27-2013 shipping module when I get some time ... :lookaroun
Alright so I took a look at it and I'm just not literate in PHP. I do know that the products ID categories are 4, 5, 6, and 7. But that's as far as I can get right now.
New Zenner
Ajeh:
You might look over this thread:
http://www.zen-cart.com/showthread.php?126077-Media-Mail-Optionand see if it gives you some idea of how to do this ...
If you really start to cry and pull your hair out, I might casually try to do a quick review on how to adapt that to the current USPS 3-27-2013 shipping module when I get some time ... :lookaroun
Could I just possibly PM you?
Oba-san
Try this ...
Customize the USPS shipping module:
/includes/modules/shipping/usps.php
and add the code in Red around line 305 or so:
if (isset($uspsQuote['Package']['Postage']) && zen_not_null($uspsQuote['Package']['Postage'])) {
$PackageSize = 1;
} else {
$PackageSize = ($this->usps_countries == 'US') ? sizeof($uspsQuote['Package']) : sizeof($uspsQuote['Package']['Service']);
}
[B]// bof: test for media mail eligible
$cart_count = $_SESSION['cart']->count_contents();
$chk_products = 0;
$media_valid = true;
$chk_products += $_SESSION['cart']->in_cart_check('master_categories_id','4');
$chk_products += $_SESSION['cart']->in_cart_check('master_categories_id','5');
$chk_products += $_SESSION['cart']->in_cart_check('master_categories_id','6');
$chk_products += $_SESSION['cart']->in_cart_check('master_categories_id','7');
if ($cart_count == $chk_products) {
$media_valid = true;
} else {
$media_valid = false;
}
// eof: test for media mail eligible
[/B]
for ($i=0; $i<$PackageSize; $i++)
and then add the code in Red 418 or so:
$title .= $this->transittime[$type];
[B]// bof: test for media mail eligible
[/B] if ((($method == '' && in_array($type, $types)) || $method == $type) && $usps_shipping_weight <= $maxweight && $usps_shipping_weight > $minweight) {
[B]//echo 'USPS $type: ' . $type . '<br>';
if ($type == 'Media MailRM' && !$media_valid) {
// skip media
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => $cost,
);
}
// eof: test for media mail eligible
[/B]
}
}
if (sizeof($methods) == 0) return false;
see if that shows Media only when Products are in categories 4, 5, 6 and 7 ...
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
Tell staff why this post should be reviewed.