Skip to content

Instantly share code, notes, and snippets.

View mayra-cabrera's full-sized avatar
💃
Nothing to do here. Go to https://gitlab.com/mayra-cabrera instead

Mayra Cabrera mayra-cabrera

💃
Nothing to do here. Go to https://gitlab.com/mayra-cabrera instead
View GitHub Profile
%td.align-center
- state = statement.payment_state.to_s + " state"
%span{class: state}
= statement.payment_state ? statement.payment_state.titleize : ""
IpoWeb::Application.routes.draw do
authenticated :login do
root :to => "dashboards#index"
end
root :to => "home#index"
devise_for :logins, class_name: "Login"
@mayra-cabrera
mayra-cabrera / gist:9925383
Last active August 29, 2015 13:57
Volume prices para el product Workplace Hazardous Materials Information System

Volume Prices

id variant_id range amount
798 960 10..50 15.95
909 1024 1..10 19.95
910 1024 11..25 17.95
911 1024 26..50 15.95
912 1024 51..100 13.95
913 1024 101..500 9.95
@mayra-cabrera
mayra-cabrera / gist:9925458
Last active August 29, 2015 13:57
Offerings para el product Workplace Hazardous Materials Information System

###Offerings

id volume_price_id variant_id price name OSG ID
1537 798 960 15.95 WHMIS Participant Manuals (10-50) O121
1686 909 1024 19.95 WHMIS - Online (1-10) O357
1726 909 1024 19.95 WHMIS - Online French (1-10) O421
1687 910 1024 17.95 WHMIS - Online (11-25) O358
1727 910 1024 17.95 WHMIS - Online French (11-25) O422
1728 911 1024 15.95 WHMIS - Online French (26-50) O423
@mayra-cabrera
mayra-cabrera / gist:10418475
Last active August 29, 2015 13:58
Data Integrity with Filemaker Syncs

Problem with Products & Offerings

  • This products are included in wsProducts, but not in wsOfferings script, as a result the home page shows the following products with a price of zero:

Ignored products: 1 of 38

OSG ID Name
219 Worker Safety Awareness

Problem with Offerings

@mayra-cabrera
mayra-cabrera / gist:10487313
Last active August 29, 2015 13:59
Promotions

Problem with promotions

See promotion data

    • From wsMarketing we are ignoring promotions with a discount_type = "none"

Although we're not ignoring any promotion, we keep receiving promotions pointing to a products that doesn't exist, here is the list:

Promotion ID Nonexisting product(s) related
MC16 79
@mayra-cabrera
mayra-cabrera / gist:10680219
Last active August 29, 2015 13:59
Parameters for wsMOAS
order|id:40;number:40;item_total:1399.0;total:1112.99;completed_at:2014/04/14;
line_item|id:59;quantity:1;price:285.0;offering_id:O178;course_id:CS1149;
line_item|id:60;quantity:1;price:1100.0;offering_id:O120;course_id:CS1132;
line_item|id:61;quantity:1;price:14.0;offering_id:O121;
billing_address|firstname:Mayra;lastname:Cabrera;address1:Address;address2:Another address;city:city;zipcode:1234;phone:1234;state:AB;country:CA;
shipping_address|firstname:Mayra;lastname:Cabrera;address1:Address;address2:Another address;city:city;zipcode:1234;phone:1234;state:AB;country:CA;
promotion|amount:-300.0;campaign_id:MC16;
shipping|amount:13.99;shiptype:Courier;
order|id:87;number:87;item_total:14.0;total:14.0;completed_at:2014/04/23;
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*

A First Level Header\n\n### A Second Level Header\n\n\nNow is the time for all good men to come to\nthe aid of their country. This is just a\nregular paragraph.\n\nThe quick brown fox jumped over the lazy\ndog's back.\n\n### Header 3\n\n> This is a blockquote.\n> \n> This is the second paragraph in the blockquote.\n>\n> ## This is an H2 in a blockquote

@mayra-cabrera
mayra-cabrera / gist:11194120
Created April 22, 2014 20:59
Offerings borrados
.5 WHMIS
=> #<Offering id: 4222, offering_osg_id: "O715", name: ".5 WHMIS", description: "4 hours WHMIS at site", variant_id: 2468, volume_price_id: nil, code: "IH-WHMIS", price: #<BigDecimal:d7546dc,'0.1095E4',9(18)>, duration: "4.0", outline: "Failure to recognize and control hazards associated...", created_at: "2014-04-18 23:35:08", updated_at: "2014-04-18 23:35:08">
=> #<Spree::Variant id: 2468, sku: "IH-WHMIS", weight: nil, height: nil, width: nil, depth: nil, deleted_at: nil, is_master: false, product_id: 845, cost_price: nil, position: 1, cost_currency: "CAD", track_inventory: true>
# Electrical Safety Awareness (Ontario)
=> #<Offering id: 4115, offering_osg_id: "O235", name: "Electrical Safety Awareness (Ontario) - Classroom", description: "8 hours ESP at site", variant_id: 2512, volume_price_id: nil, code: "IH-ESAO", price: #<BigDecimal:d747f18,'0.299E3',9(18)>, duration: "8.0", outline: "Our Electrical Safety Awareness training program pr...", created_at: "2014-04-18 23:35:02", updated_at: "2