The amazonnode and amazonitem tables should probably swap names, since the amazonitem table contains details for the amazon-nodes and the amazonnode table cross-references regular nodes with amazonnodes used for the amazon-items (among other things). Thinking of it, the amazon-item should be considered a node and the amazon-node which is a local copy of an item should be called item as it's a data object for an item/product at amazon.com, more or less.

However what I believe would make most sense is to only have one node type, basically what is currently called an amazon-item which contains a body as well product details. These could then be referenced to by other nodes by NID or ASIN.

Just some ideas, I understand it would take a lot of work. Module works great for me as it is now. I just posted them here for the record if someone else feels like coding anytime soon. :)

Comments

Prometheus6’s picture

The amazonitem table has a single copy of the data on an item, keyed on the asin.

The amazonnode table is a relationship table, linking a node with the data on its amazon item (or in the case of related book links, amazon items). This lets you have a single copy of the data no matter how many nodes use it.

solipsist’s picture

Thanks for replying.

Right, I know that, and you can still reference to amazon products even if they are more or less normal nodes with body (review). I think comments work great for sites that want user opinions on books for example and if you refer to an amazon product you could then opt to include the body or not (look at how they show related books at stylegala.com, I've done something similar).

I understand and agree with the one-many relationship here but I think introducing two new node types leads to more confusion than is necessary. It would be better to have one node type for amazon products which could be used in the same way it works now.

What I suggest is renaming amazon-node to amazon-product, it makes more sense and include a body for the node type. This way you can either use the nodes as they are in a web store, or you can refer to them from other nodes.

The current amazon-node, not required but available for those who would like to use it, should be called an amazon-product-review node as it attaches a product from amazon.com and lets you add a review/text about it, and it can either a) take the body from the product node or b) have its own and while speaking of features, could also pull amazon.com user reviews and rating thru ECS for the product.

This way you will only need one node to set up a simple review, right now it is a two-step process.

Other benefits would be the ease of automating it, saying when you add the product from amazon.com you can opt to use the amazon.com review and description for the amazon-product's body, or you can choose to create a review for the item at the same time which could include description as well as amazon.com reviews and rating.

Anyway, it's just an idea and perhaps I should get started on it myself as soon as possible, less talk more action you know. I'm very grateful for the work you've done on this module already, thanks for sharing it with rest of us.

Prometheus6’s picture

Status: Active » Closed (works as designed)