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
let likesGiven = 0; | |
setInterval(() => { | |
let heart = document.getElementsByClassName('glyphsSpriteHeart__outline__24__grey_9'), | |
arrow = document.querySelector('.coreSpriteRightPaginationArrow'); | |
if (heart[1]) { | |
heart = heart[1].parentElement; | |
likesGiven++, heart.click(); | |
} | |
arrow.click(); | |
console.log(`You've liked ${likesGiven} post(s)!`); |
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
function sendEmailToCustomer(product) { | |
var customerEmail = customer.profile.email; | |
var EmailModel = require('app_storefront_controllers/cartridge/scripts/models/EmailModel'); | |
var fromEmail = dw.system.Site.current.preferences.custom.noreplyWishlistEmail | |
var options = { | |
recipient: customerEmail, | |
subject: Resource.msg('email.subject', 'wishlist', null), | |
template: 'mail/product.isml', |
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
'use strict'; | |
var guard = require('app_storefront_controllers/cartridge/scripts/guard'); | |
var ISML = require('dw/template/ISML'); | |
var newsletterForm = session.forms.newsletter; | |
function start() { | |
newsletterForm.clearFormElement(); |
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
function getCouponCode() { | |
var CouponMgr = require('dw/campaign/CouponMgr'); | |
var coupon = CouponMgr.getCoupon('newsletter20off'); | |
var couponCode = coupon.getNextCouponCode(); | |
return couponCode; | |
} |
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
const File = require('dw/io/File'); | |
const FileWriter = require('dw/io/FileWriter'); | |
const XMLStreamWriter = require('dw/io/XMLStreamWriter'); | |
const ProductMgr = require('dw/catalog/ProductMgr'); | |
exports.execute = function(args) { | |
try { | |
// Brand from job parameters |
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
const File = require('dw/io/File'); | |
const FileWriter = require('dw/io/FileWriter'); | |
const XMLStreamWriter = require('dw/io/XMLStreamWriter'); | |
const OrderMgr = require('dw/order/OrderMgr'); | |
const Order = require('dw/order/Order'); | |
exports.execute = function(args) { | |
try { |
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
var util = require('./util'); | |
var page = require('./page'); | |
var dialog = require('./dialog'); | |
var addDirectlyToCart = function (e) { | |
e.preventDefault(); | |
let addDirectlyToCartLink = $('#hiddenLinkAddDirectlyToCart').attr('href'); | |
let productID = $('#productIdInput')[0].value; | |
let form = $('#productIdForm'); |
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
Response.renderJSON({ | |
isProductMaster: isProductMaster | |
}); |
NewerOlder