New templates
amzwidget i na table

This is a fork of the original amazon module by rfay. I needed to change a lot and removed things too to keep it clean until the base works and also to fullfill the new efficiency guidlines(see throtteling).
Read the FAQ.
I have documented what i changed. The new paapiV5 is very sensitive to requests and throttles mass requests.

I myself, marcoka, use the current development version in production for months now.

Upgrade Drupal 9 to 10

Read this: https://www.drupal.org/forum/support/module-development-and-code-questio...
To update i needed to remove the module with composer. Not uninstall just remove or your data is gone!
From Drupal 10 we use a new repository. See composer.json inside the module folder.
Remove any SDKs you manually put inside the module or the libraries folder.

Install the Amazon SDK

This module uses the official amazon php SDK that can be found here: https://webservices.amazon.com/paapi5/documentation/quick-start/using-sd...
It uses libraries support, READ the INSTALL.txt!

It turns out there is a guzzle dependecy problem and if we update to the latest sdk we get dependecy war BUT can not update because drupal core D9 doesnt use the latest guzzle. So you HAVE TO USE THE REPOSITORY DWW SET UP!

Manual install of the SDK

THIS DOES NOT APPLY no more cince beta16

Is required for the latest dev i will publish in a few days but will also work in general.
Thats how i marcoka, use it currently.

Download the SDK 1.1 and delete everything expect the src and vendor folder!
Inside the vendor folder you can delete everything but not the composer folder and not the autoload.php

Templates EU and US

EU forces us now to show prices in a special ways. The new templates reflect that. As far in the US you do not need that and the attrubutes are also not avaliable there as far as i know.
#3282278: New EU regulations on price display
For US users you can use own templates. You can use the ones from beta 11 as a starting point: https://www.drupal.org/project/amazon_pa/releases/2.1.0-beta11
Copy them over to your theme and modify them as
you like

Updating!

After an update the sdk folder you copied over is gone! Remember to copy it back. Longterm plan is to use librari

Install the SDK

This module uses the official amazon php SDK that can be found here: https://webservices.amazon.com/paapi5/documentation/quick-start/using-sd...
It uses libraries support, READ the INSTALL.txt!
It turns out there is a guzzle dependecy problem and if we update to the latest sdk we get dependecy war BUT can not update becasue drupal core D9 doesnt use the latest guzzle. So you HAVE TO USE THE REPOSITORY DWW SET UP!

Delete everything expect the src and vendor folder!es but i couldnt figure that out by now. Samples welcome, se issue queue.

New version uses libraries folder

Update from the amazon module

Read this about the db updates.
https://www.drupal.org/project/amazon_pa/issues/3277715

IMPORTANT Info D8 1.5, move the sdk from module folder to /libraries "

Info Update from 1.4 to 1.5 for D7

Be sure to redownload the sdk into the library folder, see install txt!

My motivation for maintaining this is, that i use the amazon module actively on multiple sites.

Drupal 9

Drupal 9 development will be done ONLY in 2.0.x. Currently that is a development version. I run it on a site i port to D9. When i put it live i will do a stable release because i tested it on my site.

Drupal 8

The D8 is a close port of the D7 version. Media integration and the participants views handler,autocomplete field is not ported yet. Any co-maintainers welcome.

Current Features D8

  • Normal field and field formatters
  • Textfilter
  • Views integration for basic fields. Field Formatters do not work @todo
  • TODO: Use libararies, patches welcome.

Drupal 7

Current Features D7

  1. Amazon Filters(same as in the original module)
  2. Amazon-Field for ASINS
  3. Amazon-Autocomplete field has been kept for legacy but autocompletionm runs too many requests and is disabled. See #3093324: Port to Drupal 8 leftover
  4. Views implementation (needs testing by users)
  5. Other modules have not been ported
  6. I removed all hooks(mainly was for amazon-store integration)

Important: Amazon PAAPI V5 throtteling and API-Rates!

See documentation.

Update/Migrate from "amazon module" to "amazon_pa"

ALWAYS test this on a local copy, NEVER EVER live!
I tried to do it as a drop in replacement for the "amazon" module. Here is how i updated from amazon-1.x to amazon_pa.
This is a hacky method but it works and is quick.

  1. I was using 7.x-1-1 and updated to 7.x-2.0 first
  2. Run "drush updb" to run updates
  3. Delete the "amazon" module form the file system
  4. Download amazon_pa and put it into the module folder
  5. You need drush now! You do "drush cc all". drush rr (registry rebuild) also recommended
  6. The system complains about missing modules. Get: https://www.drupal.org/project/missing_module enable it "drush en missing_module" and run "drush rmm". Sometimes the first run is not enough, run "drush cron && drush cc all"and run "drush rmm" again. The "missing module" stuff should be gone. Continue.
  7. You go on the module page /admin/modules and enable Amazon PAAPI5 first. You get an error, ignore that and go back. The Module should now be active. Repeat that with amazon_media and amazon_filter.

I did that multiple times and it works.

You also need to migrate your old keys.

Removed features/developer infos/differences

I did not rename the asin module because it generates the fields where we hold asins.All other data can be regenerated with code automatically.

  1. I removed autocomplete because it causes throtteling very fast
  2. I removed the asin to ISBN and EAN conversion, because that also trigger sthrotteling very fast
  3. I rewrote the filter logic, that will cache up to 10 ASINS on the first request. That is neccessary because the filter is called for every token and if you have 10 tokens that would otherwise trigger 10 Requests in a second...throtteling.
  4. Removed all hooks to clean up stuff
  5. Removed customerreviews, as the new api doesnt support it yet?
  6. I did not change certain namings in the views integration to keep existing views working
  7. >I also removed the logic that updated items everywhere when they have expired(timestammp). Why? because if you visit a view listing 10 items that will trigger 10 requests in one second = throtteling. Only use the cron for updating infos now!

Problems/Errors/Amazon filter

  • Do add the filter AFTER "autobreak filter" or it will kill the template markup!

Amazon field mappings from 4 to 5 have changed

Sponsoring

This module is sponsored by my project that i use it on. For example

So i am really interested on the module to work because i use it on my projects and these are part of my job, meaning money!

Project information

Releases