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
module.exports = function(context, callback) { | |
console.log(context.get.order().items); | |
callback(); | |
}; |
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
.homepage-template { | |
display: block; | |
img { | |
display: block; | |
max-width: 100%; | |
} | |
} |
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 ApplicationResourceFactory = require('mozu-node-sdk/clients/platform/application'); | |
exports.applicationDisabled = function (apiContext, eventPayload) { | |
console.log("Application Disabled returned -- preparing for work..."); | |
console.log(eventPayload.entityId); | |
} | |
exports.applicationEnabled = function (apiContext, eventPayload) { | |
console.log("Application Enabled returned -- preparing for work..."); | |
console.log(eventPayload.entityId); |
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 FiddlerProxy = require('mozu-node-sdk/plugins/fiddler-proxy'); | |
var apiContext = require('mozu-node-sdk/clients/platform/application')(); | |
apiContext.plugins = [FiddlerProxy]; | |
var util = require('util'); | |
var _ = require('lodash'); | |
function logResults(result) { | |
console.log(util.inspect(result)) | |
} |
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 FiddlerProxy = require('mozu-node-sdk/plugins/fiddler-proxy'); | |
var apiContext = require('mozu-node-sdk/clients/platform/application')(); | |
apiContext.plugins = [FiddlerProxy]; | |
var util = require('util'); | |
var _ = require('lodash'); | |
function logResults(result) { | |
console.log(util.inspect(result)) | |
} |
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 filePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\XmlExample\\"; | |
var filename = filePath + "exampleFile.xml"; | |
var documentResource = new Mozu.Api.Resources.Content.Documentlists.DocumentResource(_apiContext); | |
var documents = documentResource.GetDocumentsAsync("files@mozu", filter: "name eq 'exampleFile.xml'").Result; | |
var xmlDoc = documents.Items.FirstOrDefault(); | |
var file = System.IO.File.OpenRead(filename); | |
if(xmlDoc != null && xmlDoc.Name == "exampleFile.xml") | |
{ |
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
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Mozu.Api; | |
using Autofac; | |
using Mozu.Api.ToolKit.Config; | |
namespace Mozu_BED_Training_Exercise_8 | |
{ | |
[TestClass] | |
public class MozuDataConnectorTests |
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
FulfillmentInfo = CheckoutStep.extend({ | |
initialize: function () { | |
var me = this; | |
this.on('change:availableShippingMethods', function (me, value) { | |
me.updateShippingMethod(me.get('shippingMethodCode')); | |
}); | |
_.defer(function () { | |
// This adds the price and other metadata off the chosen | |
// method to the info object itself. | |
// This can only be called after the order is loaded |
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 CartItemFactory = require('mozu-node-sdk/clients/commerce/carts/cartItem'); | |
var CartFactory = require('mozu-node-sdk/clients/commerce/cart'); | |
function itemUpdated(item) { | |
console.info(item); | |
callback(); | |
} | |
module.exports = function (context, callback) { | |
var cartItemResource = CartItemFactory(context); |
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 express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var routes = require('./routes/index'); | |
var users = require('./routes/users'); | |
var mozu_events = require('./routes/mozu-events'); |