To avoid issues ... I use the naming convention of:
freeoptions.php_1
freeoptions.php_ORI
etc. etc.
That way it is not picked up as a php file ...![]()
To avoid issues ... I use the naming convention of:
freeoptions.php_1
freeoptions.php_ORI
etc. etc.
That way it is not picked up as a php file ...![]()
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.1]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Guys, I'm hoping you're able to help us out with this one. We're trying to do something similar to those at the start of the thread. I've tried several different codes etc. and haven't had any luck.
Bascially we want to make it so that any large items can only be shipped by the 'large item shipping' shipping module we got. So basically items in catagory 18 are all large items, so they are included, but items from catagory 23 are also large, so they need to be added to the code also some how.
In an ideal world, it would work so that if i add a large item to the cart, it would only have the large item shipping option and then if i added a smaller item, it would still only have the large item shipping option and of course, as soon as you remove the large item from the cart, it shows all the normal shipping options (excluding the large item shipping) for the small item
I have taken a few stabs at this myself and failed horribly. If anyone knows what we need to do, it would be really appreciated![]()
Since this is growing into the master thread for crazy shipping changes based on category I thought I would add one more solution I have found. IT is a bit of a hack, but maybe will inspire you if you can't find your own.
Problem: I need to charge a flat rate, only once if a product in a certain category(frozen foods) is chosen. Then I also need to charge the standard calculated rates(Fedex or USPS.)
Solution: (This can be done by any attribute, one of them being category, but in my case it is by model.)
1) For each product in the category make the model 'frozen'(I don't use category ID for reasons not described here)
2) Open /includes/modules/order_total/ot_loworderfee.php
3)Change this:
To this:Code:if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) { if ( ($pass == true) && ( $order->info['subtotal'] < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) { $charge_it = 'true';
4)Change your settings in the ADmin screen so the low order fee is activated at very low levels(less than $1).Code:if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) { if ( ($pass == true) && ($_SESSION['cart']->in_cart_check('products_model','frozen') > 0) ) { $charge_it = 'true';
Huh? Why?: Instead of adding a fee based on cost, it is adding a fee if certain conditions exist. In this case it is based on if the 'products_model' is 'frozen'. If you want to do it based on categories just change it to:where 66 is the category idCode:in_cart_check('master_categories_id','66') > 0) )
-lindasdd
P.S. Thanks again Ajeh. This is all based on modifications to your posts. After reading almost every shipping post that comes up from searching I am amazed at your patience in responding again and again.
All I seem to do is ask questions!
I need table rate shipping for products ID 15 and 16
Thanks![]()
The only way I can think to do this is to make it so all other shipping options turn off when a product from one of those categories is in the cart. If someone knows an easy way of doing this without changing ever single shipping file maybe they can chime in.
Would you be able to at least do what I just described or did you try and it didn't work?
-lindasdd
I am having a similar problem. It seems someone out there may have a solution but I'm new to PhP and may be missing it. Here goes.
In simple terms I want to code products and product categories so that only certain shipping options appear for each.
For example.
I have a group of products that drop ship directly to the customer but they are from different sources. One will only use UPS. The other will use ups and USPS.
I would like the shipping options on the items that will only go UP to only show UPS (and calculate) while the others give the choice between UPS and USPS.
Can that be done easily tor does someone have a better solution for coding shipping for products based on source and varying dropship fees.
Last edited by agentx; 1 Nov 2009 at 08:11 PM. Reason: forgot to subscribe to the post
You could test the cart and if there is a product that only goes UPS then disable the USPS shipping module ...
To check for how many of a specific products_id is in the cart, such as products_id 15, you can use:
You can then control the $this->enabled based on the results ...Code:global $cart; $chk_products15 = $_SESSION['cart']->in_cart_check('products_id','15');
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.1]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
I tried that but I must be doing soemthing worng i guess.
If I have both the UPS and USPS shipping modules on then they appear as options for ALL the items in my store. I cannot find a way to have some items just USPS and some both USPS and UPS.
There is nothing in the product or category area that lets me disable the shipping modules by category or product.
You have to edit the file:
/includes/modules/shipping/ups.php
and change the code ...
Let's say you do not want to allow UPS when products_id 15 is in the cart, change the code:
to read:Code:$this->types = array('1DM' => 'Next Day Air Early AM',
Code:global $cart; if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_id','15') > 0) { $this->enabled = false; } $this->types = array('1DM' => 'Next Day Air Early AM',
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.1]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
I'm not exactly the greatest when it comes to this sort of stuff. We previously had tried a few of the other solutions posted in the thread. For example there was one where we posted the code into the file, but it needed to be duplicated for the different categories, however when more than one copy of the code was in the file, the codes would seemingly clash and not work at all.
Bookmarks