{% extends 'OroUIBundle:actions:view.html.twig' %} {% import 'OroUIBundle::macros.html.twig' as macros %} {% set fullname = entity|oro_format_name|default('N/A'|trans) %} {% oro_title_set({params : {"%customer.name%": fullname} }) %} {% block navButtons %} {% if entity.channel.transport.adminUrl|default(false) %} {{ UI.clientButton({ 'dataUrl': path('orocrm_magento_customer_orderplace', {'id': entity.id }), 'aCss': 'no-hash', 'iCss': 'icon-money', 'dataId': entity.id, 'label' : 'orocrm.magento.customer.create_order'|trans, 'widget' : { 'type' : 'dialog', 'options' : { 'alias': 'transaction-dialog', 'stateEnabled': false, 'incrementalPosition': true, 'loadingMaskEnabled': false, 'dialogOptions' : { 'dialogClass': 'place-order-transaction-dialog', 'title' : 'orocrm.magento.customer.create_order'|trans, 'allowMaximize': true, 'allowMinimize': false, 'width': 1000, 'height': 600, 'modal': true, 'autoResize': true } } } }) }} {% endif %} {{ parent() }} {% endblock navButtons %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('orocrm_magento_customer_index'), 'indexLabel': 'orocrm.magento.customer.entity_plural_label'|trans, 'entityTitle': fullname } %} {{ parent() }} {% endblock pageHeader %} {% block stats %} {{ parent() }}
  • {{ 'orocrm.magento.customer.lifetime.label'|trans}}: {{ entity.lifetime|oro_format_currency }}
  • {% endblock stats %} {% block content_data %} {% set customerInformationWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'url': path('orocrm_magento_customer_info', {id: entity.id}) }) }} {% endset %} {% set generalSubBlocks = [{'data' : [customerInformationWidget]}] %} {% set salesTabsWidget %}
    {% set tabs = [ { 'alias': 'orocrm_magento_customer_orders', 'widgetType': 'block', 'label': "orocrm.magento.order.entity_plural_label"|trans, 'url': path( 'orocrm_magento_customer_orders_widget', {'customerId': entity.id, 'channelId': entity.channel.id} ) }, { 'alias': 'orocrm_magento_customer_carts', 'widgetType': 'block', 'label': "orocrm.magento.cart.entity_plural_label"|trans, 'url': path( 'orocrm_magento_customer_carts_widget', {'customerId': entity.id, 'channelId': entity.channel.id} ) } ] %} {{ tabPanel(tabs) }}
    {% endset %} {% set customerAddressBookWidget %}
    {{ oro_widget_render({ 'widgetType': 'block', 'contentClasses': [], 'url': path('orocrm_magento_customer_address_book', {id: entity.id}), 'title': 'Address Book'|trans }) }}
    {% endset %} {% set generalSubBlocks = generalSubBlocks|merge([{'data': [customerAddressBookWidget]}]) %} {% set dataBlocks = [ { 'title': 'General Information'|trans, 'class': 'active', 'subblocks': generalSubBlocks }, { 'title': 'orocrm.magento.customer.sales.label'|trans, 'subblocks': [ {'data' : [salesTabsWidget] } ] } ] %} {% set id = 'magentoCustomerView' %} {% set data = {'dataBlocks': dataBlocks} %} {{ parent() }} {% endblock content_data %}