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 Mozu.Api.ToolKit; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AMSXBGCONSOLE | |
{ | |
class Bootstrapper : AbstractBootstrapper |
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
{ | |
"actions": [ | |
{ | |
"actionId": "http.commerce.catalog.storefront.shipping.requestRates.after", | |
"contexts": [ | |
{ | |
"customFunctions": [ | |
{ | |
"applicationKey": "DevTrain.AMSXBG_Arc.1.0.0.Release", | |
"functionId": "http.commerce.catalog.storefront.shipping.requestRates.after", |
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
<select name="cc-static" id="cc-static"> | |
<option>---</option> | |
<option {% if model.expireYear == "2014" %}selected="selected"{% endif %} value="2014">2014</option> | |
<option {% if model.expireYear == "2015" %}selected="selected"{% endif %} value="2015">2015</option> | |
<option {% if model.expireYear == "2016" %}selected="selected"{% endif %} value="2016">2016</option> | |
<option {% if model.expireYear == "2017" %}selected="selected"{% endif %} value="2017">2017</option> | |
<option {% if model.expireYear == "2018" %}selected="selected"{% endif %} value="2018">2018</option> | |
<option {% if model.expireYear == "2019" %}selected="selected"{% endif %} value="2019">2019</option> | |
<option {% if model.expireYear == "2020" %}selected="selected"{% endif %} value="2020">2020</option> | |
<option {% if model.expireYear == "2021" %}selected="selected"{% endif %} value="2021">2021</option> |
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
{% with pageContext.now|date('Y') as currentYear %} | |
{% with themeSettings.ccYears|default('0,1,2,3')|split(',') as ccYears %} | |
{% partial_cache currentYear, ccYears %} | |
<label for="cc-year-dynamic">CC Year: </label> | |
<select name="cc-year-dynamic" id="cc-year-dynamic" required> | |
<option>{{ themeSetting.blankOptionText|default('') }}</option> | |
{% for year in ccYears %} | |
<option value="{{ currentYear|add(year) }}"{% if model.expireYear == currentYear|add(year) %} selected="selected"{% endif %}>{{ currentYear|add(year) }}</option> | |
{% endfor %} | |
</select> |
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
public void Update_Property_Value() | |
{ | |
var propertyResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.Attributedefinition.Producttypes.ProductTypePropertyResource(_apiContext); | |
var attributeResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.Attributedefinition.AttributeResource(_apiContext); | |
var productTypeResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.Attributedefinition.ProductTypeResource(_apiContext); | |
var attribute = attributeResource.GetAttributeAsync("tenant~color").Result; | |
var existingProperty = propertyResource.GetPropertyAsync(17, "tenant~color").Result; | |
existingProperty.VocabularyValues.Add(new AttributeVocabularyValueInProductType() | |
{ | |
Order = 0, |
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 serviceCall = require('../../util/needleRequest').makeSampleCall; | |
module.exports = function (context, callback) { | |
var sampleData = "<value>" + context.request.url + "</value>"; | |
serviceCall(sampleData) | |
.then(function (responseFromCall) { | |
console.log(responseFromCall); | |
callback(); | |
}) | |
.catch(function(err) { | |
console.error(err); |
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 customerSegmentResouce = new Mozu.Api.Resources.Commerce.Customer.CustomerSegmentResource(_apiContext); | |
var customerAccountResource = new Mozu.Api.Resources.Commerce.Customer.CustomerAccountResource(_apiContext); | |
var customerSegment = (customerSegmentResouce.GetSegmentsAsync(filter:"Name eq 'High Volume Customer'").Result).Items[0]; | |
var customerAccountIds = new List<int>(); | |
var customerAccount = (customerAccountResource.GetAccountsAsync(filter:"FirstName eq 'Malcolm'").Result).Items[0]; | |
customerAccountIds.Add(customerAccount.Id); | |
if(!(customerAccount.Segments.Exists(x => x.Id == customerSegment.Id))) |
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
[TestMethod] | |
public void ImportOrder() | |
{ | |
//create an instance of the order resource | |
var orderResource = new Mozu.Api.Resources.Commerce.OrderResource(_apiContext); | |
//map the order | |
var order = MapOrder(); | |
//call create order method |
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 locationResource = require('mozu-node-sdk/clients/commerce/admin/location')(apiContext); | |
var location = | |
{ | |
"code": "retailops1", | |
"locationTypes": [{ "code": "warehouse", "name": "Warehouse" }], | |
"fulfillmentTypes": [{ "code": "DS", "name": "Direct Ship", "shippingRequired": true }], |
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
{ | |
"ISOCurrencyCode": "USD", | |
"OriginAddress": { | |
"Address1": "1835 Kramer Ln", | |
"Address2": "", | |
"Address3": "", | |
"Address4": "", | |
"CityOrTown": "Austin", | |
"StateOrProvince": "TX", | |
"PostalOrZipCode": "78758", |