Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 61x 9x 61x 801x 61x 638x 61x 92x | import { CustomItem, DigitalItem, GiftCertificateItem, PhysicalItem } from '@bigcommerce/checkout-sdk';
export function getCustomItem(): CustomItem {
return {
id: '55e11c8f-7dce-4da3-9413-b649533f8bad',
listPrice: 10,
extendedListPrice: 20,
name: 'Custom item',
quantity: 2,
sku: 'custom-sku',
};
}
export function getPhysicalItem(): PhysicalItem {
return {
id: '666',
variantId: 71,
productId: 103,
sku: 'CLC',
name: 'Canvas Laundry Cart',
url: '/canvas-laundry-cart/',
quantity: 1,
brand: 'OFS',
isTaxable: true,
imageUrl: '/images/canvas-laundry-cart.jpg',
discounts: [],
discountAmount: 0,
couponAmount: 0,
listPrice: 200,
salePrice: 200,
comparisonPrice: 200,
extendedListPrice: 200,
extendedSalePrice: 200,
extendedComparisonPrice: 250,
isShippingRequired: true,
addedByPromotion: false,
options: [
{
name: 'n',
nameId: 1,
value: 'v',
valueId: 3,
},
],
categoryNames: ['Cat 1'],
};
}
export function getDigitalItem(): DigitalItem {
return {
id: '667',
variantId: 72,
productId: 104,
sku: 'CLX',
name: 'Digital Book',
url: '/digital-book/',
quantity: 1,
brand: 'Digitalia',
isTaxable: true,
imageUrl: '/images/digital-book.jpg',
discounts: [],
discountAmount: 0,
couponAmount: 0,
listPrice: 100,
salePrice: 100,
comparisonPrice: 200,
downloadPageUrl: 'url.php',
downloadFileUrls: [],
downloadSize: '',
extendedListPrice: 200,
extendedSalePrice: 200,
extendedComparisonPrice: 250,
addedByPromotion: false,
options: [
{
name: 'm',
nameId: 2,
value: 'l',
valueId: 4,
},
],
categoryNames: ['Ebooks', 'Audio Books'],
};
}
export function getGiftCertificateItem(): GiftCertificateItem {
return {
id: 'bd391ead-8c58-4105-b00e-d75d233b429a',
name: '$100 Gift Certificate',
message: 'message',
amount: 100,
taxable: false,
theme: 'General',
sender: {
name: 'pablo',
email: '[email protected]',
},
recipient: {
name: 'luis',
email: '[email protected]',
},
};
}
|