Hi,
Running the following:
drupal 6.19
ubercart 2.7
uc_node_checkout 2.0-beta8
uc_eway 2.3
I'm getting the following error on checkout:
Invalid argument supplied for foreach() in /vhost/www.example.com/modules/uc_eway/uc_eway.module on line 583.
Node checkout adds an attribute that contains the purchased node details. This is just a string, not an array.
The error doesn't appear if I unselect 'Display a node teaser as an attribute/option combination for nodes on orders' on /admin/store/settings/node-checkout/settings.
As a workaround, it can be fixed with a theme override like so:
foreach ($product->data['attributes'] as $attribute_name => $attribute) {
if(is_array($attribute)) {
foreach ($attribute as $key => $value) {
$description .= ', ' . $attribute_name . ': ' . $value;
}
}
else
{
$description .= $attribute;
}
}
Not sure if the above is a correct fix, or maybe this is a node-checkout issue and it shouldn't be adding a string to the $attributes array. :)
Michael
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | node-checkout-and-eway-1361052-2.patch | 898 bytes | agileware |
Comments
Comment #1
Anonymous (not verified) commentedI can confirm this error in a similar environment. Any maintainers out there who can patch up this module...?
Comment #2
agileware commentedPatch attached.
Comment #3
Anonymous (not verified) commentedI also found that unselecting "'Display a node teaser as an attribute/option combination for nodes on orders' on /admin/store/settings/node-checkout/settings" circumvents this issue.