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

CommentFileSizeAuthor
#2 node-checkout-and-eway-1361052-2.patch898 bytesagileware

Comments

Anonymous’s picture

I can confirm this error in a similar environment. Any maintainers out there who can patch up this module...?

agileware’s picture

Status: Active » Needs review
StatusFileSize
new898 bytes

Patch attached.

Anonymous’s picture

I 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.