Since Views2 has gone through lots of changes recently, uc_product views integration has fallen behind and doesn't currently work with the latest version of Views. The attached patch brings the Views integration code back into line.
This patch is written against the latest Ubercart 6.x-2.x-dev (2008-Sep-23) and latest Views (6.x-2.0-rc4)
Two things I know I missed:
The field which references field_image_cache_fid in the default view(I'm assuming this is to make the product image available?)
And I haven't touched the bit which requires the 'editablefields' module, since this is unavailable for D6.
Please review and test.
Comments
Comment #1
lyricnz commentedYour patch updates uc_product/views/uc_product.views.inc but this file does not exist in 6.x-2.x-dev (2008-Sep-23) - it is at uc_product/uc_product.views.inc only. Duplicating the file, then applying the patch, seems to work basically okay, from my quick test.
Comment #2
andrewfn commentedThis failed to apply completely because the last section of the patch is against the file:
uc_product/views/uc_product.views.incwhich does not exist in ubercart 6.x-2.x-dev
I don't think I am making a silly mistake, but please correct me if I am wrong. I got:
Comment #3
mrfelton commentedSorry, my bad. Please try this updated patch.
Comment #4
Island Usurper commentedIt looks good to me. I uncommented the part about field_image_cache_fid in the default view, and it works just fine. However, I did just get CCK rc9, so they may have updated their Views integration fairly recently if you couldn't get it to work.
I don't use Views a whole lot, so I'd like one or two more good reviews before commiting it.
Comment #5
mrath commentedThanks for patching. But i need more help. I get the errors:
- Error: handler for uc_products > sell_price doesn't exist!
- Error: handler for uc_products > is_product doesn't exist!
- Error: handler for uc_products > buyitnowbutton doesn't exist!
- etc.
can you help me please.
Comment #6
mrfelton commentedWhere are you seeing these errors?
Comment #7
andrewfn commentedPatch applies properly now. Thanks!
Comment #8
mrfelton commented@Island Usurper: is field_image_cache_fid relating to imagecache (which I don't have installed)? If so this would need to be added as a dependency, although I'd rather not force people into needing imagecache.
Comment #9
Island Usurper commentedIt's actually a CCK Imagefield. I had just named it the image_cache field way back when uc_product was new. That field should be optional, so I'll tweak the default view to check that the field exists before I commit it.
Comment #10
mrath commented@mrfelton:
when i open "/admin/build/views/edit/uc_products?destination=products#views-tab-page_1"
Comment #11
mrath commentedThe Problem is away. Idon´t know what it was.
Thanks for the patch!
Comment #12
Island Usurper commentedComment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #14
geraldito commentedIs this patch commited to the newest head of ubercart 6.x-2.x-dev? have the same problem but can't apply patch.
Comment #15
acsooley commentedI am still having this problem with adding a image to a view from a product.
Any help would be great.
Adam
Comment #16
Island Usurper commentedAt this point, 6.x-2.x-beta3 is probably newer than what's in the -dev package.
Comment #17
mikee commentedI'm using Ubercart core 6.x-2.2 and Views 6.x-2.6.
When looking at the available "Fields" within Views I see the following:
However, the dimensions are missing:
Any pointers on how to make these available in Views would be much appreciated?
Comment #18
tr commented@mikee: Please open a separate issue with your feature request.
Comment #19
code-brighton commentedhi mikee,
I'm having the same issue, trying to access product dimentions in views... Have you had any luck with this.
Thanks