I ship some products which are liquid and must be shipped UPS. How can I select UPS for liquid products?
I ship some products which are liquid and must be shipped UPS. How can I select UPS for liquid products?
Nothing is built in for this, you'll have to create some custom code.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Have a look at l big royal mai. I added attributes to limit shipping. You could do something similar with your shipping methods.
Mark Brittain
http:\\innerlightcrystals.co.uk\sales\
I have perhaps a solution. I use it for a type of "letterbox-package". I made a zones variant for it and added code to disable that module if certain categories are found in the cart.
Since you permanently have to disable other shipping modules than UPS for it, it could work for you too. However some conditions come with this:
- all liquids must be in a category or categories by themselves
- you can not do it in the admin panel
- you'll have to edit some files
So, if you do this: backup your files first!
Example category is 5, adjust this to your category.
Insert following code in the modules you don't want to ship liquids in:
in zones I placed it under:PHP Code:
// bof skip certain categories
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','5') > 0) {
$this->enabled = false;
}
// eof skip certain categories
If there's more than one category, repeat the code with the next category and so on. I tried using '1' || '2' || '3' instead of '5' to exclude 1, 2 and 3 but that fails to work properly.PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_BRIEVENBUSPOST_STATUS == 'True') ? true : false);
}
It has to be placed where the code is for checking if the module has to be shown.
I took another look at the code and for my use I needed limitations to different quantities.
The code could cleaner for an overall limitation to zero.
Example is category 5, adjust as needed.PHP Code:
// bof skip certain categories
if (IS_ADMIN_FLAG == false) {
if ($_SESSION['cart']->in_cart_check('master_categories_id','5') == true) {
$this->enabled = false;
}
}
// eof skip certain categories
-------------------------------------------------------------------------------------------------------------------------------------------
I also thought you could have use for Numinix Product Fields if you add the product field "Products condition". If all liquids are therein marked as "liquid", you could use:
Than you don't need to enter a lot of code for every category, leave products in every category according to other criteria and still grab them all as liquids.PHP Code:
// bof skip liquids
if (IS_ADMIN_FLAG == false) {
if ($_SESSION['cart']->in_cart_check('products_condition','liquid') == true) {
$this->enabled = false;
}
}
// eof skip liquids
Always test in a test environment or test site.
Which PHP file is this code supposed to be placed?
Bookmarks