I am having a heck of a time trying to get this setup. I have scoured the forums and found several solutions but NONE seem to work correctly. I'm hoping that I am either doing something wrong or that someone will be gracious enough to take a few minutes to help. Unfortunately, I am convinced that something is broken somewhere.
In short, how do I setup ubercart to only charge shipping if certain attribute options are added to the shopping cart?
The issue:
I have 6 attributes and a total of 16 total options. These are going to be pretty static so I'm willing to manually set this all up in CA. I need to provide free shipping (technically they are non-shippable but I don't think there is a way to set that on the option level, which is kinda dumb if you ask me...) for 8 of the options while the other 8 are flat rate shipping based on country. I have the country based charges setup and working just fine. Obviously, if the user adds two shippable products and 1 non-shippable product to their cart it should charge them shipping.
The solutions I've tried that don't work:
Attempt #1. I setup a Domestic and Non-Shippable Product flat rate shipping method. The Domestic would charge a flat rate of $5 per product and the Non-Shippable would charge nothing. My CA would use "Order has product with particular attribute option" and then I would setup 8 conditions with the shippable attribute options OR'ed together in a condition group. I would then do the same thing for the Non-Shippable CA but would negate all the conditions. This results in the Non-Shippable Product shipping method ALWAYS being chosen regardless of what type of product I add to the cart.
Attempt #2. I then tried to use the weight setting for each option to handle the shipping charge. This client does not have a need to use the weight settings so I was going to repurpose it. I set all the options that needed a shipping charge as "1" in their weight field on the options page. The options without shipping stayed at 0 or null. Then using CA I chose "Check an order's total weight". I set the Domestic shipping method CA to quote if the total weight was "equal to or greater than" 1. And then I did the same for the Non-Shippable Product CA only negated it.
In addition to the above issues (both #1 and #2), I receive this error 27 times on the cart page AND on the product page when I go from the cart page to the product page. Refreshing the page normally gets rid of the error but it consistently errors. warning: key() [function.key]: Passed variable is not an array or object in /var/www/sites/all/modules/contrib/ubercart/uc_attribute/uc_attribute.ca.inc on line 47.
Comments
Comment #1
tr commentedThis can be done via the adjustments tab on the product edit page.
Note that support requests are handled *only* through the forums on ubercart.org. There's a message to that effect displayed to you when you try to create a new issue.
Comment #2
interestingaftermath commentedI understand that you're trying to keep the Issue Queue number down, TR, but it's important to note that I am getting an actual ERROR from ubercart that I was hoping you could assist me with.
There is no way to set options as free shipping in the Features. Clearly you didn't understand my post.
I have products with 2-4 options. e.g CD, Book, PDF, MP3. The first two need to be charged shipping but the other 2 do not. Is there any way to do this and how to I get rid of that nasty error?
warning: key() [function.key]: Passed variable is not an array or object in /var/www/sites/all/modules/contrib/ubercart/uc_attribute/uc_attribute.ca.inc on line 47.As for posting on the ubercart forums, that place is dead and has been for some time... http://www.ubercart.org/forum/support/18791/free_shipping_specific_produ...
Comment #3
interestingaftermath commentedThis is what I get when I add or remove an item from my cart
Comment #4
longwaveSeems uc_attribute_condition_ordered_product_option() is buggy, looks like it was never updated when the $attributes format changed after checkboxes were introduced - the patch in #400660: Checkboxes for attributes (attributes which accept multiple options) does not modify the .ca.inc file. This issue is probably a duplicate of #600892: Attribute Value Based Tax Rules Disappear Between Checkout and Review.
Comment #5
tr commentedYour original post is a support request, with 90% of your text, including bold type, describing something you're trying to do and need help with. When you create a new issue there's a message displayed informing you that this issue queue is not for support requests. Period. It has nothing to do with keeping the numbers down in the queue. Ubercart.org gets all the eyes, so if you want support you will have to ask there.
If you have a separate bug report please report that separately AFTER you have checked the issue queue to make sure you're not duplicating an issue. Then provide information and simple steps that others can use to reproduce your error.
Comment #6
interestingaftermath commentedThanks Longwave. I'll look into it.
TR must never attend the ubercart forums. He seems to think people still read that thing.