Product descriptions can be nil without disrupting checkout

This commit is contained in:
Vincent Charles 2011-02-27 00:42:34 -08:00
parent fbda454048
commit bb66ed7ce5
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ CheckoutController.class_eval do
items = order.line_items.map do |item| items = order.line_items.map do |item|
price = (item.price * 100).to_i # convert for gateway price = (item.price * 100).to_i # convert for gateway
{ :name => item.variant.product.name, { :name => item.variant.product.name,
:description => item.variant.product.description[0..120], :description => (item.variant.product.description[0..120] if item.variant.product.description),
:sku => item.variant.sku, :sku => item.variant.sku,
:qty => item.quantity, :qty => item.quantity,
:amount => price, :amount => price,