This file contains hidden or 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
# NOTE below gems are only for development purpose can be removed and commented out as per requirement | |
group :development do | |
gem 'rails-erd','1.0.0' | |
gem 'hirb','0.7.0' | |
gem 'railroady' | |
gem 'itslog','0.6.1' | |
gem 'quiet_assets' | |
gem 'sextant' | |
end |
This file contains hidden or 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
// app/mailer/spree/shipment_mailer_decorator.rb | |
def shipped_email(shipment, resend = false) | |
@shipment = shipment | |
#subject = (resend ? "[#{t(:resend).upcase}] " : '') | |
subject = "USA Football Shop Shipment Dispatched #{shipment.order.number}" | |
mail(:to => shipment.order.email, | |
:subject => "USA Football Shop Shipment Dispatched #{shipment.order.number}") | |
end |
This file contains hidden or 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
// app/mailer/spree/order_mailer_decorator.rb | |
def confirm_email(order, resend = false) | |
@order = order | |
#subject = (resend ? "[#{t(:resend).upcase}] " : '') | |
subject = "USA Football Shop Order Confirmation #{order.number}" | |
mail(:to => order.email, | |
:subject => "USA Football Shop Order Confirmation #{order.number}") | |
end |
This file contains hidden or 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
// app/models/spree/order_decorator.rb | |
def self.check_cart_price(cart_total, item_price, quantity) | |
if ((item_price*quantity)+cart_total) <= 999999.99 | |
true | |
else | |
false | |
end | |
end |
This file contains hidden or 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
// app/controllers/spree/orders_controller_decorator.rb | |
def populate | |
@order = current_order(true) | |
if Spree::Order.check_cart_price(@order.item_total.to_i, params[:products].present? ? Spree::Variant.find(params[:products].first[1].to_i).price : Spree::Variant.find(params[:variants].first[0].to_i).price, params[:products].present? ? params[:quantity].to_i : params[:variants].first[1].to_i) | |
params[:products].each do |product_id,variant_id| | |
quantity = params[:quantity].to_i if !params[:quantity].is_a?(Hash) | |
quantity = params[:quantity][variant_id].to_i if params[:quantity].is_a?(Hash) | |
@order.add_variant(Spree::Variant.find(variant_id), quantity) if quantity > 0 |
This file contains hidden or 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
// app/ views/products/_product_details.html.erb | |
</div> | |
<% if @product.has_stock? || Spree::Config[:allow_backorders] %> | |
<% else %> | |
<span id="out_of_stock"><%= content_tag('strong', "(#{t(:out_of_stock)})") %></span> | |
<% end %> | |
</div> |
This file contains hidden or 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
// app/assets/javascripts/store/lightbox.js | |
Lightbox.prototype.build = function() { | |
var $lightbox, | |
_this = this; | |
$("<div>", { | |
id: 'lightboxOverlay' | |
}).after($('<div/>', { | |
id: 'lightbox' | |
}).append($('<div/>', { |
This file contains hidden or 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
// app/assets/javascripts/store/checkout | |
update_state('b'); | |
update_state('s'); | |
($('input#order_use_billing')).click(function() { | |
if (($(this)).is(':checked')) { | |
return ($('#shipping .inner input, #shipping .inner select, #shipping .inner textarea ')).prop('disabled', true); | |
} else { | |
($('#shipping .inner input, #shipping .inner select, #shipping .inner textarea')).prop('disabled', false); |
This file contains hidden or 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
// app/assets/javascripts/store/payment.js | |
var card_code = $(this).val().length; | |
if(card_code < 3){ | |
if(event.shiftKey) | |
event.preventDefault(); | |
if (event.keyCode == 46 || event.keyCode == 8) { | |
} | |
else { | |
if (event.keyCode < 95) { |
This file contains hidden or 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
string = 'nishant shrivastava" <nishant@weboniselab.com>, "madhavi Ghadge" <madhavi@weboniselab.com>, "Anand Ghaywankar" <anand@weboniselab.com>, "sanjulika rastogi" <sanjulika@weboniselab.com>, "Richa Sharma" <richa@weboniselab.com>, "Priyanka Kotkar" <priyanka@weboniselab.com>, "Anamika Verma" <anamika@weboniselab.com>, "Sagar Shirsath" <sagars@weboniselab.com>, "Sushant Gawali" <sushant@weboniselab.com>, "Harshal Shinde" <harshal@weboniselab.com>, "Priyanka Raghunath Mohite" <priyankam@weboniselab.com>, "Amruta Tajane" <amruta@weboniselab.com>, "Ganesh Patil" <ganesh@weboniselab.com>, "Reshma Ingavale" <reshma@weboniselab.com>' | |
arr = string.scan(/\<([^>]*)/).join(", ") |
NewerOlder