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

CommentFileSizeAuthor
#13 cck.txt2.93 KBnetentropy
#13 views.txt4.45 KBnetentropy
#11 mctviews.txt3.97 KBnetentropy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Title: Unplublish or Delete Amazon Nodes if Unavailable on Amazon » Unpublish or Delete Amazon Nodes if Unavailable on Amazon
rfay’s picture

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

rfay’s picture

Status: Active » Fixed

There 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

netentropy’s picture

curious 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

rfay’s picture

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

netentropy’s picture

yes, 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?

rfay’s picture

If you filter on invalid_asin=FALSE, you will not see the invalid items.

Is that what you're asking?

netentropy’s picture

yes, but whether i set it to True or False, it shows no items.

If i remove the filter it shows the items.

rfay’s picture

Status: Closed (fixed) » Fixed

Sorry, 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.

netentropy’s picture

FileSize
3.97 KB

Hi 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?

rfay’s picture

Please 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?

netentropy’s picture

FileSize
4.45 KB
2.93 KB

Yes 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

netentropy’s picture

Figured it out, my storage was OFF in the Amazon settings, thanks!

rfay’s picture

Thanks, sorry for the pain. I added that to the documentation just now: http://drupal.org/node/595464#views

rfay’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.