Skip to content

Instantly share code, notes, and snippets.

@ElliotGage
ElliotGage / This works
Created October 26, 2012 18:21
Spree 1.1.3 - Deface::Override works fine, DLS doesn't
Deface::Override.new(:virtual_path => "spree/products/_cart_form",
:name => "free_shipping",
:insert_bottom => "span.price", :text => " - Free Shipping")
@ElliotGage
ElliotGage / create_international_zone.rb
Created September 27, 2012 17:58
International Shipping
# load "#{Rails.root}/lib/create_international_zone.rb"
#Create International Zone with all Countries
zone = Spree::Zone.where(:name => 'International').first
if zone.nil?
zone = Spree::Zone.new
zone.name = 'International'
zone.description = "All Countries"
zone.default_tax = false
zone.save
@ElliotGage
ElliotGage / deface-override
Created September 7, 2012 18:33
deface-override
Deface::Override.new(:virtual_path => "spree/shared/_taxonomies",
:name => "free_shipping",
:insert_top => "#taxonomies", :text => "<h6 class='taxonomy-root'>Free Shipping on Orders over $40.00!</h6><br>")
@ElliotGage
ElliotGage / orderdetailerror
Created August 28, 2012 19:47
order detail error
I'm getting an error from the order_details partial. See below.
The order has processed just fine, the card is authorized fine... but the active merchant type? look-up returns nil on some cards, which is stored on the payment card type as nil which then bubbles up an error from the order_details partial.
Error:
ActionView::Template::Error (creditcards/icons/.png isn't precompiled):
26: <div class="payment-info">
27: <% unless order.creditcards.empty? %>
28: <span class="cc-type">
29: <%= image_tag "creditcards/icons/#{order.creditcards.first.cc_
type}.png" %>