Amazon Reloaded for WordPress の事。
このブログの記事へのAmazon商品の追加は「Amazon Reloaded for WordPress」を使っているのですが、Amazonが行った、2009年8月16日からのAPI更新にはまだ正式に対応してないと事ですね。
作者さんのブログにもいろいろ返事が来ていますね。中には新APIに対応したカスタマイズプラグインを配布してくれている人もいますので、検討してみるのもいいですね。
–
ところで、このプラグインを使ってて、僕のアフィリエイトコードだとうまく反映されない事がありました。
以下のようなエラーが出てしまい、DBに登録できません。
Invalid associate ID. Please make sure you have entered the correct id.
そこで、ちょっとプログラムを変更。
Amazon-Reloaded.php内の「function options_page( )」部分。
if( !preg_match( ‘/^[a-zA-Z0-9\-]*$/’, $_POST[ 'amazon-reloaded-associate-id' ] ) ) {
$amazon_reloaded_errors[] = __( ‘Invalid associate ID. Please make sure you have entered the correct id.’ , ‘amazon-reloaded-for-wordpress’);
$associate_id = $this->options[ 'id' ];
} else {を下記に変更。
if( !preg_match( ‘/^[a-zA-Z0-9\-\_]*$/’, $_POST[ 'amazon-reloaded-associate-id' ] ) ) {
$amazon_reloaded_errors[] = __( ‘Invalid associate ID. Please make sure you have entered the correct id.’ , ‘amazon-reloaded-for-wordpress’);
$associate_id = $this->options[ 'id' ];
} else {
変更内容は、preg_matchにアンダーバーを使えるようにしただけですね。
ところで、正式にプラグイン早く更新されないかなーっとちょっと期待。
Tags: amazon, Wordpress, プラグイン
This entry was posted on 木曜日, 9月 3rd, 2009 at 11:55 AM and is filed under Wordpress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
![カメラ日和 2009年 09月号 [雑誌] VOL.26 Image of カメラ日和 2009年 09月号 [雑誌] VOL.26](http://ecx.images-amazon.com/images/I/51gzynwNScL._SL160_.jpg)