boom
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<% if digital.attachment_file_name.present? %>
|
||||
<%= digital.attachment_file_name %> (<%= number_to_human_size(digital.attachment_file_size) %>)
|
||||
<% else %>
|
||||
<%=t 'broken_file' %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="yui-g">
|
||||
<div class="yui-u first">
|
||||
<%= form_for(:digital, :url => { :controller => 'digitals', :action => 'create' }, :html => { :multipart => true }) do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= Variant.human_name %> "<%= variant.options_text %>"</legend>
|
||||
|
||||
<%= f.field_container :current_file do %>
|
||||
<strong><%=t 'current_file' %>:</strong><br/>
|
||||
<% if variant.digital? %>
|
||||
<%= render variant.digital %><%= %>
|
||||
<% else %>
|
||||
<%=t 'none' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p class="form-buttons">
|
||||
<% if variant.digital? %>
|
||||
<%= link_to t("delete_file"), admin_product_digital_url(:id => variant.digital.id), :confirm => t('delete_file_cofirmation', :filename => variant.digital.attachment_file_name), :method => :delete %>
|
||||
<% else %>
|
||||
|
||||
<%= f.field_container :file do %>
|
||||
<%= f.label :file, t("new_file") %> <span class="required">*</span><br/>
|
||||
<%= f.file_field :attachment %>
|
||||
<% end %>
|
||||
|
||||
<%= hidden_field_tag 'digital[variant_id]', variant.id %>
|
||||
|
||||
<%= button t("upload") %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
</div><br/>
|
||||
@@ -0,0 +1,20 @@
|
||||
<%= render :partial => 'admin/shared/product_sub_menu' %>
|
||||
<%= render :partial => 'admin/shared/product_tabs', :locals => {:current => "Digital Versions"} %>
|
||||
|
||||
<% if @product.has_variants? %>
|
||||
|
||||
<% for variant in @product.variants do %>
|
||||
<%= render 'form', :variant => variant %>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
This product has no variants.
|
||||
|
||||
<% if @product.master.digital? %>
|
||||
A digital version of this product currently exists:
|
||||
<%= render @product.master.digital %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'form', :variant => @product.master %>
|
||||
|
||||
<% end %>
|
||||
@@ -0,0 +1,5 @@
|
||||
<%#
|
||||
This is basically a switch that will render the appropriate "delivery choice" partial.
|
||||
When there are no physical items at all, there should be no different shipping methods to choose.
|
||||
%>
|
||||
<%= render @order.digital? && @order.digital_shipping_method.present? ? 'delivery_digital' : 'delivery_original' %>
|
||||
@@ -0,0 +1,12 @@
|
||||
<fieldset id='shipping_method'>
|
||||
<legend><%= t("shipping_method") %></legend>
|
||||
|
||||
<%= radio_button :order, :shipping_method_id, @order.digital_shipping_method[:id] %>
|
||||
<%==t 'digital_shipping', :email => current_user.email %> (<%= number_to_currency @order.digital_shipping_method[:cost] %>)
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-buttons">
|
||||
<input type="submit" class="continue button primary" value="<%=t("save_and_continue") %>"/>
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
<%#
|
||||
NOTE: The code below is an exact duplication of `spree_core/views/checkout/_delivery.html.erb´
|
||||
We overwrote the original so we retain access to it by cloning it here.
|
||||
Feel free to update the code below according to the original if needed!
|
||||
%>
|
||||
|
||||
<fieldset id='shipping_method'>
|
||||
<legend><%= t("shipping_method") %></legend>
|
||||
<div class="inner">
|
||||
<div id="methods">
|
||||
<p class="field radios">
|
||||
<% @order.rate_hash.each do |shipping_method| %>
|
||||
<% next if shipping_method[:id] == @order.digital_shipping_method[:id] %>
|
||||
<label>
|
||||
<%= radio_button(:order, :shipping_method_id, shipping_method[:id]) %>
|
||||
<%= shipping_method[:name] %> <%= number_to_currency shipping_method[:cost] %>
|
||||
</label><br />
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% if Spree::Config[:shipping_instructions] && @order.rate_hash.present? %>
|
||||
<p id="minstrs">
|
||||
<%= form.label :special_instructions, t("shipping_instructions") %><br />
|
||||
<%= form.text_area :special_instructions, :cols => 40, :rows => 7 %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-buttons">
|
||||
<input type="submit" class="continue button primary" value="<%=t("save_and_continue") %>"/>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
Dear Customer,
|
||||
|
||||
Please review and retain the following order information for your records.
|
||||
|
||||
============================================================
|
||||
Order Summary
|
||||
============================================================
|
||||
<% for item in @order.line_items %>
|
||||
<%= item.variant.sku %> <%=item.variant.product.name%> <%= variant_options(item.variant) %> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
||||
<% end %>
|
||||
============================================================
|
||||
Subtotal: <%= number_to_currency @order.item_total %>
|
||||
<% @order.adjustments.each do |adjustment| %>
|
||||
<%= "#{adjustment.label}: #{number_to_currency adjustment.amount}"%>
|
||||
<% end %>
|
||||
Order Total: <%= number_to_currency @order.total %>
|
||||
|
||||
============================================================
|
||||
Download links for digital products
|
||||
============================================================
|
||||
|
||||
ATTENTION! Each link will only work a SINGLE TIME!
|
||||
Also, they will only work WITHIN 24 HOURS!
|
||||
|
||||
<% for item in @order.line_items %>
|
||||
<% if item.digital? %>
|
||||
<%= item.variant.name %>:
|
||||
<% for link in item.digital_links %>
|
||||
<%= digital_url :protocol => 'https', :host => "yourdomainxygoeshere.com", :secret => link.secret %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
============================================================
|
||||
|
||||
Thank you for your business.
|
||||
Reference in New Issue
Block a user