caboose-store 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/caboose/main.js +8 -0
- data/app/assets/javascripts/caboose_store/admin.js +0 -19
- data/app/assets/javascripts/caboose_store/admin_products.js +3 -4
- data/app/assets/javascripts/caboose_store/application.js +6 -5
- data/app/assets/javascripts/caboose_store/cart.js.bak +258 -0
- data/app/assets/javascripts/caboose_store/checkout.js +151 -0
- data/app/assets/javascripts/caboose_store/config.js +83 -0
- data/app/assets/javascripts/caboose_store/jquery-ui-multisortable.js +254 -0
- data/app/assets/javascripts/caboose_store/jquery-ui.js +3572 -0
- data/app/assets/javascripts/caboose_store/main.js +20 -0
- data/app/assets/javascripts/caboose_store/modules/cart.js +167 -0
- data/app/assets/javascripts/caboose_store/modules/checkout.js +313 -0
- data/app/assets/javascripts/caboose_store/modules/product.js +282 -0
- data/app/assets/stylesheets/caboose_store/admin.css +3 -3
- data/app/assets/stylesheets/caboose_store/application.css +2 -2
- data/app/assets/stylesheets/caboose_store/modal.css +1 -0
- data/app/assets/templates/caboose_store/cart/add_to_cart.jst.ejs +7 -0
- data/app/assets/templates/caboose_store/cart/line_items.jst.ejs +41 -0
- data/app/assets/templates/caboose_store/checkout/address.jst.ejs +53 -0
- data/app/assets/templates/caboose_store/checkout/forms/guest.jst.ejs +8 -0
- data/app/assets/templates/caboose_store/checkout/forms/register.jst.ejs +11 -0
- data/app/assets/templates/caboose_store/checkout/forms/signin.jst.ejs +7 -0
- data/app/assets/templates/caboose_store/checkout/line_items.jst.ejs +32 -0
- data/app/assets/templates/caboose_store/checkout/login.jst.ejs +21 -0
- data/app/assets/templates/caboose_store/checkout/payment.jst.ejs +5 -0
- data/app/assets/templates/caboose_store/checkout/shipping.jst.ejs +18 -0
- data/app/assets/templates/caboose_store/product/images.jst.ejs +8 -0
- data/app/assets/templates/caboose_store/product/options.jst.ejs +19 -0
- data/app/controllers/caboose_store/application_controller.rb +1 -11
- data/app/controllers/caboose_store/cart_controller.rb +36 -44
- data/app/controllers/caboose_store/cart_controller.rb.bak +169 -0
- data/app/controllers/caboose_store/categories_controller.rb +72 -92
- data/app/controllers/caboose_store/checkout_controller.rb +231 -151
- data/app/controllers/caboose_store/orders_controller.rb +235 -95
- data/app/controllers/caboose_store/product_images_controller.rb +1 -1
- data/app/controllers/caboose_store/products_controller.rb +275 -84
- data/app/controllers/caboose_store/reviews_controller.rb +1 -1
- data/app/controllers/caboose_store/variants_controller.rb +86 -20
- data/app/controllers/caboose_store/vendors_controller.rb +73 -0
- data/app/helpers/caboose_store/application_helper.rb +3 -41
- data/app/helpers/caboose_store/cart_helper.rb +0 -24
- data/app/helpers/caboose_store/categories_helper.rb +69 -25
- data/app/helpers/caboose_store/checkout_helper.rb +31 -0
- data/app/helpers/caboose_store/products_helper.rb +4 -80
- data/app/mailers/caboose_store/orders_mailer.rb +6 -13
- data/app/models/caboose_store/address.rb +5 -9
- data/app/models/caboose_store/caboose_store_plugin.rb +18 -7
- data/app/models/caboose_store/category.rb +66 -41
- data/app/models/caboose_store/category_membership.rb +1 -2
- data/app/models/caboose_store/customization_membership.rb +10 -0
- data/app/models/caboose_store/discount.rb +4 -2
- data/app/models/caboose_store/line_item.rb +77 -0
- data/app/models/caboose_store/message.rb +3 -5
- data/app/models/caboose_store/order.rb +153 -63
- data/app/models/caboose_store/order_discount.rb +1 -2
- data/app/models/caboose_store/order_pdf.rb +2 -4
- data/app/models/caboose_store/payment_processors/authorizenet.rb +20 -2
- data/app/models/caboose_store/payment_processors/base.rb +0 -2
- data/app/models/caboose_store/payment_processors/payscape.rb +91 -1
- data/app/models/caboose_store/product.rb +86 -30
- data/app/models/caboose_store/product_image.rb +50 -15
- data/app/models/caboose_store/product_image_variant.rb +3 -3
- data/app/models/caboose_store/review.rb +8 -8
- data/app/models/caboose_store/schema.rb +174 -119
- data/app/models/caboose_store/search_filter.rb +110 -115
- data/app/models/caboose_store/shipping_calculator.rb +51 -49
- data/app/models/caboose_store/tax_calculator.rb +2 -6
- data/app/models/caboose_store/tax_line.rb +1 -4
- data/app/models/caboose_store/variant.rb +77 -21
- data/app/models/caboose_store/vendor.rb +17 -2
- data/app/views/caboose_store/cart/index.html.erb +3 -18
- data/app/views/caboose_store/categories/admin_edit.html.erb +64 -67
- data/app/views/caboose_store/categories/admin_index.html.erb +7 -9
- data/app/views/caboose_store/categories/admin_new.html.erb +56 -39
- data/app/views/caboose_store/checkout/_address_form.html.erb +111 -0
- data/app/views/caboose_store/checkout/_billing_form.html.erb +47 -0
- data/app/views/caboose_store/checkout/_cart.html.erb +52 -0
- data/app/views/caboose_store/checkout/_order_discount.html.erb +40 -0
- data/app/views/caboose_store/checkout/_shipping_address.html.erb +10 -0
- data/app/views/caboose_store/checkout/_shipping_method.html.erb +2 -0
- data/app/views/caboose_store/checkout/_shipping_method_form.html.erb +21 -0
- data/app/views/caboose_store/checkout/billing.html.erb +4 -161
- data/app/views/caboose_store/checkout/discount.html.erb +5 -160
- data/app/views/caboose_store/checkout/empty.html.erb +2 -0
- data/app/views/caboose_store/checkout/error.html.erb +2 -0
- data/app/views/caboose_store/checkout/index.html.erb +30 -100
- data/app/views/caboose_store/checkout/login.html.erb +2 -0
- data/app/views/caboose_store/checkout/payment.html.erb +79 -0
- data/app/views/caboose_store/checkout/relay.html.erb +12 -0
- data/app/views/caboose_store/checkout/relay_postMessage.html.erb +19 -0
- data/app/views/caboose_store/checkout/shipping.html.erb +8 -83
- data/app/views/caboose_store/checkout/step_one.html.erb +15 -0
- data/app/views/caboose_store/checkout/step_two.html.erb +15 -0
- data/app/views/caboose_store/checkout/thanks.html.erb +5 -0
- data/app/views/caboose_store/layouts/_footer.html.erb +1 -1
- data/app/views/caboose_store/orders/admin_edit.html.erb +101 -7
- data/app/views/caboose_store/orders/admin_index.html.erb +8 -8
- data/app/views/caboose_store/orders_mailer/customer_new_order.html.erb +0 -46
- data/app/views/caboose_store/orders_mailer/customer_status_updated.html.erb +0 -48
- data/app/views/caboose_store/orders_mailer/fulfillment_new_order.html.erb +0 -42
- data/app/views/caboose_store/orders_mailer/shipping_order_ready.html.erb +0 -45
- data/app/views/caboose_store/products/_admin_header.html.erb +7 -6
- data/app/views/caboose_store/products/_sort_options.html.erb +19 -0
- data/app/views/caboose_store/products/admin_add_upcs.html.erb +58 -0
- data/app/views/caboose_store/products/admin_edit_categories.html.erb +1 -1
- data/app/views/caboose_store/products/admin_edit_description.html.erb +2 -5
- data/app/views/caboose_store/products/admin_edit_general.html.erb +58 -1
- data/app/views/caboose_store/products/admin_edit_images.html.erb +3 -1
- data/app/views/caboose_store/products/admin_edit_variants.html.erb +13 -2
- data/app/views/caboose_store/products/admin_edit_variants_single.html.erb +14 -14
- data/app/views/caboose_store/products/admin_group_variants.html.erb +433 -0
- data/app/views/caboose_store/products/admin_index.html.erb +87 -39
- data/app/views/caboose_store/products/admin_sort.html copy.erb +155 -0
- data/app/views/caboose_store/products/admin_sort.html.erb +254 -0
- data/app/views/caboose_store/products/details.html.erb +1 -2
- data/app/views/caboose_store/variants/admin_edit.html.erb +18 -16
- data/app/views/caboose_store/variants/admin_group.html.erb +184 -0
- data/app/views/caboose_store/vendors/admin_edit.html.erb +24 -0
- data/app/views/caboose_store/vendors/admin_index.html.erb +30 -0
- data/app/views/caboose_store/vendors/admin_new.html.erb +34 -0
- data/config/routes.rb +65 -27
- data/lib/caboose-store/caboose_store_helper.rb +29 -30
- data/lib/caboose-store/engine.rb +73 -28
- data/lib/caboose-store/version.rb +1 -1
- data/lib/caboose-store.rb +16 -7
- data/lib/tasks/caboose-store.rake +0 -2
- metadata +54 -17
- data/app/assets/javascripts/caboose_store/modal.js +0 -52
- data/app/assets/javascripts/caboose_store/modal_integration.js +0 -25
- data/app/assets/javascripts/caboose_store/model.form.page.js +0 -30
- data/app/assets/javascripts/caboose_store/model.form.user.js +0 -36
- data/app/assets/javascripts/caboose_store/payment_processors/authorizenet.js +0 -21
- data/app/assets/javascripts/caboose_store/payment_processors/base.js +0 -21
- data/app/assets/javascripts/caboose_store/payment_processors/payscape.js +0 -21
- data/app/assets/javascripts/caboose_store/shortcut.js +0 -11
- data/app/assets/javascripts/caboose_store/station.js +0 -60
- data/app/models/caboose_store/order_line_item.rb +0 -13
- data/app/models/caboose_store/states.rb +0 -60
- data/app/views/caboose_store/application/_category_thumb.html.erb +0 -6
- data/app/views/caboose_store/application/_product_thumb.html.erb +0 -13
- data/app/views/caboose_store/checkout/quantity_box.html.erb +0 -39
- data/app/views/caboose_store/checkout/thank_you.html.erb +0 -36
@@ -0,0 +1,58 @@
|
|
1
|
+
<h1>Unmatched Products</h1>
|
2
|
+
|
3
|
+
<p style="margin: 0 0 6px"><a href="/admin/products">All Products</a></p>
|
4
|
+
|
5
|
+
<br />
|
6
|
+
<form method="get" action="/admin/products/add-upcs">
|
7
|
+
<select name="vendor_id">
|
8
|
+
<option value="">Choose Vendor</option>
|
9
|
+
|
10
|
+
<% CabooseStore::Vendor.all.each do |vendor| %>
|
11
|
+
<option value="<%= vendor.id %>"
|
12
|
+
<%= 'selected' if params[:vendor_id] and params[:vendor_id].to_i == vendor.id %>
|
13
|
+
><%= vendor.name %></option>
|
14
|
+
<% end %>
|
15
|
+
</select>
|
16
|
+
|
17
|
+
<input type="submit" value="Filter">
|
18
|
+
</form><br />
|
19
|
+
|
20
|
+
<% content_for :caboose_js do %>
|
21
|
+
<script>
|
22
|
+
$(document).ready(function() {
|
23
|
+
$('form').one('submit', function(event) {
|
24
|
+
event.preventDefault();
|
25
|
+
|
26
|
+
// Prevent the form from being submitted by button click
|
27
|
+
$('form input[type=submit]').attr('disabled', true);
|
28
|
+
|
29
|
+
// If the vendor id has a value send it through; otherwise reload the page
|
30
|
+
if ($('form select').val() != "") {
|
31
|
+
$('form').submit();
|
32
|
+
} else {
|
33
|
+
window.location.href = '/admin/products/add-upcs';
|
34
|
+
}
|
35
|
+
});
|
36
|
+
});
|
37
|
+
</script>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if @products.count > 0 %>
|
41
|
+
<table class='data' id='properties_table'>
|
42
|
+
<tr>
|
43
|
+
<th>ID</th>
|
44
|
+
<th>Title</th>
|
45
|
+
<th>Vendor</th>
|
46
|
+
</tr>
|
47
|
+
|
48
|
+
<% @products.each do |product| %>
|
49
|
+
<tr onclick="window.location='/admin/products/<%= product.id %>/general';">
|
50
|
+
<td><%= raw product.id %></td>
|
51
|
+
<td><%= raw product.title %></td>
|
52
|
+
<td><%= raw product.vendor.nil? ? 'Unknown' : product.vendor.name %></td>
|
53
|
+
</tr>
|
54
|
+
<% end %>
|
55
|
+
</table>
|
56
|
+
<% else %>
|
57
|
+
<p>There are no products right now.</p>
|
58
|
+
<% end %>
|
@@ -28,7 +28,7 @@ p = @product
|
|
28
28
|
#categories ul { list-style: none; margin: 0; padding: 0; }
|
29
29
|
#categories ul ul ul { margin-left: 20px; }
|
30
30
|
#categories li { list-style: none; }
|
31
|
-
#categories
|
31
|
+
#categories h3 { margin: 0; padding: 0; font-weight: bold; display: inline; }
|
32
32
|
#categories td { padding: 10px; }
|
33
33
|
</style>
|
34
34
|
<% end %>
|
@@ -33,9 +33,6 @@ $(window).load(function() {
|
|
33
33
|
});
|
34
34
|
|
35
35
|
</script>
|
36
|
-
|
37
|
-
<%= tinymce :caboose,
|
38
|
-
'width' => '575px',
|
39
|
-
'height' => '240px'
|
40
|
-
%>
|
36
|
+
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
|
37
|
+
<%= tinymce :caboose, :width => '575px', :height => '240px' %>
|
41
38
|
<% end %>
|
@@ -3,8 +3,34 @@ p = @product
|
|
3
3
|
%>
|
4
4
|
<%= render :partial => 'caboose_store/products/admin_header' %>
|
5
5
|
|
6
|
+
<p>
|
7
|
+
<strong>Vendor:</strong>
|
8
|
+
|
9
|
+
<select id="vendor" data-product-id="<%= @product.id %>">
|
10
|
+
<option>-- Select a Vendor --</option>
|
11
|
+
|
12
|
+
<% CabooseStore::Vendor.all.each do |vendor| %>
|
13
|
+
<option value="<%= vendor.id %>" <%= 'selected' if p.vendor_id && p.vendor_id == vendor.id %>><%= vendor.name%></option>
|
14
|
+
<% end %>
|
15
|
+
</select>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
|
19
|
+
<% if p.vendor %>
|
20
|
+
<p>
|
21
|
+
<strong>Vendor Status (<%= p.vendor.name %>):</strong>
|
22
|
+
<select id="vendor-status" data-vendor-id="<%= p.vendor.id %>">
|
23
|
+
<% ['Active', 'Inactive'].each do |status| %>
|
24
|
+
<option value="<%= status %>" <%= 'selected' if p.vendor.status == status %>><%= status %></option>
|
25
|
+
<% end %>
|
26
|
+
</select>
|
27
|
+
</p>
|
28
|
+
<% end %>
|
29
|
+
|
6
30
|
<p><div id='product_<%= p.id %>_title'></div></p>
|
31
|
+
<p><div id='product_<%= p.id %>_caption'></div></p>
|
7
32
|
<p><div id='product_<%= p.id %>_handle'></div></p>
|
33
|
+
<p><div id='product_<%= p.id %>_featured'></div></p>
|
8
34
|
<p><div id='product_<%= p.id %>_seo_title'></div></p>
|
9
35
|
<p><div id='product_<%= p.id %>_seo_description'></div></p>
|
10
36
|
<p><div id='product_<%= p.id %>_status'></div></p>
|
@@ -21,6 +47,35 @@ p = @product
|
|
21
47
|
date_available = p.date_available ? p.date_available.strftime('%F') : ''
|
22
48
|
%>
|
23
49
|
$(document).ready(function() {
|
50
|
+
$('#vendor').on('change', function(event) {
|
51
|
+
event.preventDefault();
|
52
|
+
|
53
|
+
var $target = $(event.target)
|
54
|
+
, vendor_id = $target.val()
|
55
|
+
, product_id = $target.data('product-id');
|
56
|
+
|
57
|
+
console.log(vendor_id, product_id);
|
58
|
+
|
59
|
+
$.ajax({
|
60
|
+
type: 'put',
|
61
|
+
url: '/admin/products/' + product_id + '/update-vendor',
|
62
|
+
data: { vendor_id: vendor_id },
|
63
|
+
success: function(response) {
|
64
|
+
console.log(response);
|
65
|
+
}
|
66
|
+
})
|
67
|
+
});
|
68
|
+
|
69
|
+
$('#vendor-status').on('change', function(e) {
|
70
|
+
$select = $(e.target)
|
71
|
+
|
72
|
+
$.ajax({
|
73
|
+
type: 'put',
|
74
|
+
url: '/admin/products/update-vendor-status/' + $select.data('vendor-id'),
|
75
|
+
data: { status: $select.val() }
|
76
|
+
});
|
77
|
+
});
|
78
|
+
|
24
79
|
m = new ModelBinder({
|
25
80
|
name: 'Product',
|
26
81
|
id: <%= p.id %>,
|
@@ -28,12 +83,14 @@ $(document).ready(function() {
|
|
28
83
|
authenticity_token: '<%= form_authenticity_token %>',
|
29
84
|
attributes: [
|
30
85
|
{ name: 'title' , nice_name: 'Title' , type: 'text' , value: <%= raw Caboose.json(p.title ) %>, width: 500 },
|
86
|
+
{ name: 'caption' , nice_name: 'Caption' , type: 'text' , value: <%= raw Caboose.json(p.caption ) %>, width: 500 },
|
31
87
|
{ name: 'status' , nice_name: 'Status' , type: 'select' , value: <%= raw Caboose.json(p.status ) %>, width: 500, text: <%= raw Caboose.json(p.status) %>, options_url: '/admin/products/status-options' },
|
32
88
|
{ name: 'handle' , nice_name: 'URL Handle' , type: 'text' , value: <%= raw Caboose.json(p.handle ) %>, width: 500 },
|
33
89
|
{ name: 'seo_title' , nice_name: 'SEO Page Title' , type: 'text' , value: <%= raw Caboose.json(p.seo_title ) %>, width: 500 },
|
34
90
|
{ name: 'seo_description' , nice_name: 'SEO Meta Description' , type: 'textarea' , value: <%= raw Caboose.json(p.seo_description ) %>, width: 500, height: 150 },
|
35
91
|
{ name: 'alternate_id' , nice_name: 'Alternate ID' , type: 'text' , value: <%= raw Caboose.json(p.alternate_id ) %>, width: 500 },
|
36
|
-
{ name: 'date_available' , nice_name: 'Date Available' , type: 'text' , value: <%= raw Caboose.json(date_available ) %>, width: 500 }
|
92
|
+
{ name: 'date_available' , nice_name: 'Date Available' , type: 'text' , value: <%= raw Caboose.json(date_available ) %>, width: 500 },
|
93
|
+
{ name: 'featured' , nice_name: 'Featured' , type: 'checkbox' , value: <%= raw Caboose.json(p.featured ) %>, width: 500 }
|
37
94
|
]
|
38
95
|
});
|
39
96
|
});
|
@@ -172,8 +172,10 @@ function variant_title(v)
|
|
172
172
|
return arr.join(' / ');
|
173
173
|
}
|
174
174
|
|
175
|
-
function attach_image_to_variant(image_id, variant_id, attach
|
175
|
+
function attach_image_to_variant(image_id, variant_id, attach)
|
176
176
|
{
|
177
|
+
attach = attach || true;
|
178
|
+
|
177
179
|
if (attach)
|
178
180
|
image_variant_ids[image_variant_ids.length] = variant_id;
|
179
181
|
else
|
@@ -1,8 +1,20 @@
|
|
1
|
+
<% content_for :caboose_css do %>
|
2
|
+
<style>
|
3
|
+
ul {
|
4
|
+
list-style-type: square;
|
5
|
+
padding: 0 0 0 24px;
|
6
|
+
margin: 12px 0 24px;
|
7
|
+
}
|
8
|
+
</style>
|
9
|
+
<% end %>
|
10
|
+
|
1
11
|
<%
|
2
12
|
p = @product
|
3
13
|
v = @variant
|
4
14
|
%>
|
15
|
+
|
5
16
|
<%= render :partial => 'caboose_store/products/admin_header' %>
|
17
|
+
|
6
18
|
<p style='font-size: 75%;'><a href='/admin/products/<%= p.id %>/variant-cols'>Edit visible columns</a></p>
|
7
19
|
|
8
20
|
<div id='message'></div>
|
@@ -15,7 +27,6 @@ v = @variant
|
|
15
27
|
<% if @cols['option3' ] && p.option3 %><th valign='bottom'><%= p.option3 %></th><% end %>
|
16
28
|
<% if @cols['status' ] == true %><th valign='bottom'>Status </th><% end %>
|
17
29
|
<% if @cols['alternate_id' ] == true %><th valign='bottom'>Alternate ID </th><% end %>
|
18
|
-
<% if @cols['sku' ] == true %><th valign='bottom'>SKU </th><% end %>
|
19
30
|
<% if @cols['barcode' ] == true %><th valign='bottom'>Barcode </th><% end %>
|
20
31
|
<% if @cols['price' ] == true %><th valign='bottom'>Price </th><% end %>
|
21
32
|
<% if @cols['quantity_in_stock' ] == true %><th valign='bottom'>Quantity </th><% end %>
|
@@ -30,6 +41,7 @@ v = @variant
|
|
30
41
|
<th> </th>
|
31
42
|
<th> </th>
|
32
43
|
</tr>
|
44
|
+
<% Caboose.log p.variants.where(:status => ['Active', 'Inactive']).first %>
|
33
45
|
<% p.variants.where(:status => ['Active', 'Inactive']).each do |v| %>
|
34
46
|
<tr>
|
35
47
|
<% if @cols['option1' ] && p.option1 %><td><div id='variant_<%= v.id %>_option1' ></div></td><% end %>
|
@@ -37,7 +49,6 @@ v = @variant
|
|
37
49
|
<% if @cols['option3' ] && p.option3 %><td><div id='variant_<%= v.id %>_option3' ></div></td><% end %>
|
38
50
|
<% if @cols['status' ] == true %><td><div id='variant_<%= v.id %>_status' ></div></td><% end %>
|
39
51
|
<% if @cols['alternate_id' ] == true %><td><div id='variant_<%= v.id %>_alternate_id' ></div></td><% end %>
|
40
|
-
<% if @cols['sku' ] == true %><td><div id='variant_<%= v.id %>_sku' ></div></td><% end %>
|
41
52
|
<% if @cols['barcode' ] == true %><td><div id='variant_<%= v.id %>_barcode' ></div></td><% end %>
|
42
53
|
<% if @cols['price' ] == true %><td><div id='variant_<%= v.id %>_price' ></div></td><% end %>
|
43
54
|
<% if @cols['quantity_in_stock' ] == true %><td><div id='variant_<%= v.id %>_quantity_in_stock' ></div></td><% end %>
|
@@ -41,20 +41,20 @@ $(document).ready(function() {
|
|
41
41
|
update_url: '/admin/variants/<%= v.id %>',
|
42
42
|
authenticity_token: '<%= form_authenticity_token %>',
|
43
43
|
attributes: [
|
44
|
-
{ name: 'status' , nice_name: 'Status' , type: 'select' , align: 'right' , value: <%= raw Caboose.json(v.status
|
45
|
-
{ name: 'alternate_id' , nice_name: 'Alternate ID' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.alternate_id
|
46
|
-
{ name: 'sku' , nice_name: 'SKU' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.sku
|
47
|
-
{ name: 'barcode' , nice_name: 'Barcode' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.barcode
|
48
|
-
{ name: 'price' , nice_name: 'Price' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.price
|
49
|
-
{ name: 'quantity_in_stock' , nice_name: 'Quantity' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.quantity_in_stock
|
50
|
-
{ name: 'weight' , nice_name: 'Weight (grams)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.weight
|
51
|
-
{ name: 'length' , nice_name: 'Length (in)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.length
|
52
|
-
{ name: 'width' , nice_name: 'Width (in)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.width
|
53
|
-
{ name: 'height' , nice_name: 'Height (in)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.height
|
54
|
-
{ name: 'cylinder' , nice_name: 'Cylinder' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.cylinder
|
55
|
-
{ name: 'requires_shipping' , nice_name: 'Requires shipping' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.requires_shipping
|
56
|
-
{ name: 'taxable' , nice_name: 'Taxable' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.taxable
|
57
|
-
{ name: 'allow_backorder' , nice_name: 'Allow backorder' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.allow_backorder
|
44
|
+
{ name: 'status' , nice_name: 'Status' , type: 'select' , align: 'right' , value: <%= raw Caboose.json(v.status ) %>, text: <%= raw Caboose.json(v.status) %>, width: 250, options_url: '/admin/variants/status-options' },
|
45
|
+
{ name: 'alternate_id' , nice_name: 'Alternate ID' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.alternate_id ) %>, width: 250 },
|
46
|
+
{ name: 'sku' , nice_name: 'SKU' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.sku ) %>, width: 250 },
|
47
|
+
{ name: 'barcode' , nice_name: 'Barcode' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.barcode ) %>, width: 250 },
|
48
|
+
{ name: 'price' , nice_name: 'Price' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(sprintf("%.2f", v.price || 0 ) ) %>, width: 250 },
|
49
|
+
{ name: 'quantity_in_stock' , nice_name: 'Quantity' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.quantity_in_stock ) %>, width: 250 },
|
50
|
+
{ name: 'weight' , nice_name: 'Weight (grams)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.weight ) %>, width: 250 },
|
51
|
+
{ name: 'length' , nice_name: 'Length (in)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.length ) %>, width: 250 },
|
52
|
+
{ name: 'width' , nice_name: 'Width (in)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.width ) %>, width: 250 },
|
53
|
+
{ name: 'height' , nice_name: 'Height (in)' , type: 'text' , align: 'right' , value: <%= raw Caboose.json(v.height ) %>, width: 250 },
|
54
|
+
{ name: 'cylinder' , nice_name: 'Cylinder' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.cylinder ) %>, width: 250 },
|
55
|
+
{ name: 'requires_shipping' , nice_name: 'Requires shipping' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.requires_shipping ) %>, width: 250 },
|
56
|
+
{ name: 'taxable' , nice_name: 'Taxable' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.taxable ) %>, width: 250 },
|
57
|
+
{ name: 'allow_backorder' , nice_name: 'Allow backorder' , type: 'checkbox' , align: 'right' , value: <%= raw Caboose.json(v.allow_backorder ) %>, width: 250 }
|
58
58
|
]
|
59
59
|
});
|
60
60
|
});
|