This file contains 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
module Spree::Core::Search | |
Base.class_eval do | |
def method_missing(name,*args,&block) | |
@properties[name] | |
end | |
end | |
class SpreeSunspot < defined?(Spree::Search::MultiDomain) ? Spree::Search::MultiDomain : Spree::Core::Search::Base |
This file contains 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
module Spree | |
class CurrencyController < Spree::StoreController | |
def set | |
@currency = supported_currencies.find { |currency| currency.iso_code == params[:currency] } | |
# make sure that we update the current order, so the currency change is reflected | |
if current_order | |
current_order.update_attributes!(currency: @currency.iso_code) | |
end |
This file contains 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
justin44 has 123 in one warehouse and 0 in another | |
after creating an order (qty = 11), before hitting 'book' | |
justin44 = OpenbravoSyncher.get("/openbravo/org.openbravo.service.json.jsonrest/MaterialMgmtStorageDetail?_where=product%3D'72CFA7AF3A20471EAD463C41332EAA00'", {:basic_auth => {:username => 'Openbravo', :password => 'openbravo'}}) | |
"quantityOnHand" => 123, | |
"onHandOrderQuanity" => nil, | |
"lastInventoryCountDate" => "2014-02-06", | |
"quantityInDraftTransactions" => 0, |
This file contains 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
openbravo@ip-172-31-32-214:/opt/OpenbravoERP/src-gen/org/openbravo/model$ find . -type f -name *.java | xargs grep public.*String.*ENTITY_N | |
./sales/ConditionGoods.java: public static final String ENTITY_NAME = "ConditionGoods"; | |
./sales/CommissionDetail.java: public static final String ENTITY_NAME = "SalesCommissionDetail"; | |
./sales/CommissionAmount.java: public static final String ENTITY_NAME = "SalesCommissionAmount"; | |
./sales/CommissionLine.java: public static final String ENTITY_NAME = "SalesCommissionLine"; | |
./sales/Commission.java: public static final String ENTITY_NAME = "SalesCommission"; | |
./sales/CommissionRun.java: public static final String ENTITY_NAME = "SalesCommissionRun"; | |
./sales/SalesRegion.java: public static final String ENTITY_NAME = "SalesRegion"; | |
./financialmgmt/tax/TaxRate.java: public static final String ENTITY_NAME = "FinancialMgmtTaxRate"; | |
./financialmgmt/tax/Withholding.java: public static final String ENTITY_NAME = "FinancialMgmtWithholding"; |
This file contains 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
~/src/sherrylehmann/sl-web$: git remote show origin | |
* remote origin | |
Fetch URL: git@github.com:sherrylehmann/sl-web.git | |
Push URL: git@github.com:sherrylehmann/sl-web.git | |
HEAD branch: master | |
Remote branch: | |
master tracked | |
Local branch configured for 'git pull': | |
master rebases onto remote master | |
Local ref configured for 'git push': |
This file contains 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
module Spree::Core::Search | |
Base.class_eval do | |
def method_missing(name,*args,&block) | |
@properties[name] | |
end | |
end | |
class SpreeSunspot < defined?(Spree::Search::MultiDomain) ? Spree::Search::MultiDomain : Spree::Core::Search::Base |
This file contains 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
module Spree | |
Product.class_eval do | |
searchable do | |
PRODUCT_OPTION_FACETS.each do |option| | |
string "#{option}_facet", :multiple => true do | |
get_option_values(option.to_s).map(&:presentation) | |
end | |
end | |
PRODUCT_PROPERTY_FACETS.each do |prop| |
This file contains 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 install 'ruby_odata' | |
require 'ruby_odata' | |
svc = OData::Service.new("https://data.shipstation.com/1.2", username: 'jeff.squires@gmail.com', password: 'see_email_for_real_password') | |
svc.Orders.filter("OrderNumber eq 'R727282485'").expand("OrderItems") | |
order = svc.execute.first |
This file contains 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 install 'ruby_odata' | |
require 'ruby_odata' | |
svc = OData::Service.new("https://data.shipstation.com/1.2", username: 'jeff.squires@gmail.com', password: 'see_email_for_real_password') | |
svc.Orders.filter("OrderNumber eq 'R727282485'").expand("OrderItems") | |
order = svc.execute.first |
This file contains 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
~/src/genosha$: be cap prestaging deploy | |
triggering load callbacks | |
* 2013-06-03 19:41:23 executing `prestaging' | |
triggering start callbacks for `deploy' | |
* 2013-06-03 19:41:23 executing `multistage:ensure' | |
* 2013-06-03 19:41:23 executing `deploy' | |
* 2013-06-03 19:41:23 executing `deploy:update' | |
** transaction: start | |
* 2013-06-03 19:41:23 executing `deploy:update_code' | |
updating the cached checkout on all servers |