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
@mayra-cabrera
mayra-cabrera / gist:8693293
Created January 29, 2014 17:55
Offerings
{"offeringid"=>"O448",
"created"=>Tue, 02 Apr 2013 11:04:20 +0000,
"modified"=>Tue, 10 Dec 2013 10:04:10 +0000,
"name"=>"Incident Investigation - Online French (51-100)",
"code"=>"OL-AI",
"description"=>"Online Incident Investigation Frenc (51-100) units",
"product_id"=>"29",
"baseprice"=>#<BigDecimal:7f8151c2b4b8,'0.2595E2',18(18)>,
"duration"=>#<BigDecimal:7f8151c31570,'0.4E1',9(18)>,
"outline"=>nil,
[5] pry(#<Spree::Admin::OfferingsController>)> courses = call_stars_script('wsCourses')
http://68.179.44.140:80/fmi/xml/fmresultset.xml?-db=STARSv2&-findall=&-lay=STARSv2&-script=wsCourses&-script.param
date: ["Thu, 30 Jan 2014 15:43:31 GMT"]
set-cookie: ["WPCSessionID=\"HzrvmHdhz0f00PX3R5BG4g==\"; Version=1; Path=/fmi/xml"]
content-type: ["text/xml;charset=UTF-8"]
transfer-encoding: ["chunked"]
<?xml version ="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE fmresultset PUBLIC "-//FMI//DTD fmresultset//EN" "http://68.179.44.140:80/fmi/xml/fmresultset.dtd"><fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0"><error code="0"></error><product build="10/22/2013" name="FileMaker Web Publishing Engine" version="13.0.1.216"></product><datasource database="STARSv2" date-format="MM/dd/yyyy" layout="ws_Courses" table="Courses" time-format="HH:mm:ss" timestamp-format="MM/dd/yyyy HH:mm:ss" total-count="366"></datasource><metadata><field-definition auto-enter="yes" four-digit-year="no" global="no
# Trial URL
class TrialUrl < ActiveRecord::Base
scope :for_sales_rep, ->(sales_rep_id) { where(sales_rep_id: sales_rep_id) }
belongs_to :sales_rep, class_name: "OleCore::Login", foreign_key: "sales_rep_id"
end
# Login
module OleCore
Login.class_eval do
# Chrome
[7] pry(#<Jhsc::SurveysController>)> request.env["HTTP_ACCEPT"]
=> "*/*"
[8] pry(#<Jhsc::SurveysController>)> request.env["HTTP_ACCEPT_HEADER"]
=> nil
[9] pry(#<Jhsc::SurveysController>)> request.format
=> */*
self.formats
=> [:html,
:text,
%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