# 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
      language: es
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Sr.'
            - addressField: {serviceName: firstname}
              value: Fulanito
            - addressField: {serviceName: lastname}
              value: Menganito
            - addressField: {serviceName: phone}
              value: '+34399279218'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Barcelona
            - addressField: {serviceName: country_code}
              value: ES
            - addressField: {serviceName: zipcode}
              value: '08001'
    orig_profile: {login: bit-bucket@example.com}
    total: 18.49
    subtotal: 19.9900
    date: 1551771900
    currency: {code: EUR}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 1
    shipping: {processor: offline, code: Courier}
    recent: 0
    note: 'Por favor, envíeme esto'
    adminNote: 'Buen cliente'
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Pedidos de dinero'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'EUR'}
        date: 1551771900
        status: S
        value: 110.65
        type: sale
        note: ''
        publicTxnId: '000001-KGSP'
        public_id: 'demostore-000001-KGSP'
    items:
      - object: {sku: '10000000118'}
        name: 'Aperitivos perfectos [Precios al por mayor]'
        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: 'Gastos de envío'
        value: 1.5000
      - type: discount
        code: DISCOUNT
        class: '\CDev\VolumeDiscounts\Logic\Order\Modifier\Discount'
        name: 'Descuento'
        value: -3.00
    events:
      - date: 1551771900
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1551771900
        code: TRANSACTION
        description: 'Operación de pago [método: Pedido por teléfono, tipo: venta, importe: 18,49, estado: Pendiente].'
        author: {login: bit-bucket@example.com}
      - date: 1551771900
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 1}
        comment: 'La orden se crea inicialmente'
        author: {login: bit-bucket@example.com}

  - order_id: 2
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      language: es
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Sr.'
            - addressField: {serviceName: firstname}
              value: Fulanito
            - addressField: {serviceName: lastname}
              value: Menganito
            - addressField: {serviceName: phone}
              value: '+34399279218'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Barcelona
            - addressField: {serviceName: country_code}
              value: ES
            - addressField: {serviceName: zipcode}
              value: '08001'
    orig_profile: {login: bit-bucket@example.com}
    total: 88.6700
    subtotal: 84.9500
    date: 1553772240
    currency: {code: EUR}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 2
    shipping: {processor: offline, code: Courier}
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Pedidos de dinero'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'EUR'}
        date: 1553772240
        status: S
        value: 88.67
        type: sale
        note: ''
        publicTxnId: '000002-FX7B'
        public_id: 'demostore-000002-FX7B'
    items:
      - object: {sku: '10000000069'}
        name: "Zapatillas beige"
        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: "Zapatillas rosas con suela blanca"
        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: 'Gastos de envío'
        value: 3.7200
    events:
      - date: 1553772240
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1553772240
        code: TRANSACTION
        description: 'Operación de pago [método: Pedido por teléfono, tipo: venta, importe: 88,67, estado: Pendiente].'
        author: {login: bit-bucket@example.com}
      - date: 1553772240
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 2}
        comment: 'La orden se crea inicialmente'
        author: {login: bit-bucket@example.com}

  - order_id: 3
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      language: es
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Sr.'
            - addressField: {serviceName: firstname}
              value: Fulanito
            - addressField: {serviceName: lastname}
              value: Menganito
            - addressField: {serviceName: phone}
              value: '+34399279218'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Barcelona
            - addressField: {serviceName: country_code}
              value: ES
            - addressField: {serviceName: zipcode}
              value: '08001'
    orig_profile: {login: bit-bucket@example.com}
    total: 158.9400
    subtotal: 158.9400
    date: 1564729080
    currency: {code: EUR}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 3
    shipping: {processor: offline, code: Courier}
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Pedidos de dinero'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'EUR'}
        date: 1564729080
        status: S
        value: 158.94
        type: sale
        note: ''
        publicTxnId: '000002-FX7B'
        public_id: 'demostore-000002-FX7B'
    items:
      - object: {sku: '10000000085'}
        name: 'Vestido de rayas azules y blancas con lazo en la cintura'
        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: 'Mini Vestido con Mangas en 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: 'Gastos de envío'
        value: 0.0000
    events:
      - date: 1564729080
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1564729080
        code: TRANSACTION
        description: 'Operación de pago [método: Pedido por teléfono, tipo: venta, importe: 158,94, estado: Pendiente].'
        author: {login: bit-bucket@example.com}
      - date: 1564729080
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 3}
        comment: 'La orden se crea inicialmente'
        author: {login: bit-bucket@example.com}

  - order_id: 4
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      language: es
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Sr.'
            - addressField: {serviceName: firstname}
              value: Fulanito
            - addressField: {serviceName: lastname}
              value: Menganito
            - addressField: {serviceName: phone}
              value: '+34399279218'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Barcelona
            - addressField: {serviceName: country_code}
              value: ES
            - addressField: {serviceName: zipcode}
              value: '08001'
    orig_profile: {login: bit-bucket@example.com}
    total: 38.0100
    subtotal: 34.9900
    date: 1575162780
    currency: {code: EUR}
    paymentStatus: {code: D}
    shippingStatus: {code: WND}
    payment_method_name: 'Pagos alojados Simplify Commerce'
    orderNumber: 4
    shipping: {processor: offline, code: Courier}
    payment_transactions:
      - method_name: SimplifyCommerceHP
        method_local_name: 'Pagos alojados Simplify Commerce'
        currency: {code: 'EUR'}
        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: 'Pagos alojados Simplify Commerce'
        currency: {code: 'EUR'}
        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: "Sandalias de jaula doradas"
        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: 'Gastos de envío'
        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: 'Transacción de pago back end [método: Pagos alojados Simplify Commerce, tipo: venta, importe: 38,01, estado: Fallida] [solicitud inicial]'
        author: {login: bit-bucket@example.com}
      - date: 1575172780
        code: TRANSACTION
        description: 'Transacción de pago [método: Pagos alojados Simplify Commerce, tipo: venta, cantidad: 38,01, estado: Fallida]'
        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: "Rechazado", oldStatus: "En espera de pago"}
        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: 'Transacción de pago back end [método: Pagos alojados Simplify Commerce, tipo: venta, importe: 38,01, estado: Fallida] [solicitud inicial]'
        author: {login: bit-bucket@example.com}
      - date: 1575475780
        code: TRANSACTION
        description: 'Transacción de pago [método: Pagos alojados Simplify Commerce, tipo: venta, cantidad: 38,01, estado: Fallida]'
        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
      language: es
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Sr.'
            - addressField: {serviceName: firstname}
              value: Fulanito
            - addressField: {serviceName: lastname}
              value: Menganito
            - addressField: {serviceName: phone}
              value: '+34399279218'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Barcelona
            - addressField: {serviceName: country_code}
              value: ES
            - addressField: {serviceName: zipcode}
              value: '08001'
    orig_profile: {login: bit-bucket@example.com}
    total: 352.81
    subtotal: 351.31
    date: 1575163080
    currency: {code: EUR}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 5
    shipping: {processor: offline, code: Courier}
    recent: 0
    payment_transactions:
      - method_name: MoneyOrdering
        method_local_name: 'Pedidos de dinero'
        payment_method: {service_name: MoneyOrdering}
        currency: {code: 'EUR'}
        date: 1575163080
        status: S
        value: 352.81
        type: sale
        note: ''
        publicTxnId: '000005-KXAQ'
        public_id: 'demostore-000005-KXAQ'
    items:
      - object: {sku: '10000000087'}
        name: 'Vestido Multicolor con Mangas Globo [Opciones Peluche Soft Kitty Singing [Rebajas] [Comentarios] Atributos]'
        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: 'Pack de sujetadores Festival en tono dorado'
        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: 'Gastos de envío'
        value: 1.5000
    events:
      - date: 1575163080
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1575163080
        code: TRANSACTION
        description: 'Operación de pago [método: Pedidos de dinero, tipo: venta, importe: 352,81, estado: Pendiente].'
        author: {login: bit-bucket@example.com}
      - date: 1575163080
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 5}
        comment: 'La orden se crea inicialmente'
        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}
