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
//Add following line of code if you want to use default chatbox | |
//Replace value of data-key with your api_key | |
script src="http://staging.simmpli.com/dist/chatbox.min.js" id="chatboxInit" data-key="1fad50443e7dfcb98f61fcc37386e5af728727daaff1c565" |
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
#This is the last file where you need to change | |
module Spree | |
OrderContents.class_eval do | |
def initialize(order) | |
@order = order | |
end | |
def add(variant, quantity = 1, options = {}, attributes_name) | |
timestamp = Time.current |
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
bundle exec rake paperclip:refresh CLASS=Spree::ClassName |
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
#CapFile | |
load 'deploy' | |
load 'deploy/assets' | |
load 'config/deploy' |
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
gem 'puma' |
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
Run the below comman in terminal | |
xdg-open . | |
A file explorer is opened | |
then run index.html |
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
def comment | |
@comment = Spree::Post.new(post_params) | |
@comment.attributes = {user_id: current_spree_user.id} | |
if @comment.save | |
render json: { | |
success: true, | |
comment: render_to_string((@comment.parent_id.blank? ? 'spree/shared/_previous_comments' : 'spree/shared/_comment_line_item'), :layout => false, :locals => { :comment => @comment }) | |
} | |
else | |
render json: { |
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
noty({text: "Please select an image", type: "error"}); | |
#type may be warning, notice etc. |
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
#Add noty gem | |
gem 'noty-rails' | |
# Run bundle command from your terminal |
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
var mashkar = { | |
init: function() { | |
this.calculateTotalPrice(); | |
}, | |
calculateTotalPrice: function() { | |
$(document).on("change", '.price-field', function() { | |
var variantRow = $(this).closest(".variant-row"); | |
var sellerPrice = parseFloat($(this).val()); |
NewerOlder