eCommerceBilling

Rewrites the content of the responsive eCommerce billing page

Parameters

eCommerceCart

Rewrites the content of the responsive eCommerce cart page

Parameters

eCommerceCategoryPage

Rewrites the content of the responsive eCommmerce catalog pages

Parameters

eCommerceEcard

Rewrites the eCommerce eCard page

Parameters

eCommerceGetSessionTimeoutRedirect

Checks if we are on an eCommerce timeout page & not on an events timeout page & returns a redirect URL

Parameters

Returns String Redirect URL as a string

eCommerceProductPage

Rewrites the content of the responsive eCommerce product page

Parameters

eCommerceReview

Rewrites the content of the responsive eCommerce confirmation/review page

Parameters

eCommerceShipping

Rewrites the content of the responsive eCommerce shipping page

Parameters

eCommerceThankYou

Rewrites the content of the responsive eCommerce thank you page

Parameters

getEcommPageSettings

Creates a settings object with all the pertinent information for any one eCommerce page

Returns Object An object with all the necessary settings

Add links to mailed/printed cards to the cart summary

Parameters

createButtonFromInput

Creates a <button> element from an <input> element. We use this to style submit buttons in a more elegant ways and to change the text of the buttons.

Parameters

Creates a link for Mailing Card details

Parameters

modifyCartProductRow

Rewrites product row in eCommerce cart to allow for a more elegant formatting. With multiple shipping page will land us here as well

Parameters

modifyCartReviewProductRow

rewrites each row of the cart on the ecommerce purchase page

Parameters

modifyCheckoutForm

Rearranges form fields on billing and shipping pages.

Parameters

modifyEcardForm

Reformats the eCommerce eCard form to match the designs

Parameters

modifyMailingCardForm

reformats the Mailing Card Survey Form & prepopulates set fields, executes only once

Parameters

modifyProductList

Rewrites a list of products in responsive eCommerce catalog pages up to designs

Parameters

modifyRelatedProducts

Wraps related products into an section, replaces images with the higher quality ones

Parameters

parseMultipleShippingAddress

parses single shipping address form a Multiple Shipping pages

parseSingleShippingAddress

Parses single shipping address from a single shpping address page

redirectOnChange

Operates on a dropdown select. Rewrites the current url with the value of selected option and then redirects users to it. This is a jQuery function so it has to be called on a <select> element. Ex: $select.redirectOnChange()

Parameters

removeTextNodes

Removes the non element nodes from the $elements

selectCurrentOption

Sets a selected option as selected based on URL parameters Needs to be called on a <select> element

selectToList

Converts a select list to a <ul> list, class names will be set with prefix call on <select> jquery object title will set the list title

Parameters

Returns String output - replacement HTML as a string

addProductToCart

global vars $body

Parameters

addProductToCart

Handles the add to cart button submission

Parameters

countryStateDropdowns

Handles US/Canada and International states and country dropdowns

Parameters

Returns [type] [description]

donationDropdown

dynamically adds the selected amount from the donation amount dropdown into the 'Add to Basket' button.

Parameters

expirationDateDropdownsEcomm

Adds "Month" & "Year" to expiration date dropdowns, sets up validation and some formatting so error appears elegantly.

Parameters

getFirstNumberFromDollarRange

takes in the string with dollar range and returns the first number

Parameters

Returns Number first number that appears in the string

getProductIndex

Get Product Index loops through a collection of products in local storage like 'stc-basket-items' it then returns the index of a particular product depending upon whether a product title or product ID has been passed in.

Parameters

Returns [number] = returns the index of the located item in the given array.

nonShippableProducts

Adds 'shippable: false' property to all products in local storage that are not shippable. This allows us to hide the shipping address on the thank you page from non shippable products which is handled by remove-shipping-address.js

Parameters

Returns [type] [description]

removeShippingPlaceholder

removes placeholders on shipping address fields, which are being set by luminate. EM 2017-12-20 TODO: Remove this function & replace calls with a new generic function setDelayedInputAttribute, which is a dervation of this function but made more generic for reuse with other attributes.

Parameters

setBuyerInfo

Adds buyer's email, firstName and lastName to the stc-basket cookie Conditional to work with jQuery for standard eCommerce & Vue for Combo cart

Parameters

showMailingCardForm

Shows the mailing card form and prepopulates the changing values

Parameters

showPrintedCardConfiguration

Shows a dialog box with a list of occasions and redirects a user to the final page based on that

Parameters

Returns [type] [description]

showPrintedCardForm

Shows a dialog box with a list of occasions and redirects a user to the final page based on that

Parameters

showPrintedCard

Shows the printed card in a new window, gets called by a form submission

Parameters

Returns Boolean Always return false to prevent default form submission

sortOptionsByText

sorts a list of options by the value of the text

Parameters

Returns Number -1, 1, or 0 if the a > b, a < b, or a == b

submitMailingCardForm

Submits the mailing card from to Luminate, assumes that the form has been validated and this function is called as a callback to the validator function.

Parameters

Returns Boolean Always returns false to prevent default form submission

eCommerceMain

main function that determines which helper function to call on eCommerce pages