Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A problem I encounter is Amazon removing items from their store and the items still being listed in my Views. I would like to suggest a feature that would delist or unpublish nodes containing the Amazon field if they are no longer available.
If they are unplublised maybe have them listed in on the Amazon admin page for review
Comment | File | Size | Author |
---|---|---|---|
#13 | cck.txt | 2.93 KB | netentropy |
#13 | views.txt | 4.45 KB | netentropy |
#11 | mctviews.txt | 3.97 KB | netentropy |
Comments
Comment #1
rfayComment #2
rfayThis remains a great idea. The only problem is that the Amazon items are looked up 10 at a time, and any one can cause the error, and we only have a text message to rely on to figure out what happened. There is now a good error message to the log, explaining exactly what item is no longer available.
I continue to consider this.
Comment #3
rfayThere is now a field available in views - invalid_asin, which shows if the ASIN has been invalidated. This is available to .tpl.php files as well, so now there is a way to show that the ASIN has been invalidated.
http://drupal.org/cvs?commit=276264
Comment #5
netentropy CreditAttribution: netentropy commentedcurious if you can detect and show a field if unavailable, if it is able to do this, couldn't there be a filter that only shows available
Comment #6
rfayIn views, the field invalid_asin is either 0 or 1, FALSE or TRUE. It's always there. So you would set it to TRUE in the filter if you were looking for items that were no longer valid on Amazon.
Comment #7
netentropy CreditAttribution: netentropy commentedyes, but what i am saying, if it can detect if the invalid_asin in True or false than a filter could be written to not display the item if it comes back TRUE.
or maye it does this and i am just not seeing it.
Instead of have a .tpl that shows when there is an invalid, instead it would just not display in the view at all?
Comment #8
rfayIf you filter on invalid_asin=FALSE, you will not see the invalid items.
Is that what you're asking?
Comment #9
netentropy CreditAttribution: netentropy commentedyes, but whether i set it to True or False, it shows no items.
If i remove the filter it shows the items.
Comment #10
rfaySorry, I didn't tell you the right magic.
You need to select 0 or 1. This filter is set up wrong (should be a boolean filter) so I created #622076: invalid_asin filter should be a boolean filter or at least numeric to deal with that.
But it does work if you use 0 or 1.
Comment #11
netentropy CreditAttribution: netentropy commentedHi rfay
I have tried setting filter to 0 or 1, or TRUE or False, and then I even tried the Allowed Valuse filter which offers Yes or No
The filter I am applying is the field_amz contetn filter
I do not see the invalid_asin filter in my filter list.
I have exposed the filter here: http://www.mychemistrytutor.com/store
and attached the view, if you have any thoughts?
Comment #12
rfayPlease attach both the content type and the view, or make a feature with the features module that provides both of them.
I assume you've read the docs on Amazon views and also watched the video, and have a relationship and beta10 installed? And ran update.php?
Comment #13
netentropy CreditAttribution: netentropy commentedYes I have read the docs (btw how did you provide anchor that link) and watched the video and installed relationship and beta10 installed.
even the installed example view does not seem to work for me.
http://www.mychemistrytutor.com/amazon_example_view
( the nodes are created and published)
my own view does not work either
http://www.mychemistrytutor.com/store
if you remove the filter it of course works again
I have attached cck and views for my site
I have the Amazon example nodes and example view installed also with the same No results
Comment #14
netentropy CreditAttribution: netentropy commentedFigured it out, my storage was OFF in the Amazon settings, thanks!
Comment #15
rfayThanks, sorry for the pain. I added that to the documentation just now: http://drupal.org/node/595464#views
Comment #16
rfayI also created #622418: Remove the option of not storing data locally.