Closed (fixed)
Project:
Amazon associate tools
Version:
5.x-1.5
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 May 2008 at 14:56 UTC
Updated:
1 Oct 2008 at 20:52 UTC
Just checking to see if anyone has had success in refreshing prices under the manage tab. About 90% of my prices are marked as stale, but even setting to 1 pass (10 items), the prices do not update...the same # remains marked as stale. Nothing shows up in the logs after the attempt so no errors seem to be occurring.
Comments
Comment #1
BradM commentedFixed this one. I've set it so now each time an amazon node is viewed, (a) it runs the built-in price refresher to check for stale prices, and (b) updates the node itself if it is old -- before it displays the actual data. It shouldn't weigh too heavily on the server as the refresher itself only updates 10 stale prices at a time.
This has also fixed the problem with a ton of images that are no longer available due to Amazon changing the way they name images.
In the function
theme_amazon_node, insert this code before any of the existing code:Brad
Comment #2
asb commentedHi Brad,
nice work!
I applied this code in "amazon.module" directly below the "function theme_amazon_node($node) {" statement;
* pros:
** (a) site and module seem not to break (very good!);
** (b) images and pricing data are refreshed when editing and saving the node ;-)
* cons:
** (a) prices and images are not refreshed when simply loading a node, but after refreshing the node;
** (b) this fix seems not to have any effect for images/data embedded in blocks provided by AAT like "We recommend".
** (c) Also, this fix seems to to correct data from the AAT node type "amazon-node".
However, this fix helps greatly refreshing AAT data - even when it will take some time to repair 25.000 nodes ;-)
Thanks again & greetings, -asb
Comment #3
BradM commentedLOL yeah I did notice after posting that it refreshes after the fact...but at least it's updating. ;) I'm not exactly sure why, as I thought I put it in a logical place. But I'm just a hack so the fact that it's working is a surprise in itself. ;)
EDIT> just a thought, maybe it doesn't update on its own because Drupal is displaying a cached page? Don't know enough about the inner workings to make sense of it all.
It doesn't update blocks, as that is in a separate section I believe. Try adding the same code in the function
amazon_block... not exactly sure where to place it though. I just figured I'd wait till the fix trickled through my db, as I only have about 4000 items to refresh. It shouldn't take too long -- it's been 2 days since I implemented it, and it's refreshed about 3000 items. On a busier site, it will probably go faster than that.Brad
Comment #4
MGParisi commentedI believe It doesn't change the current $node to include the new data
Comment #5
MGParisi commentedThe patch is applied to http://drupal.org/node/289780#comment-945539
The node update issue is not yet solved:( This will remain open
Comment #6
MGParisi commentedfixed, should be in dev
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.