You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
473 B
JavaScript

import _Item from './_Item.js';
var _LineItem = {
createFromItem: function(item){
var lineitem = {};
lineitem.item = item;
lineitem.quantity = 1;
lineitem.price = _Item.priceOf(item); // store price, because if a customer changes pricing tiers, and then looks back at his purchase history, it should show the price he paid at the time, not what he would pay if he would make that same order now.
return lineitem;
}
};
export default _LineItem;