# 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: '+14055555555'
            - 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: 177.5
    subtotal: 179.0
    date: 1551771900
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 1
    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: 1551771900
        status: S
        value: 110.65
        type: sale
        note: ''
        publicTxnId: '000001-KGSP'
        public_id: 'demostore-000001-KGSP'
    items:
      - name: '[Wholesale Prices] RAM Clutches® - Diaphragm Pressure Plate'
        sku: sp29051
        price: 179.0
        itemNetPrice: 179.0
        discountedSubtotal: 176.0
        total: 179.0
        subtotal: 179.0
        object:
          sku: sp29051
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 1.5000
      - 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: 177.5, 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: '+14055555555'
            - 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: 769.66
    subtotal: 765.94
    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: 88.67
        type: sale
        note: ''
        publicTxnId: '000002-FX7B'
        public_id: 'demostore-000002-FX7B'
    items:
      - name: 'MICHELIN® 23820 - CROSSCLIMATE 2 (205/60R16 H)'
        sku: '3180884605'
        price: 147.99
        itemNetPrice: 147.99
        discountedSubtotal: 591.96
        amount: 4
        total: 591.96
        subtotal: 591.96
        object:
          sku: '3180884605'
      - name: 'Ford Official Limited Edition™ Dashboard Cover'
        sku: 1879883414-55-5
        price: 86.99
        itemNetPrice: 86.99
        discountedSubtotal: 173.98
        amount: 2
        total: 173.98
        subtotal: 173.98
        object:
          sku: 1879883414-55-5
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 3.7200
    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: 689.36, 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: '+14055555555'
            - 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: 153.86
    subtotal: 153.86
    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: 158.94
        type: sale
        note: ''
        publicTxnId: '000002-FX7B'
        public_id: 'demostore-000002-FX7B'
    items:
      - name: '[Attributes + Options] + Rixxu™ - Aero Series Seat Covers'
        sku: '3099712066'
        price: 123.26
        itemNetPrice: 123.26
        discountedSubtotal: 123.26
        total: 123.26
        subtotal: 123.26
        object:
          sku: '3099712066'
        attributeValues:
          - name: Color
            value: Beige
            attributeId: 166
            attributeValueS: {id: 1601}
      - name: 'Zerex® - G-05 Concentrated Engine Coolant'
        sku: mpn4704437699
        price: 15.3
        itemNetPrice: 15.3
        discountedSubtotal: 30.6
        amount: 2
        total: 30.6
        subtotal: 30.6
        object:
          sku: mpn4704437699
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 0.0000
    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: 153.86, 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: '+14055555555'
            - 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: 1403.02
    subtotal: 1400.0
    date: 1575162780
    currency: {code: USD}
    paymentStatus: {code: D}
    shippingStatus: {code: WND}
    payment_method_name: Simplify Commerce Hosted Payments
    orderNumber: 4
    shipping: {processor: offline, code: Courier}
    payment_transactions:
      - method_name: SimplifyCommerceHP
        method_local_name: 'Simplify Commerce Hosted Payments'
        currency: {code: 'USD'}
        date: 1575162780
        status: F
        value: 38.0100
        type: sale
        note: "Simplify_BadRequestException: \"Request data is invalid\" (status: 400, error code: validation, reference: c5a0b8b8-92ac-4908-9506-88b843ecd399)\nField error: card.number\"Card bin Country rejected by acquirer\" (country.bin.not.accepted)"
        publicTxnId: '000012-AS2T'
        public_id: 'demostore-000012-AS2T'
        data:
          - name: 'test_mode'
            label: 'Test mode'
            access_level: A
            value: 1
          - name: 'error_field_name_card.number'
            label: 'Error: field name'
            access_level: A
            value: 'card.number'
          - name: 'error_field_code_card.number'
            label: 'Error: field code'
            access_level: A
            value: 'country.bin.not.accepted'
          - name: 'error_field_message_card.number'
            label: 'Error: field message'
            access_level: A
            value: 'Card bin Country rejected by acquirer'
          - name: 'cart_items'
            label: 'Cart items'
            access_level: A
            value: 'a:1:{i:0;a:5:{s:4:"name";s:28:"Caged Cutout Sandals in Gold";s:3:"sku";s:11:"10000000083";s:5:"price";d:34.990000000000002;s:6:"amount";i:1;s:5:"attrs";a:0:{}}}'

      - method_name: SimplifyCommerceHP
        method_local_name: 'Simplify Commerce Hosted Payments'
        currency: {code: 'USD'}
        date: 1575162780
        status: F
        value: 38.0100
        type: sale
        note: "Simplify_BadRequestException: \"Request data is invalid\" (status: 400, error code: validation, reference: 195c1b1a-44c8-46d4-8e48-ee4e65f271af)\nField error: card.number\"Card has expired.\" (card.expired)"
        publicTxnId: '000013-3I22'
        public_id: 'demostore-000013-3I22'
        data:
          - name: 'test_mode'
            label: 'Test mode'
            access_level: A
            value: 1
          - name: 'error_field_name_card.number'
            label: 'Error: field name'
            access_level: A
            value: 'card.number'
          - name: 'error_field_code_card.number'
            label: 'Error: field code'
            access_level: A
            value: 'card.expired'
          - name: 'error_field_message_card.number'
            label: 'Error: field message'
            access_level: A
            value: 'Card has expired.'
          - name: 'cart_items'
            label: 'Cart items'
            access_level: A
            value: 'a:1:{i:0;a:5:{s:4:"name";s:28:"Caged Cutout Sandals in Gold";s:3:"sku";s:11:"10000000083";s:5:"price";d:34.990000000000002;s:6:"amount";i:1;s:5:"attrs";a:0:{}}}'
    items:
      - name: 'EBC Big Brake Kit ( Red ) For Civic Type R EP3 330MM'
        sku: BBK002RED-1
        price: 1400.0
        itemNetPrice: 1400.0
        discountedSubtotal: 1400.0
        total: 1400.0
        subtotal: 1400.0
        object:
          sku: BBK002RED-1
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 3.0200
    events:
      - date: 1575162780
        code: PLACE ORDER
        description: Order placed
        data: {orderId: 4}
        author: {login: bit-bucket@example.com}
      - date: 1575172780
        code: TRANSACTION
        description: 'Back end payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 1403.02, status: Failed] [initial request]'
        author: {login: bit-bucket@example.com}
      - date: 1575172780
        code: TRANSACTION
        description: 'Payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 1403.02, status: Failed]'
        author: {login: bit-bucket@example.com}
      - date: 1575172780
        code: CHANGE PAYMENT STATUS ORDER
        description: "Order payment status changed from {{oldStatus}} to {{newStatus}}"
        data: {orderId: 4, newStatus: "Declined", oldStatus: "Awaiting payment"}
        author: {login: bit-bucket@example.com}
      - date: 1575175780
        code: CHANGE PAYMENT STATUS ORDER
        description: "Order payment status changed from {{oldStatus}} to {{newStatus}}"
        data: {orderId: 4, newStatus: "Awaiting payment", oldStatus: "Declined"}
        author: {login: bit-bucket@example.com}
      - date: 1575475780
        code: TRANSACTION
        description: 'Back end payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 1403.02, status: Failed] [initial request]'
        author: {login: bit-bucket@example.com}
      - date: 1575475780
        code: TRANSACTION
        description: 'Payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 1403.02, status: Failed]'
        author: {login: bit-bucket@example.com}
      - date: 1575485780
        code: CHANGE PAYMENT STATUS ORDER
        description: "Order payment status changed from {{oldStatus}} to {{newStatus}}"
        data: {orderId: 4, newStatus: "Declined", oldStatus: "Awaiting payment"}
        author: {login: bit-bucket@example.com}

  - order_id: 5
    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: '+14055555555'
            - 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: 1357.85
    subtotal: 1357.85
    date: 1575163080
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 5
    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: 352.81
        type: sale
        note: ''
        publicTxnId: '000005-KXAQ'
        public_id: 'demostore-000005-KXAQ'
    items:
      - name: '[Attributes & Options] Tyger® - 2.5" Guard™ Series Bull Bar w/o Skid Plate'
        sku: sp147539
        price: 96.95
        itemNetPrice: 96.95
        discountedSubtotal: 96.95
        total: 96.95
        subtotal: 96.95
        object:
          sku: sp147539
        attributeValues:
          - name: Material
            value: Steel
            attributeId: 158
            attributeValueS: {id: 1522}
      - name: 'AMS® - Front Mount Intercooler with Logo'
        sku: '4477224181'
        price: 630.45
        itemNetPrice: 630.45
        discountedSubtotal: 1260.90
        amount: 2
        total: 1260.90
        subtotal: 1260.90
        object:
          sku: '4477224181'
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 1.5000
    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: 1489.73, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1575163080
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 5}
        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: sp29051, sales: 1}
  - {sku: '3180884605', sales: 4}
  - {sku: 1879883414-55-5, sales: 4}
  - {sku: '3099712066', sales: 1}
  - {sku: mpn4704437699, sales: 2}
  - {sku: sp147539, sales: 1}
  - {sku: '4477224181', sales: 2}
