nicktechtt,
No problem. I have some good and bad news for you on this request…
The good news – there is already a method in the plugin to allow you to return search results (although there is no documentation on it yet).
The bad news – it does not yet have a way to use the 90 day cookie Cart URL. And you need to add some styles or they may look a bit weird.
Since this was JUST put in the plugin in the last 2 updates, there are still some tweaks we need to do to it, which were planned before we announced the feature.
So, if you want to use it, here is what you need to do:
Use the amazon-product-search shortcode (this is new), as so:
[amazon-product-search keywords="samsung+galaxy+s6+edge+plus+waterproof+case" fields="lg-image,title,new-price" container_class="amazon-product-search"]
Right now your search string needs to be encoded and should be all lowercase (encoded spaces can be ‘+’ or ‘%20’ – I used ‘+’ in my example which is easier to read).
Fields work just like the amazon-elements fields.
Also right now, it shows all the results (up to 10) which is called the ‘first page’ results from amazon. If you did want page 2 or 3 (I think you can go up to 99), you add the parameter of item_page
and the page number, and it will return the ‘second page’ results and so on.
example:
[amazon-product-search keywords="samsung+galaxy+s6+edge+plus+waterproof+case" fields="lg-image,title,new-price" container_class="amazon-product-search" item_page="2"]
Additionally, you can specify a search_index
for the search as well. These vary by locale, but in the US, they are (default is All
):
'All','Wine','Wireless','ArtsAndCrafts','Miscellaneous','Electronics','Jewelry','MobileApps',
'Photo','Shoes','KindleStore','Automotive','MusicalInstruments','DigitalMusic',
'GiftCards','FashionBaby','FashionGirls','GourmetFood','HomeGarden','MusicTracks','UnboxVideo','FashionWomen',
'VideoGames','FashionMen','Kitchen','Video','Software','Beauty','Grocery',
'FashionBoys','Industrial','PetSupplies','OfficeProducts',
'Magazines','Watches','Luggage','OutdoorLiving','Toys','SportingGoods','PCHardware','Movies','Books','Collectibles','VHS','MP3Downloads',
'Fashion','Tools','Baby','Apparel','Marketplace','DVD','Appliances',
'Music','LawnAndGarden','WirelessAccessories','Blended','HealthPersonalCare','Classical'
example:
[amazon-product-search keywords="samsung+galaxy+s6+edge+plus+waterproof+case" fields="lg-image,title,new-price" container_class="amazon-product-search" search_index="Electronics"]
And for the styles. I would add these to your styles to give you a starting point:
.amazon-product-search {
clear:both;
margin: 10% auto;
}
.amazon-product-search .amazon-element-title h2 {
font-size: 1rem;
line-height: 1.35;
font-weight: normal;
}
.amazon-product-search .amazon-element-title h2 a {
font-weight: normal;
}
The cart URL (90 day cookie) will be in the next update as well as some styling and a few other additions – and some documentation as well.
Hope this helps you out!
Don