It seems this is not working with the latest v6.x-2.0-rc3, as you can see in the uc forums thread.

Comments

damienmckenna’s picture

StatusFileSize
new4.33 KB

I've fixed it so that at least the Condition functionality works; I'm uploading a full replacement for the beta1 file because I touched almost every line in the file, thought it would be simpler. I also restructured the code to separate the Action and Condition code, to make it cleaner, and added extra comments to help others.

damienmckenna’s picture

Status: Active » Needs work

FYI the Action code is still broken :) Looking through the code, is there any benefit to even having the Action functionality? Given that it has to work with a full order, I just don't see a use for it - would it assign the term to *all* products in the order? Feel free to prove me wrong, though :)

mikey_p’s picture

Yeah, the CA args system is pretty fun to work with in cases like this. I felt the best way to address this was to build new triggers to provide the desired functionality, as they would work on a per-node basis, and then allow the filtering to be on a per-node basis as well.

Ideally there'd be a better way to handle this. Actually, I'm gonna recommend that this get moved to the UC Product Triggers queue, and that we come up with a solution there.

damienmckenna’s picture

StatusFileSize
new1.75 KB

Ok, here's a version with just the Condition code.

mikey_p’s picture

Status: Needs work » Closed (won't fix)

Fundamentally this feels wrong, because orders themselves don't actually have taxonomy terms. Therefore some of the basic help text in this latest patch is just misleading.

I don't think I'll be going this route. I'll probably work on some updates to UC Product Triggers that provide similar functionality.

Max_Headroom’s picture

Title: Update to work with uc v2.0-rc3? » Update to work with latest Ubercart?
Status: Closed (won't fix) » Needs work

Opening the issue again.
I did find a very valuable use for this: Setting shipping quotes.
Currently, if you want to link a shipping quote to certain products, you need to set up classes and then put the products into different classes.
Or, as in my case, if any product in the order has a large package, I only wanted to charge cost for shipping the largest package.

Instead of classes, I added and extra vocabulary with small medium and large terms and used this module to select which shipping quote to use.

So, I would say, fix this module and keep it up, if only until something better comes along.

mikey_p’s picture

@ #6 This module only works on nodes so unless you install with something like UC Product Triggers, it won't do anything, even then, it may not provide a way to hook into a process that is performed on a per-order basis.

It sounds like the logic you are trying to accomplish may be a bit much for conditional actions to begin with, and it may be better served by a custom module.

Max_Headroom’s picture

Works 100% for me.
I use it to set the conditions for flat shipping rates. For products (nodes) I added another taxonomy with terms: small, medium, large.
Conditions for flat rate are then like this:
use small package when
If order do not have term large
AND
order do not have term of medium
AND
order have term of small

use medium package when
If order do not have term of large
AND
order have term of medium

use large package when
if order have term of large

Live site: www.cwcycles.co.za

xelomac’s picture

Category: bug » support
Priority: Normal » Critical
Issue tags: +taxonomy, +Ubercart, +conditional actions, +flat rate shipping, +ca taxonomy

Hey Damien!
Thank you for v2. It seems to do exactly what I was looking for!

joelstein’s picture

Status: Needs work » Needs review
StatusFileSize
new481 bytes
new2.57 KB

I agree with Max_Headroom and atanasius, that this module is much stronger and more intuitive when dealing in the context of an order.

mikey_p, it seems that your main concern was the misleading text in the CA interface. I'm submitting a patch which incorporates the changes by Max_Headroom, but uses a clearer condition title.

Also attached is a suggested change to the .info file, so that the module appears with other "Ubercart - extra" modules, and so that the module name doesn't use the CA acronym.

Both of these patches work great for me, and I'd appreciate if others could weigh in and test them out.

mikey_p: please consider adding this functionality into the CA Taxonomy module. Thanks!

achton’s picture

Subscribing. I'm doing things similarly to Max_Headroom, and would like this module to persist. Will review patch in #10 and get back.

johnlutz’s picture

StatusFileSize
new4.04 KB

Patch from #10 worked well for me. I also wanted to restrict the condition to also forbid products being in the cart that did not match the particular taxonomy (like the "Check an order's products" allows you to say that "Order has only these products.") So, I added that checkbox to the condition and modified the condition processing. Attached is the adjusted module that was originally the dev patched with the #10 patches.

Sorry it isn't in the form of a patch.

hachreak’s picture

The #4 seems to work for me!
But with a tiny modify: instead of call the function without parameters

<?php
  taxonomy_form_all()
?>

I call this function as:

<?php
  taxonomy_form_all(1)
?>

Someone can confirm? :)

.hachreak.