Sha256: 0c015612efac26dc0c9d6625cfe89770e350f37e7f52a1d3f0d1c888288cb141

Contents?: true

Size: 1.93 KB

Versions: 1

Compression:

Stored size: 1.93 KB

Contents

- total = 0
%section.container
	%table.table
		%thead
			%tr
				%th{colspan: 2} ITEM
				%th COLOR & SIZE
				%th QTY
				%th UNIT PRICE
				%th TOTAL PRICE
				%th

		%tbody
			- if current_quote.line_items.size > 0
				- current_quote.line_items.each do |line_item|
					- total += line_item.qty_ordered.to_i * line_item.product.price.to_i

					%tr
						%td
							- if !line_item.product.assets.empty?
								= image_tag line_item.product.assets.first.asset_file.file.url(:default_index)

							- elsif !line_item.product.configurable_products.first.assets.empty?
								= image_tag line_item.product.configurable_products.first.assets.first.asset_file.file.url(:default_index)

						%td= line_item.product.attribute_value('name')
						%td= #"Size: #{line_item.product.attribute_value('size')}"
						%td= number_with_precision(line_item.qty_ordered.to_i, precision: 0)
						%td= number_to_currency(line_item.product.attribute_value('price'))
						%td= number_to_currency((line_item.product.attribute_value('price').to_i * line_item.qty_ordered).to_i)
						%td= link_to 'remove', gemgento.cart_url(:activity => 'remove_item', :product_id => line_item.product_id), :method => 'patch'
			- else
				%tr
					%td{colspan: 7}
						%p
							Your have no items in your cart...
		%tfoot
			%tr
				%td{colspan: 3}
				%td{colspan: 2}
					= text_field_tag "promo_code"
				%td{colspan: 2}
					= button_tag "ENTER"
			%tr
				%td{colspan: 3}
				%td.label{colspan: 2}
					ITEM TOTAL
				%td.value{colspan: 2}
					= number_to_currency(total)
			%tr
				%td{colspan: 3}
				%td.label{colspan: 2}
					SHIPPING FEE
				%td.value{colspan: 2}
					= number_to_currency(current_quote.shipping_amount)
			%tr
				%td{colspan: 3}
				%td.label{colspan: 2}
					SUBTOTAL
				%td.value{colspan: 2}
					= number_to_currency(current_quote.grand_total)

			%tr
				%td{colspan: 3}
				%td{colspan: 4}
					= link_to checkout_login_path do
						= button_tag "CONTINUE TO CHECKOUT"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gemgento-2.8.0 app/views/gemgento/cart/show.html.haml