Auto amazon product widget is a widget used to display the product from amazon with simple enough to use. You can use the auto amazon product widget, without having to build a website amazon. By using a blog / site of yours that has the highest visitor will increase your amazon earning.
If previously I’ve made a plugin on Free Amazon Asin Grabber Plugin and Boost your Earning with Amazon Custom Thumbnail Plugin, this time I am not going to teach you how to increase your amazon earnings but how to make amazon auto generated products to be displayed as a sidebar widget which will display the amazon products according to the keywords you are looking for.
If you still do not understand what it is auto amazon product widget, please see the video footage below, how to use auto amazon product widget
Table of Contents
How to install and use auto amazon product widget
• Before you can download this amazon auto product widget on wordpress site,you can download from this my link below
• Upload and Install auto amazon product plugin on your wordpress site.
• Go to you widget window (appearance -> widgets).
• Drag auto amazon product widget on your sidebar widget
• Fill the requirement field (Please do not left blank, because all of these fields, is needed so that plugin can run well )
• Check your side now 🙂
The advantage of using Amazon product widget
• You can show amazon product without build your amazon site.
• You don’t need more skill to show amazon product.
• an attractive amazon product display can increase your earning.
• You can show product with your interested keyword.
• Its Free and If you wish, you can make a donation to me 🙂
The lack of this amazon auto product
• A slightly to burdensome your hosting site, because this plugin work to grab amazon xml product from amazon site.
• Auto Amazon product widget still have many bugs which I do not know.
Maybe this is the long-awaited session ,how do I make auto amazon product widget
• Please create auto-amazon-product-widget folder.
• Create a php file name as auto-amazon-product-widget.php
• Copy this syntax below on your auto-amazon-product-widget.php file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | <?php /* Plugin Name: Auto amazon product widget by seegatesite Plugin URI: https://seegatesite.com/ Description: Creating an interactive wordpress widget to show amazon`s product with autogenerated widget. Version: 1.0 Author: Seegatesite Author URI: https://seegatesite.com */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ if ( ! defined( 'ABSPATH' ) ) { exit; // disable direct access } wp_register_sidebar_widget('aapws_id','Auto amazon product Widget','aapws_display',array('description' => 'Auto amazon product widgets by seegatesite.com')); wp_register_widget_control('aapws_id','aapws','aapws_control'); function aapws_control($args=array(), $params=array()) { if (isset($_POST['submitted'])) { update_option('aapws_title', $_POST['widgettitle']); update_option('aapws_tag_id', $_POST['tag_id']); update_option('aapws_pub_key', $_POST['pub_key']); update_option('aapws_priv_key', $_POST['priv_key']); update_option('aapws_searchindex', $_POST['searchindex']); update_option('aapws_keyword', $_POST['keyword']); update_option('aapws_location', $_POST['location']); update_option('aapws_count', $_POST['count']); } //load options $widgettitle = get_option('aapws_title'); $tag_id = get_option('aapws_tag_id'); $pub_key = get_option('aapws_pub_key'); $priv_key = get_option('aapws_priv_key'); $searchindex = get_option('aapws_searchindex'); $keyword = get_option('aapws_keyword'); $location = get_option('aapws_location'); $count = get_option('aapws_count'); ?> Widget Title :<br /> <input type="text" class="widefat" name="widgettitle" value="<?php echo stripslashes($widgettitle); ?>" /> <br /><br /> Tag id :<br /> <input type="text" class="widefat" name="tag_id" value="<?php echo $tag_id; ?>" /> <br /><br /> Public key :<br /> <input type="text" class="widefat" name="pub_key" value="<?php echo $pub_key; ?>" /> <br /><br /> Private key :<br /> <input type="text" class="widefat" name="priv_key" value="<?php echo $priv_key; ?>" /> <br /><br /> Searchindex :<br /> <select class="widefat" name="searchindex"> <option value="All"<?php if($searchindex=="All") echo 'selected' ; ?> >All</option> <option value="Apparel"<?php if($searchindex=="Apparel") echo 'selected' ; ?> >Apparel</option> <option value="Appliances"<?php if($searchindex=="Appliances") echo 'selected' ; ?> >Appliances</option> <option value="ArtsAndCrafts"<?php if($searchindex=="ArtsAndCrafts") echo 'selected' ; ?> >ArtsAndCrafts</option> <option value="Automotive"<?php if($searchindex=="Automotive") echo 'selected' ; ?> >Automotive</option> <option value="Baby"<?php if($searchindex=="Baby") echo 'selected' ; ?> >Baby</option> <option value="Beauty"<?php if($searchindex=="Beauty") echo 'selected' ; ?> >Beauty</option> <option value="Blended"<?php if($searchindex=="Blended") echo 'selected' ; ?> >Blended</option> <option value="Books"<?php if($searchindex=="Books") echo 'selected' ; ?> >Books</option> <option value="Classical"<?php if($searchindex=="Classical") echo 'selected' ; ?> >Classical</option> <option value="Collectibles"<?php if($searchindex=="Collectibles") echo 'selected' ; ?> >Collectibles</option> <option value="DigitalMusic"<?php if($searchindex=="DigitalMusic") echo 'selected' ; ?> >DigitalMusic</option> <option value="Grocery"<?php if($searchindex=="Grocery") echo 'selected' ; ?> >Grocery</option> <option value="DVD"<?php if($searchindex=="DVD") echo 'selected' ; ?> >DVD</option> <option value="Electronics"<?php if($searchindex=="Electronics") echo 'selected' ; ?> >Electronics</option> <option value="HealthPersonalCare"<?php if($searchindex=="HealthPersonalCare") echo 'selected' ; ?> >HealthPersonalCare</option> <option value="HomeGarden"<?php if($searchindex=="HomeGarden") echo 'selected' ; ?> >HomeGarden</option> <option value="Industrial"<?php if($searchindex=="Industrial") echo 'selected' ; ?> >Industrial</option> <option value="Jewelry"<?php if($searchindex=="Jewelry") echo 'selected' ; ?> >Jewelry</option> <option value="KindleStore"<?php if($searchindex=="KindleStore") echo 'selected' ; ?> >KindleStore</option> <option value="Kitchen"<?php if($searchindex=="Kitchen") echo 'selected' ; ?> >Kitchen</option> <option value="LawnGarden"<?php if($searchindex=="LawnGarden") echo 'selected' ; ?> >LawnGarden</option> <option value="Magazines"<?php if($searchindex=="Magazines") echo 'selected' ; ?> >Magazines</option> <option value="Marketplace"<?php if($searchindex=="Marketplace") echo 'selected' ; ?> >Marketplace</option> <option value="Merchants"<?php if($searchindex=="Merchants") echo 'selected' ; ?> >Merchants</option> <option value="Miscellaneous"<?php if($searchindex=="Miscellaneous") echo 'selected' ; ?> >Miscellaneous</option> <option value="MobileApps"<?php if($searchindex=="MobileApps") echo 'selected' ; ?> >MobileApps</option> <option value="MP3Downloads"<?php if($searchindex=="MP3Downloads") echo 'selected' ; ?> >MP3Downloads</option> <option value="Music"<?php if($searchindex=="Music") echo 'selected' ; ?> >Music</option> <option value="MusicalInstruments"<?php if($searchindex=="MusicalInstruments") echo 'selected' ; ?> >MusicalInstruments</option> <option value="MusicTracks"<?php if($searchindex=="MusicTracks") echo 'selected' ; ?> >MusicTracks</option> <option value="OfficeProducts"<?php if($searchindex=="OfficeProducts") echo 'selected' ; ?> >OfficeProducts</option> <option value="OutdoorLiving"<?php if($searchindex=="OutdoorLiving") echo 'selected' ; ?> >OutdoorLiving</option> <option value="PCHardware"<?php if($searchindex=="PCHardware") echo 'selected' ; ?> >PCHardware</option> <option value="PetSupplies"<?php if($searchindex=="PetSupplies") echo 'selected' ; ?> >PetSupplies</option> <option value="Photo"<?php if($searchindex=="Photo") echo 'selected' ; ?> >Photo</option> <option value="Shoes"<?php if($searchindex=="Shoes") echo 'selected' ; ?> >Shoes</option> <option value="Software"<?php if($searchindex=="Software") echo 'selected' ; ?> >Software</option> <option value="SportingGoods"<?php if($searchindex=="SportingGoods") echo 'selected' ; ?> >SportingGoods</option> <option value="Tools"<?php if($searchindex=="Tools") echo 'selected' ; ?> >Tools</option> <option value="Toys"<?php if($searchindex=="Toys") echo 'selected' ; ?> >Toys</option> <option value="UnboxVideo"<?php if($searchindex=="UnboxVideo") echo 'selected' ; ?> >UnboxVideo</option> <option value="VHS"<?php if($searchindex=="VHS") echo 'selected' ; ?> >VHS</option> <option value="Video"<?php if($searchindex=="Video") echo 'selected' ; ?> >Video</option> <option value="VideoGames"<?php if($searchindex=="VideoGames") echo 'selected' ; ?> >VideoGames</option> <option value="Watches"<?php if($searchindex=="Watches") echo 'selected' ; ?> >Watches</option> <option value="Wireless"<?php if($searchindex=="Wireless") echo 'selected' ; ?> >Wireless</option> <option value="WirelessAccessories"<?php if($searchindex=="WirelessAccessories") echo 'selected' ; ?> >WirelessAccessories</option> </select> <br /><br /> Keyword :<br /> <input type="text" class="widefat" name="keyword" value="<?php echo $keyword; ?>" /> <br /><br /> Location :<br /> <select name="location"> <option value="ca" <?php if($location=='ca') echo 'selected'; ?> >.ca</option> <option value="cn" <?php if($location=='cn') echo 'selected'; ?> >.cn</option> <option value="es" <?php if($location=='es') echo 'selected'; ?> >.es</option> <option value="fr" <?php if($location=='fr') echo 'selected'; ?> >.fr</option> <option value="in" <?php if($location=='in') echo 'selected'; ?> >.in</option> <option value="it" <?php if($location=='it') echo 'selected'; ?> >.it</option> <option value="co.jp" <?php if($location=='co.jp') echo 'selected'; ?> >.co.jp</option> <option value="co.uk" <?php if($location=='co.uk') echo 'selected'; ?> >.co.uk</option> <option value="com" <?php if($location=='com') echo 'selected'; ?> >.com</option> </select> <br /><br /> Count :<br /> <select name="count"> <?php for($i=1;$i<=10;$i++) { echo '<option value="'.$i.'" '; if($count==$i) echo ' selected'; echo ' >'.$i.'</option>'; } ?> </select> <br /><br /> <input type="hidden" name="submitted" value="1" /> <?php } function aapws_display($args=array(), $params=array()) { //load options $widgettitle = get_option('aapws_title'); $count = get_option('aapws_count'); if($widgettitle=='') { $jdw = 'Hot trends'; } else { $jdw = $widgettitle; } //widget output echo stripslashes($args['before_widget']); echo stripslashes($args['before_title']); echo stripslashes($jdw); echo stripslashes($args['after_title']); ?> <?php $url = aapws_aws_request(); //echo $url; $a = file_get_contents($url); $xml = new SimpleXmlElement($a, LIBXML_NOCDATA); echo "<ul>"; if(isset($xml->Items)) { $cnt = count($xml->Items->Item); for($i=0; $i<$cnt; $i++) { echo "<li>"; $detailurl = $xml->Items->Item[$i]->DetailPageURL; $img = $xml->Items->Item[$i]->SmallImage->URL; $title = $xml->Items->Item[$i]->ItemAttributes->Title; $price = $xml->Items->Item[$i]->OfferSummary->LowestNewPrice->FormattedPrice; $desc = $xml->Items->Item[$i]->EditorialReviews->EditorialReview->Content; echo '<div style="width:100%;"><p>'; echo '<img src="'.$img.'" align="left" />'; echo '<a href="'.$detailurl.'">'.substr($title,0,70).'...</a><br/>'; echo 'Price : '.$price.'<br/>'; echo strtolower(substr($desc,0,70)).'...<br/>'; echo '<a href="'.$detailurl.'">more detail</a>'; echo "</p></div><div style='clear:both'></div></li>"; if($i == $count-1) { break; } } } echo '</ul>'; ?> <?php wp_reset_query(); ?> <?php echo stripslashes($args['after_widget']); } function aapws_aws_request() { $tag_id = get_option('aapws_tag_id'); $pub_key = get_option('aapws_pub_key'); $priv_key = get_option('aapws_priv_key'); $searchindex = get_option('aapws_searchindex'); $keyword = get_option('aapws_keyword'); $location = get_option('aapws_location'); $params=array( 'Operation' => 'ItemSearch', 'Keywords' => $keyword , 'SearchIndex' => $searchindex , 'AssociateTag' => $tag_id, //tag url 'ResponseGroup' => 'Medium' , ); $ext=$location; //extension of server, see data.php ksort($params); $method = "GET"; $host = "ecs.amazonaws.".$ext; $uri = "/onca/xml"; $params["Service"] = "AWSECommerceService"; $params["AWSAccessKeyId"] = $pub_key; $params["Timestamp"] = gmdate("Y-m-d\TH:i:s\Z",time()); //may not be more than 15 minutes out of date! $params["Version"] = "2009-03-31"; ksort($params); $canonicalized_query = array(); foreach ($params as $param=>$value) { $param = str_replace("%7E", "~", rawurlencode($param)); $value = str_replace("%7E", "~", rawurlencode($value)); $canonicalized_query[] = $param."=".$value; } $canonicalized_query = implode("&", $canonicalized_query); $string_to_sign = $method."\n".$host."\n".$uri."\n".$canonicalized_query; $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $priv_key, True)); $signature = rawurlencode($signature); $request = "http://".$host.$uri."?".$canonicalized_query."&Signature=".$signature; return $request; } ?> |
• Compress you folder as zip file
• Voilaaa… your amazon auto product widget is ready to use now 🙂
Should I explain the syntax line above? I would certainly explain a few little syntax line above, because I am a good man, like to sharing and not arrogant … LOL :). I am not going to explain at length, because you certainly better than me in terms of programming
• To register your widget sidebar
1 2 | wp_register_sidebar_widget('aapws_id','Auto amazon product Widget','aapws_display',array('description' => 'Auto amazon product widgets by seegatesite.com')); wp_register_widget_control('aapws_id','aapws','aapws_control'); |
• Create control / parameter to show amazon auto product. You need Amazon api key (amazon public key and private ket) and your tag-id.
1 2 3 4 5 | function aapws_control($args=array(), $params=array()) { if (isset($_POST['submitted'])) …………………………………………………………………………………………………. } |
• To show your widget on your sidebar widget from this syntax
1 2 3 4 5 6 7 8 | function aapws_display($args=array(), $params=array()) { // ------------- copy from syntax above --------------------------// } function aapws_aws_request() { // ------------- copy from syntax above --------------------------// } |
To create this auto amazon product widget you just need 5 minutes of your time, I have not a had time to upload this plugin on wordpress official website, but I will try soon to launch auto amazon product widget on the wordpress official site to be enjoyed by everyone, my other amazon plugin you can read here amazon plugin.
Brother please tell me, how will i get public key and private key from? i don’t understand.
You can create public and private key from here http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html
<option value="de" >.de
this won’t work. Have any idea?
can you show me the error message ?