I am using this crazy cart api (that I must use) to pull product information. I need to store (Name, Price & short description) and pull that information on the fly.
All that I can seem to complete is:
@product_card = Hash.new(0)
products.each do |product|
@product_card[product['name']] = @product_card[product['name']] = client.call('call' ,session_id ,"product.info#{product[id]}")
end
<% @product_card.each do |key, value| %>
<p>Key: <%= key %></p>
<p>Value: <% value %></p>
what I would like to do is call on the @Hash.name @Hash.price @Hash.more I have been reading this all day and still can not do what I need.
I would be thankful for any help or links and this point.
Aucun commentaire:
Enregistrer un commentaire