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
class BulkOrder | |
include ActiveModel::Validations | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
attr_accessor :amex, :billing_address, :billing_city, :billing_company, | |
:billing_email_address, :billing_fax, :billing_phone, | |
:billing_state, :billing_zip, :bulk_order_date, :check, | |
:corporate_gifting, :corporate_loyalty_program, :credit_card, |
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
class BulkOrder | |
include ActiveModel::Validations | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
attr_accessor :amex, :billing_address, :billing_city, :billing_company, | |
:billing_email_address, :billing_fax, :billing_phone, | |
:billing_state, :billing_zip, :bulk_order_date, :check, | |
:corporate_gifting, :corporate_loyalty_program, :credit_card, |
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
class BulkOrdersController < ApplicationController | |
def new | |
@bulk_order = BulkOrder.new | |
end | |
def create | |
@bulk_order = BulkOrder.new(params[:bulk_order]) | |
if @bulk_order.save | |
redirect_to bulk_orders_url |
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
<html> | |
<head> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript"> | |
var $unique = $('input.unique'); | |
$unique.click(function() { | |
$unique.removeAttr('checked'); | |
$(this).attr('checked', true); |
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
/*! | |
* jQuery JavaScript Library v1.7.2 | |
* http://jquery.com/ | |
* | |
* Copyright 2011, John Resig | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ |
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
%h3 Payment Method | |
.fields#check_checkbox | |
= f.label :check | |
= f.check_box :check | |
.fields#check_description | |
%p | |
%strong Payable to: | |
%p CouponTrade, Inc. | |
%p 214 West Ohio Street, Suite 4 | |
%p Chicago, IL 60654 |
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
- @shipment_portion.line_items.each do |item| | |
- if item.product.electronic | |
%h1{ :style => "font-size: 23px; color: #192b5b;" } Congrats! Your gift card has been sold, funds are now pending. | |
%p{ :style => "font-size: 13px; color: #848687;" } | |
Your gift card | |
= "#{item.variant.product.name}, #{number_to_currency(item.product.value)}" | |
has sold for | |
= "#{number_to_currency(item.product.price)}." | |
- if item.transaction | |
We will deposit |
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
%p{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.check ? 'Check' : '' | |
%p{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.credit_card ? 'Credit Card' : '' | |
%ul | |
%li{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.discover ? 'Discover' : '' | |
%li{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.amex ? 'America Express' : '' | |
%li{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.mc ? 'Mastercard' : '' | |
%li{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.visa ? 'Visa' : '' |
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
%p{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.check=="1" ? 'Check' : '' | |
%p{ :style => "font-size: 13px; color: #848687;" }= @bulk_order.credit_card=="1" ? 'Credit Card' : '' |
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
class BulkOrder | |
include ActiveModel::Validations | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
attr_accessor :amex, :billing_address, :billing_city, | |
:billing_company, :billing_email_address, | |
:billing_fax, :billing_phone, :billing_state, | |
:billing_zip, :bulk_order_date, :check, |