Commit d542b206 by Tan Phat Nguyen

rake db

parent 9dc4433d
......@@ -34,7 +34,7 @@ namespace :db do
'ItemSearch.Shared.Condition' => 'New',
'ItemSearch.Shared.BrowseNode' => category_hash[category.name],
'ItemSearch.Shared.ResponseGroup' => 'Large',
'ItemSearch.SearchIndex' => category.name,
'ItemSearch.SearchIndex' => category.name.gsub(' ', ''),
'ItemSearch.1.ItemPage' => page_number,
'ItemSearch.2.ItemPage' => 10
})
......@@ -48,7 +48,11 @@ namespace :db do
if product.new_record?
product.category = category
if item['ItemAttributes'].has_key?('ListPrice')
product.price = item['ItemAttributes']['ListPrice']['FormattedPrice'][1..-1]
else
product.price = 20.0
end
if item['EditorialReviews']['EditorialReview'].kind_of?(Array)
product.description = item['EditorialReviews']['EditorialReview'][0]['Content']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment