Hi,
in Ubercart 6.x-2.0-rc3 is filtering OK but when I upgrade to Ubercart 6.x-2.0-rc6 then "Filter Order product: Attribute: attrName" not working. I detect problem in table uc_order_products where is data column format changed. I really need working attribute filtering. Anybody have the some problem???
Old working format:
a:4:{s:10:"attributes";a:1:{s:16:"Turnus - termín";s:22:"III. 12.7.–18.7.2009";}...
New not working format:
a:4:{s:10:"attributes";a:1:{s:16:"Turnus - termín";a:1:{i:0;s:22:"III. 12.7.–18.7.2009";}}...

Comments

madsph’s picture

Assigned: Unassigned » madsph

Sorry for not ansering before now - I have been on holiday.

I haven't installed rc6 yet, so it might take some time before I am able to reproduce your problem and fix it - I will get back to you when I know more.

PaulM’s picture

I detect, that Ubercart 6.x-2.0-rc3 is OK but rc4 use new format.

madsph’s picture

It seems that there has been added a new layer of arrays in the model - I can't see yet why this is, but at least if I replace:

$var = array($key => $optval);

with

$var = array($key => array(0 => $optval));

in line 87 of uc_views_attribute_handler_filter_attr.inc it seems to work.

I am not committing this yet because that will ruin the feature on other installations of Ubercart, and I will need to find out what really happend in the attribute module first.
But I hope you can use this to solve the problem on your site temporarily.

PaulM’s picture

Thanks very much. Working perfect.

madsph’s picture

Status: Active » Needs work
yurgon’s picture

dont work for me, i have ubercart 2.2

madsph’s picture

That is because the official Ubercart release hasn't included this yet.

To make it work in you installatiion, do the reverse of #3.

yurgon’s picture

I did it, did not help

yurgon’s picture

anybody help me please

levelos’s picture

Title: Filter Order product: Attribute: attrName not working » Not interacting with legacy orders from 5.x
Status: Needs work » Active

The crux of the problem is that if you are running Ubercart and have upgraded your site from 5.x to 6.x, than uc_views will not correctly query attribute or order total data from orders that were placed under the 5.x site. As pointed out in this thread, it's because the structure of the data stored by UC has changed, and was not correctly updated by UC during the upgrade script. Really the bug lies there is you ask me. In any case, the options are to update the legacy data or add a couple of OR clauses to uc_views accounting for the two different data structures. I'd volunteer the patch, but just can't right now. I also renamed the issue accordingly.