Page no: B43
Table of contents
Load Amazon Books is a new plugin that adds all books for one author to the site.
The design has three parts.
- The new plugin Author Post Type, that allows for the new post types Books, Video and Audio.
- The “pure Amazon loader” that calls the Amazon API. The original specification is here and the DB design and mapping.
- A filter on the authors and contributors, that restrict the results of the Amazon search only to the required person. The author filter is here.
This page contains different GUI aspects and exception handling.
Empty first or last name should give exception
If the WordPress user has an empty first or last name, then bring an exception. “Fill both first and last name first!” |
|
Call to Amazon should fill params into GUIWhen I press the “Add Books” Button under users, the params are set in the URL. The GUI is just for testing. So the “Add Books” should Preferred is 1), so can adjust the options [niki] This step is skiped. If you click on “add books” the books are automatical added. |
|
Add option for switched syntax in Amazon loader GUI <lastname> <firstname>Polish name allows for Rybinski Krzysztof Lastname space firstname He has written 3 books, but they all get ignored by the filter. At the same time you can remove the superfluous attributes category and post parent IMPORTANT: We can do that manually, simply exchange first and last in the input, so I just need an estimate |
(image missing) |
Old Amazon API requestsAmazon Book Loader is not working currently We had an old Amazon API request for taking books. Now it is fixed and worked normal. |
|
Associate on Books LoaderT was missing at the beginning |
|
AWSWhy do we need the AWS for loading books?It is required by Amazon to access their database with books. Before you access and make queries to Amazon, you have to log in. |
|
It is related to the author profile pages under the feed site menu.
Requirements
|
|
Reload BooksHow to
|
Additional attributes not existing in WP_POSTS
The additional attributes are not mandatory. They are probably stored in Post_meta.
- Publisher
- Manufacturer
- Amazon Store
- ISBN (European identifier)
- ASIN (book identifier)
- EAN (international identifier)
- Edition
- Number Pages
- Link to Amazon / Youtube page
Versioning of “book posts” is not a must, but if it is easy to implement then we do it.
Final Mapping
The following is the mapping from Amazon API to our fields.
Table Target Fields | Amazon API fields and example data | Data Type | Multiple Value | Comment |
WP_POST_META | ||||
Amazon_asin | <ItemAttributes><ASIN>000000</ASIN></ItemAttributes> OR <ASIN>00000</ASIN> |
WP meta field | N | |
Amazon_author | <ItemAttributes><Author>Lal Hardy</Author></ItemAttributes>
OR <Author>Lal Hardy</Author> |
LONGTEXT | Y | |
Amazon_binding | <ItemAttributes><Binding>Paperback</Binding></ItemAttributes> | LONGTEXT | – | Single value |
amazon_condition | <Feature>Condition: New</Feature> | LONGTEXT | ?? | <feature> substructure to be analyzed
Amazon API does not return Feature |
amazon_contributers | <ItemAttributes><Creator>XXXX</Creator></ItemAttributes>
OR <Creator>XXXX</Creator> |
Y | ||
amazon_ean | <ItemAttributes><EAN>9780762436316</EAN></ItemAttributes> | LONGTEXT | N | Single value |
amazon_edition | <ItemAttributes><Edition>XXXX</Edition></ItemAttributes> | LONGTEXT | N | Contains numbers and text |
amazon_isbn | <ItemAttributes><ISBN>076243631X</ISBN><ItemAttributes> | LONGTEXT | N | |
amazon_isbn13 | <Feature>ISBN13: 9780762436316</Feature> | LONGTEXT | Not implemented, <feature> structure to be analyzed | |
amazon_lang | <ItemAttributes><Language>076243631X</Language><ItemAttributes> | Y | ||
amazon_manufacturer | <ItemAttributes><Manufacturer>Running Press</Manufacturer></ItemAttributes> | LONGTEXT | Y | |
amazon_number_of_items | <ItemAttributes><NumberOfItems>1</NumberOfItems></ItemAttributes> | LONGTEXT | N | String usually contains only numbers |
amazon_number_of_pages | <ItemAttributes><NumberOfPages>XXX</Manufacturer></NumberOfPages> | LONGTEXT | N | String usually contains only numbers difference |
amazon_pages | <ItemAttributes><NumberOfPages>XXX</Manufacturer></NumberOfPages> | LONGTEXT | N | String usually contains only numbers |
amazon_product_group | <ItemAttributes><ProductGroup>Book</ProductGroup></ItemAttributes> | LONGTEXT | N | |
amazon_pubdate | <ItemAttributes><PublicationDate>2009-03-10</PublicationDate></ItemAttributes> | LONGTEXT | N | |
amazon_publisher | <ItemAttributes><Publisher>Running Press</Publisher></ItemAttributes> | LONGTEXT | N | |
amazon_store | From the GUI form | |||
amazon_studio | <ItemAttributes><Studio>Running Press</Studio></ItemAttributes> | LONGTEXT | N | |
amazon_title | <ItemAttributes><Title>The Mammoth Book of Tattoos</Title></ItemAttributes>
OR <Title>The Mammoth Book of Tattoos</Title> |
LONGTEXT | N | |
amazon_url | <DetailPageURL>http://amazon.xxx/xxxxxx</DetailPageURL> | LONGTEXT | N | |
WP_POSTS | ||||
id | Autogenerated | N | ||
post_date | Generated from amazon_pubdate with format YYYY-MM-DD | DATETIME | N | |
post_title | Using amazon_title, but with pre-formatting | N | ||
post_excerpt | Autogenerated | N | ||
post_content | <EditorialReviews><EditorialReview><Content>XXXXX</Content></EditorialReview></EditorialReviews>
but with pre-formatting |
N | ||
post_parent | EMPTY | N | ||
post_author | Using Amazon_author but pre-formatted and compared with wp_users table | N | ||
post_type | books | N | ||
Other fields that are not empty??? Which fields have default values? |
No ISBN-13 in Amazon
Amazon uses two different ISBN fields.
Old standard: ISBN-10. We currently use it.
New Standard: ISBN-13. We should load this field, too.
If we find it, we rename the GUI to ISBN-10 and ISBN-13
[niki] The amazon doesn’t give us ISBN-13, so we can’t load it.
ISBN 10 / ISBN 13
Additional Doc: Link
What is the difference between ISBN 10 and ISBN 13?
See more forISBN stands for International Standard Book Number. In the past publishers used ISBN 10, which refers to ISBN numbers that are 10 digits long. In 2001, a working group was set up to revise the ISBN standard. In January 2007, the length of ISBN numbers was increased from 10 to 13 digits, to ensure that they did not run out of numbers.
The only difference between an ISBN 10 and an ISBN 13 are in the first three digits and the last digit. The first three digits are called the prefix element and the last digit is called the check digit. You can find further details about the format of ISBN numbers from the International ISBN Agency (Link).
Example of an ISBN 10: ISBN 85-254-1293-7
Example of an ISBN 13: ISBN 978–85-254-1293-5The prefix element is issued by GS1. Prefixes that have already been issued by GS1 are 978 and 979. The GS1 agency (Link) is responsible for issuing unique numbers, to ensure the reliable identification of products and assets. GS1 is responsible for issuing bar codes worldwide. The addition of the prefix element ensures that ISBN 13 is compatible with the worldwide bar coding scheme.
The ISBN number should be displayed in eye readable format along the top of the bar code and along the bottom in EAN barcode format. You can find out more about bar codes for books from Book Industry Communications (Link).
All ISBN numbers should now have 13 digits. If you have purchased ISBN 10s, you will need to convert them into ISBN 13s. You can convert them into ISBN 10s using an ISBN Convertor.