This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aboutyou-sdk' | |
ay = AY.new('100', '3ed93394c2b5ebd12c104b177b928ad0') | |
criteria = ay.product_search_criteria.select_product_fields([ | |
AboutYou::SDK::Criteria::ProductFields::DEFAULT_IMAGE | |
]) | |
products = ay.fetch_product_search(criteria).products | |
products.each do |product| | |
puts 'Image Source:' + product.default_image.url(500, 500) | |
puts product.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install aboutyou-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Der Aufruf der Methode getUrl(250, 250) sorgt dafür, dass das Bild in der entsprechenden Größe angefordert und angezeigt wird. | |
require 'aboutyou-sdk' | |
shopApi = AY.new(100, '3ed93394c2b5ebd12c104b177b928ad0') | |
criteria = shopApi.productSearchCriteria.selectProductFields([ | |
AboutYou::SDK::Criteria::ProductFields::DEFAULT_IMAGE | |
]) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
require 'aboutyou-sdk' | |
shopApi = Ay.new(100, '3ed93394c2b5ebd12c104b177b928ad0') | |
%> | |
<head> | |
<%=shopApi.javaScriptTag%> | |
<script type="text/javascript"> | |
window.ayAsyncInit = function() { | |
// do stuff here with AY object | |
} |