8 replies [Last post]
mccraic's picture
Offline
Joined: 11/05/2007
Juice: 62
Was this information Helpful?

Hello,

I am using ubercart with flatrate shipping and when I use the workflow_ng "Check an order's number of products" condition and highlight the products to which I would like to apply this rule, the rule is not applied to all of the products which I have selected. If I select then the rule is applied to the products which fail when I have manually selected them. Is the products value the node or the SKU? What is the best way to debug this problem?

Thanks for your help,

Patrick

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: Workflow_ng Problem when using "Check an order's number of p

I'm not sure what you mean by "the rule is not applied to all of the products". How do you expect it to work?

mccraic's picture
Offline
Joined: 11/05/2007
Juice: 62
Re: Re: Workflow_ng Problem when using "Check an order's number

It appears that part of my comment was omitted. It should have read:

I am using ubercart with flatrate shipping and when I use the workflow_ng "Check an order's number of products" condition and highlight the products to which I would like to apply this rule (I manually select all of the product numbers listed since they are all of the same type), the rule is not applied to all of the products which I have selected. If I select ALL PRODUCTS at the top then the rule is applied to the products which fail when I have manually selected them. Is the products value the node or the SKU? What is the best way to debug this problem?

Thanks for your help,

Patrick

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: Re: Re: Workflow_ng Problem when using "Check an order's num

The value of products is based on the SKU, which is not what I would have said if I hadn't just looked. If you have attributes that adjust the SKU, then they wouldn't ever be counted except when "All products" was chosen. And that's a problem.

The condition "order has products" uses the nid, and it seems to work pretty well. I think I'll use that as the standard until there's a better way to get all the possible SKUs that a product can have.

alanburke@drupal.org's picture
Offline
Joined: 08/05/2008
Juice: 82
Same / Similar Problem

I'm not sure whether this qualifies as a bug or a configuration issue.

I have 2 shipping options for a product.
One for less than 100 units.
One for 100 or more units.

I have a workflow NG rule which kicks in when this product is purchased [via Sku].

The workflow NG rule 'Check an order's number of products' works fine when only one variation is purchased.
Eg 150 units with one particular attribute.

However, if the customer selects 75 units of each attribute, for 150 units in total,
only the 'sub 100' shipping option is available.

If I adjust the Workflow NG config, and use 'all products' instead of selecting the SKU,
the rule works as expected.

I reckon it is a bug, as the two variations share the one SKU.

Regards
Alan

tbendick's picture
Offline
Joined: 01/07/2008
Juice: 4
Re: Workflow_ng Problem when using "Check an order's number of p

Patrick, I have the same problem here.

I am trying to setup a rule as follows.

"Check an order's number of products"
Pick the the products that I want
Set the count value and comparison

The rule won't run when I click on get shipping quote
however if I go back and change products to "All Products"
The rule will run fine..

ifelseif's picture
Offline
Joined: 07/14/2008
Juice: 23
Workflow_ng number of produducts condition

It seemed like the issue is that when you chose to do a multi select instead of the 'all' option, the work flow runs the uc_order_condition_count_products for each product selected and then compare each individual product quantity to count comparison value. This is some what counter intuitive as one would expect by the label of "Check an order's number of products" it would compare the total of all the products in the order or the total of those selected.

I fixed the issue by doing the following:

Change line 430 as follows
    $totals[$product->nid] = $product->qty;
to
    $totals[$product->nid] += $product->qty;

This allowed us to have some shippable products and some non-shippable products and adjust the flat rate based on the total from the shippable products. With the original code there is no way to exclude products that are non shippable from the total for the comparison.

alanburke@drupal.org's picture
Offline
Joined: 08/05/2008
Juice: 82
Great Stuff.

That seems to do the trick.
Can't see any other fallout from that change.

Regards
Alan

Zalatar's picture
Offline
Joined: 01/27/2009
Juice: 86
Workflow_ng Problem when using "Check an order's number of produ

I have applied the change above but I am still experiencing the issue. Has anyone else seen this and what has been done to fix it?
Thanks,
Z