# 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\Profile:
  - login: bit-bucket@example.com
    password: 084e0343a0486ff05530df6c705c8bb4
    anonymous: 1
    cms_profile_id: 0
    addresses:
      - is_billing: true
        is_shipping: true
        country: {code: RU}
        addressFields:
          - addressField: {serviceName: title}
            value: 'тов.'
          - addressField: {serviceName: firstname}
            value: Гость
          - addressField: {serviceName: lastname}
            value: Гостьевич
          - addressField: {serviceName: phone}
            value: '+78422555555'
          - addressField: {serviceName: address1}
            value: 'ул. Гончарова д.1'
          - addressField: {serviceName: city}
            value: Ульяновск
          - addressField: {serviceName: country_code}
            value: RU
          - addressField: {serviceName: zipcode}
            value: '432000'

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
          country: {code: RU}
          addressFields:
            - addressField: {serviceName: title}
              value: 'тов.'
            - addressField: {serviceName: firstname}
              value: Гость
            - addressField: {serviceName: lastname}
              value: Гостьевич
            - addressField: {serviceName: phone}
              value: '+78422555555'
            - addressField: {serviceName: address1}
              value: 'ул. Гончарова д.1'
            - addressField: {serviceName: city}
              value: Ульяновск
            - addressField: {serviceName: country_code}
              value: RU
            - addressField: {serviceName: zipcode}
              value: '432000'
    orig_profile: {login: bit-bucket@example.com}
    total: 18.49
    subtotal: 19.9900
    date: 1551771900
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 1
    shipping: {processor: offline, code: Courier}
    recent: 0
    note: 'Упакуйте, пожалуйста, в подарочную упаковку, это подарок'
    adminNote: 'Хороший клиент'
    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:
      - object: {sku: '10000000118'}
        name: 'Perfect Snacks [Wholesale prices]'
        sku: '10000000118'
        price: 19.9900
        itemNetPrice: 19.9900
        discountedSubtotal: 16.9900
        amount: 1
        subtotal: 19.9900
        total: 19.9900
        object_type: product
    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: 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
          country: {code: RU}
          addressFields:
            - addressField: {serviceName: title}
              value: 'тов.'
            - addressField: {serviceName: firstname}
              value: Гость
            - addressField: {serviceName: lastname}
              value: Гостьевич
            - addressField: {serviceName: phone}
              value: '+78422555555'
            - addressField: {serviceName: address1}
              value: 'ул. Гончарова д.1'
            - addressField: {serviceName: city}
              value: Ульяновск
            - addressField: {serviceName: country_code}
              value: RU
            - addressField: {serviceName: zipcode}
              value: '432000'
    orig_profile: {login: bit-bucket@example.com}
    total: 88.6700
    subtotal: 84.9500
    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:
      - object: {sku: '10000000069'}
        name: "Beige Sneakers"
        sku: '10000000069'
        price: 19.9900
        itemNetPrice: 19.9900
        discountedSubtotal: 39.9800
        amount: 2
        subtotal: 39.9800
        total: 39.9800
        object_type: product
      - object: {sku: '10000000081'}
        name: "Pink Sneakers with White Soles"
        sku: '10000000081'
        price: 14.9900
        itemNetPrice: 14.9900
        discountedSubtotal: 44.9700
        amount: 3
        subtotal: 44.9700
        total: 44.9700
        object_type: product
    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: 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
          country: {code: RU}
          addressFields:
            - addressField: {serviceName: title}
              value: 'тов.'
            - addressField: {serviceName: firstname}
              value: Гость
            - addressField: {serviceName: lastname}
              value: Гостьевич
            - addressField: {serviceName: phone}
              value: '+78422555555'
            - addressField: {serviceName: address1}
              value: 'ул. Гончарова д.1'
            - addressField: {serviceName: city}
              value: Ульяновск
            - addressField: {serviceName: country_code}
              value: RU
            - addressField: {serviceName: zipcode}
              value: '432000'
    orig_profile: {login: bit-bucket@example.com}
    total: 158.9400
    subtotal: 158.9400
    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:
      - object: {sku: '10000000085'}
        name: 'Waist Tie Dress in Blue and White Stripe'
        sku: '10000000085'
        price: 9.9900
        itemNetPrice: 9.9900
        discountedSubtotal: 59.9400
        amount: 6
        subtotal: 59.9400
        total: 59.9400
        object_type: product
      - object: {sku: '10000000089'}
        name: 'Sleeved Mini Dress in Color Block'
        sku: '10000000089'
        price: 99.0000
        itemNetPrice: 99.0000
        discountedSubtotal: 99.9900
        amount: 1
        subtotal: 99.0000
        total: 99.0000
        object_type: product
    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: 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
          country: {code: RU}
          addressFields:
            - addressField: {serviceName: title}
              value: 'тов.'
            - addressField: {serviceName: firstname}
              value: Гость
            - addressField: {serviceName: lastname}
              value: Гостьевич
            - addressField: {serviceName: phone}
              value: '+78422555555'
            - addressField: {serviceName: address1}
              value: 'ул. Гончарова д.1'
            - addressField: {serviceName: city}
              value: Ульяновск
            - addressField: {serviceName: country_code}
              value: RU
            - addressField: {serviceName: zipcode}
              value: '432000'
    orig_profile: {login: bit-bucket@example.com}
    total: 38.0100
    subtotal: 34.9900
    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: 1452604411
        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:
      - object: {sku: '10000000083'}
        name: "Caged Cutout Sandals in Gold"
        sku: '10000000083'
        price: 34.99
        itemNetPrice: 34.9900
        discountedSubtotal: 34.9900
        amount: 1
        subtotal: 34.9900
        total: 34.9900
        object_type: product
    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: 38.01, 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: 38.01, 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: 38.01, 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: 38.01, 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
          country: {code: RU}
          addressFields:
            - addressField: {serviceName: title}
              value: 'тов.'
            - addressField: {serviceName: firstname}
              value: Гость
            - addressField: {serviceName: lastname}
              value: Гостьевич
            - addressField: {serviceName: phone}
              value: '+78422555555'
            - addressField: {serviceName: address1}
              value: 'ул. Гончарова д.1'
            - addressField: {serviceName: city}
              value: Ульяновск
            - addressField: {serviceName: country_code}
              value: RU
            - addressField: {serviceName: zipcode}
              value: '432000'
    orig_profile: {login: bit-bucket@example.com}
    total: 352.81
    subtotal: 351.31
    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: 1452604702
        status: S
        value: 352.81
        type: sale
        note: ''
        publicTxnId: '000005-KXAQ'
        public_id: 'demostore-000005-KXAQ'
    items:
      - object: {sku: '10000000087'}
        name: 'Multicolored Dress with Balloon Sleeves [Options Soft Kitty Singing Plush [Sale] [Reviews] Attributes]'
        sku: '10000000087'
        price: 25.4900
        itemNetPrice: 25.4900
        discountedSubtotal: 305.8800
        amount: 12
        subtotal: 305.8800
        total: 305.8800
        object_type: product
      - object: {sku: '10000000101'}
        name: 'Festival Braslet Pack in Gold Tone'
        sku: '10000000101'
        price: 6.4900
        itemNetPrice: 6.4900
        discountedSubtotal: 45.4300
        amount: 7
        subtotal: 45.4300
        total: 45.4300
        object_type: product
    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: 352.81, 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: '10000000087', sales: 12}
  - {sku: '10000000081', sales: 3}
  - {sku: '10000000101', sales: 7}
  - {sku: '10000000069', sales: 2}
  - {sku: '10000000085', sales: 6}
  - {sku: '10000000118', sales: 1}
  - {sku: '10000000089', sales: 1}
