I am using the Amazon Module 7.x-1.0-rc1 with the latest version of Views 7.x-3.x-dev. In my view, it seems like all of the fields provided by the Amazon Module work, with the exception of Amazon price (formatted) and Amazon price (numeric). The first is empty, and the second is "0" for all products. When I run a test, I don't even see these two values in the Array, although I see all the rest, including things like Lowest price, etc.

Comments

rfay’s picture

Title: Amazon Price not displaying » Views: "Amazon Price (numeric)" and "Amazon Price (Formatted)" do not display correctly

"Amazon Price (numeric)" and "Amazon Price (Formatted)" do not display correctly in views even though the List price items do.

Putting the ASIN "B001PLPRK6" admin/config/amazon_settings/amazon/test shows
[listpriceamount] => 19990
[listpricecurrencycode] => USD
[listpriceformattedprice] => $199.90

but no sign of the amazon prices any more... I assume they've changed the API.

rfay’s picture

tj2653’s picture

So is it just a matter of changing the element name in the code?

rfay’s picture

That might work. I haven't looked at it.

paulwedge’s picture

I have exactly the same problem (also using Amazon Module 7.x-1.0-rc1 and Views 7.x-3.x-dev).
Is it possible to get more detailed advice on how to correct this issue?
Unfortunately I know very, very little about coding, and cannot figure out how to change the name element in code.

rfay’s picture

Status: Active » Closed (duplicate)

I'm going to mark this as a duplicate of #1257714: Remove support for Merchants in Amazon Store and we'll see the work there.

rfay’s picture

Status: Closed (duplicate) » Active

Sorry, I was totally wrong and confused. That issue is for Amazon Store, but is on the same topic. With a little luck we'll get @the_g_bomb to work on it here.

the_g_bomb’s picture

Assigned: Unassigned » the_g_bomb

I'll take a look

the_g_bomb’s picture

OK, there is a couple of things going on. The price attribute hasn't actually changed.
The xml is still providing

Offers->Offer[0]->OfferListing->Price->Amount
Offers->Offer[0]->OfferListing->Price->CurrencyCode
Offers->Offer[0]->OfferListing->Price->FormattedPrice

Which are being converted into:

amazonpriceamount
amazonpricecurrencycode
amazonpriceformattedprice

respectively, however I think these were being hidden by a MerchantID check, which may or may not be available.

If you do a lookup for 1849511160, amazon price is listed.

With the example ASIN mentioned above (B001PLPRK6), the Birdbath isn't available from Amazon itself, which is why there is no offer price, which wouldn't have been shown even if it was.

I have removed the check for the MerchantID to see if that helps. But the removal of the Merchant ID may mean items available on the website through merchants may no longer be available through the module.

rfay’s picture

Status: Active » Needs review

Hmm. We do have to figure out what their new policy is, and what this merchantid change really means. Does it mean just that you can't search by merchantid, or does it mean that alternative merchants are not supported in the API any more? If it just means you can't search by merchantid, then that's a lot simpler.

Also, if you can't search by merchantid we should remove that capability from the admin interface.

Thanks!

tj2653’s picture

Don't know about any potential side-effects, but the patch seems to work for me.

madeby’s picture

Will this be included in a future release and is their any time frame for it?

rfay’s picture

@madeby, if people review it, test it, and RTBC it, it will get in :-)

madeby’s picture

Tried the patch and sadly it did not work for me.

The "Amazon price (formatted)" is empty. Any ideas? A really important field for the site I'm working on.

the_g_bomb’s picture

@madeby have you got a sample ASIN that is being affected? Could it be that the product is not available from Amazon itself? This seems to have an effect on the data provided. If the views connection is dependant on the Amazon price being available then it could be that only Amazon prices are passed through, but prices from other vendors are not available to views.

madeby’s picture

Strangely it worked late yesterday. Perhaps it was a cache thing.

kevcol’s picture

I was able to get the Amazon price to display in the node page by tweaking the template.

I copied "amazon-item--details.tpl.php" from the amazon module directory into my theme/templates directory and then changed the following line.

ORIGINAL:
if (!empty($listpriceformattedprice)) { print $listpriceformattedprice; }

CHANGED:
if (!empty($amazonpriceformattedprice)) { print $amazonpriceformattedprice; }

rfay’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Status: Needs review » Fixed

Committed #9: D7: 5eb8dc0 and D6: 92d4e0d - Thanks so much @the_g_bomb! Excellent analysis and perfect fix.

One thing to request: I saw you fixed a problem with the ISBN in there too... Please keep separate issues separate. I did commit the whole patch.

the_g_bomb’s picture

Doh, busted... thought I could sneak a sly fix in without anyone noticing, I won't do it again.

Status: Fixed » Closed (fixed)

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

mrP’s picture

Did this fix make it into 7.x-1.0? I'm not able to return any price fields but all other work fine.

rfay’s picture

Assigned: the_g_bomb » Unassigned

Yes, it should be in there just fine.