The attached patch fixes the 'no handler found' errors for the Amazon image, participant and title fields, and adds a filter for amazon item images (allowing the filtering out of products with no images). 6.x-1.x-dev already nearly works with views2, so this patch applies against the 6.x-1.x-dev (not 6.x-1.0-beta3).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | amazon_image_filtering.txt | 4.05 KB | mleicester |
| amazon_views_patch.txt | 4.34 KB | mleicester |
Comments
Comment #1
Anonymous (not verified) commentedYou my friend have saved me hours of work tonight!
Thanks. I'm still testing it.
Comment #2
mleicester commentedComment #3
joemoraca commentedthis patch did not apply for the 6.x-1.x-dev version today.
Comment #4
mleicester commentedThe most important issue with amazon and views2 has now been fixed in 6.x-1.x-dev (setting info path in amazon_views_handlers). I've updated the patch so that it should apply again. It now fixes some minor views2 issues (e.g. adding common settings to field configuration form), and adds filtering to images.
Comment #5
mandclu commentedThis patch also allows for customizing (or removing) the labels in views, which was a big deal for me.
Works great for me so far!
The only other thing I'd like to have in Views for Amazon is a field for some kind of call to action, like "Buy It Now!". Ideally, just a customizable label that links to the Amazon page. I guess I could do this in the theming layer, but since everything else can be done by this module, I thought I'd float the idea, in case someone felt inspired to add it to the module.
Comment #6
mandclu commentedHmmm, one issue I'm seeing with Views is that with the product image, if I set link behavior to "A link to the product's Amazon page", when it's displayed the link actually points to the site root instead.
Comment #7
mandclu commentedI did a little investigating into this issue abut the link for the images. It seems that the $values object sent to the render() function doesn't contain a property called 'detailpageurl', but does contain one called 'amazon_item_detailpageurl'. Unfortunately, just changing the 'field' value in $this->additional_fields['detailpageurl'] generated an SQL error, so I rewrote line 21 of views_handler_field_amazon_image.inc to be:
Then, I just needed to change line 85 to be:
With those simple changes, the image seemed to wok as expected, for me at least.
Comment #8
eaton commentedCommitted. Thanks for the fixes!