# vim: set ts=2 sw=2 sts=2 et:
#
# Demo store
#
# Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
# See https://www.x-cart.com/license-agreement.html for license details.

XLite\Model\Order:
  - order_id: 1
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '0123456789'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 34.98
    subtotal: 37.9800
    date: 1551771900
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 1
    shipping: {processor: offline, code: Courier}
    recent: 0
    note: 'Please send me this'
    adminNote: 'Good client'
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Money Ordering'
        date: 1551771900
        status: S
        value: 34.98
        type: sale
        note: ''
        publicTxnId: '000001-KGSP'
        public_id: 'demostore-000001-KGSP'
    items:
      - object: {sku: '10000000052'}
        name: 'Nike Heritage Waistpack (3L)'
        sku: '10000000052'
        price: 35.0000
        itemNetPrice: 35.0000
        discountedSubtotal: 32.0000
        amount: 1
        subtotal: 35.0000
        total: 35.0000
        object_type: product
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 2.9800
      - type: discount
        code: DISCOUNT
        class: '\CDev\VolumeDiscounts\Logic\Order\Modifier\Discount'
        name: Discount
        value: -3.00
    events:
      - date: 1551771900
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1551771900
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 18.49, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1551771900
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 1}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}
  - order_id: 2
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '0123456789'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 469.35
    subtotal: 460.0000
    date: 1553772240
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 2
    shipping: {processor: offline, code: Courier}
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Money Ordering'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'USD'}
        date: 1553772240
        status: S
        value: 469.35
        type: sale
        note: ''
        publicTxnId: '000002-FX7B'
        public_id: 'demostore-000002-FX7B'
    items:
      - object: {sku: '10000000067'}
        name: "Nike Spark Women's Shoes"
        sku: '10000000069'
        variant: {id: 33}
        attributeValues: [{name: 'Color', value: 'Barely Rose'}, {name: 'Size', value: 'US 8'}]
        price: 175.0000
        itemNetPrice: 175.0000
        discountedSubtotal: 175.0000
        amount: 1
        subtotal: 175.0000
        total: 175.0000
        object_type: product
      - object: {sku: '10000000069'}
        name: "Nike Juniper Trail Women's Trail Running Shoes"
        sku: '10000000081'
        variant: {id: 36}
        attributeValues: [{name: 'Color', value: 'Black'}, {name: 'Size', value: 'US 8'}]
        price: 95.0000
        itemNetPrice: 95.0000
        discountedSubtotal: 285.0000
        amount: 3
        subtotal: 285.0000
        total: 285.0000
        object_type: product
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 9.3500
    events:
      - date: 1553772240
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1553772240
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 88.67, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1553772240
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 2}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}
  - order_id: 3
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '0123456789'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 129.33
    subtotal: 125.0000
    date: 1564729080
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 3
    shipping: {processor: offline, code: Courier}
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Money Ordering'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'USD'}
        date: 1564729080
        status: S
        value: 129.33
        type: sale
        note: ''
        publicTxnId: '000002-FX7B'
        public_id: 'demostore-000002-FX7B'
    items:
      - object: {sku: '10000000061'}
        name: "Chicago Bulls City Edition Women's Nike NBA T-Shirt"
        sku: '10000000061'
        price: 45.0000
        itemNetPrice: 45.0000
        discountedSubtotal: 90.0000
        amount: 2
        subtotal: 90.0000
        total: 90.0000
        object_type: product
      - object: {sku: '10000000072'}
        name: "Los Angeles Lakers Women's Nike NBA T-Shirt"
        sku: '10000000072'
        price: 35.0000
        itemNetPrice: 35.0000
        discountedSubtotal: 35.0000
        amount: 1
        subtotal: 35.0000
        total: 35.0000
        object_type: product
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 4.3300
    events:
      - date: 1564729080
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1564729080
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 158.94, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1564729080
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 3}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}

  - order_id: 4
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '0123456789'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 286.65
    subtotal: 280.00
    date: 1575163080
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 4
    shipping: {processor: offline, code: Courier}
    recent: 0
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Money Ordering'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'USD'}
        date: 1575163080
        status: S
        value: 286.65
        type: sale
        note: ''
        publicTxnId: '000005-KXAQ'
        public_id: 'demostore-000005-KXAQ'
    items:
      - object: {sku: '10000000065'}
        name: "Nike Sportswear Sport Essentials Men's Poly-Knit Tracksuit"
        sku: '10000000065'
        price: 110.0000
        itemNetPrice: 110.0000
        discountedSubtotal: 110.0000
        amount: 1
        subtotal: 110.0000
        total: 110.0000
        object_type: product
      - object: {sku: '10000000071'}
        name: "Nike Metcon 8 Men's Training Shoes"
        sku: '10000000071'
        price: 170.0000
        itemNetPrice: 170.0000
        discountedSubtotal: 170.0000
        amount: 1
        subtotal: 170.0000
        total: 170.0000
        object_type: product
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 6.6500
    events:
      - date: 1575163080
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1575163080
        code: TRANSACTION
        description: 'Payment transaction [method: Money Ordering, type: sale, amount: 352.81, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1575163080
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 4}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}

# The code below allows to recalculate 'sales' fields of updated products
XLite\Model\Product:
  - {sku: '10000000069', sales: 1}
  - {sku: '10000000067', sales: 3}
  - {sku: '10000000052', sales: 1}
  - {sku: '10000000061', sales: 2}
  - {sku: '10000000072', sales: 1}
  - {sku: '10000000065', sales: 1}
  - {sku: '10000000071', sales: 1}
  - {sku: '10000000052', sales: 1}
