{% extends "@Admin/Layout/adminlayout.html.twig" %} {% block content %}

Add Product

{% for flashMessage in app.session.flashbag.get('success_msg') %}

Alert!

{{ flashMessage }}
{% endfor %} {% for flashMessage in app.session.flashbag.get('error_msg') %}

Alert!

{{ flashMessage }}
{% endfor %}

Add / Update Product

{% if language_list is defined and language_list is not empty%}
{% set main_product_master_id = 0 %} {% set main_product_category_id = 0 %} {% set product_image = '' %} {% set product_status = '' %} {% set product_combo = null %} {% set product_combo1 = null %} {% set package_ids = null %} {% set product_nutrition = '' %} {% set new_combo = null %} {%set style_dis = ''%} {% for language in language_list %}
{% set action = path('admin_product_saveproduct') %} {% set product_name = '' %} {% set product_description = '' %} {% set package_id = '' %} {% if main_product is defined and main_product is not empty %} {% for main_product in main_product %} {% set new_combo = main_product.combo_array_detail %} {% if main_product.language_id == language.language_master_id %} {% set main_product_master_id = main_product.main_product_master_id %} {% set main_product_category_id = main_product.main_product_category_id %} {% set product_image = main_product.img_url %} {% set product_status = main_product.product_status %} {% set product_name = main_product.product_name %} {% set product_combo = main_product.new_combo %} {% set product_combo1 = main_product.product_combo1 %} {% set package_id = main_product.package_id %} {% set product_description = main_product.product_description %} {% set product_nutrition = main_product.product_nutrition %} {% set package_ids = main_product.package_ids %} {% endif %} {% endfor %} {% endif %}
{#
#}


{% set display_eggs = '' %} {% set display_none = 'checked' %} {% set display_prot_carb = '' %} {% if combo_display is defined and combo_display is not empty %} {% for combo_display in combo_display %} {% if combo_display.combo_type == 'eggs' %} {% set display_eggs = 'checked' %} {% set display_none = '' %} {% endif %} {% if combo_display.combo_type == 'prot_carb' %} {% set display_prot_carb = 'checked' %} {% set display_none = '' %} {% endif %} {% endfor %} {% endif %}

{#
*
#} {% if display_none == '' %} {% if new_combo is defined and new_combo is not empty %} {% for new_combo in new_combo %}
{% set raw_eggs_selected = '' %} {% set prot_selected = '' %} {% set carb_selected = '' %} {% set white_eggs_selected = '' %} {% set raw_eggs_count = 0 %} {% set white_eggs_count = 0 %} {% set prot_count = '' %} {% set carb_count = '' %} {% if new_combo.combo_array is defined and new_combo.combo_array %} {% for comboDetail in new_combo.combo_array %} {% if comboDetail.prot_type == 'prot'%} {% set prot_selected = 'checked' %} {% set prot_count = new_combo['grams'] %} {% endif %} {% if comboDetail.prot_type == 'carb'%} {% set carb_selected = 'checked' %} {% set carb_count = new_combo['grams'] %} {% endif %} {% if comboDetail.prot_type == 'raw_eggs'%} {% set raw_eggs_selected = 'checked' %} {% set raw_eggs_count = comboDetail.prot_crab %} {% endif %} {% if comboDetail.prot_type == 'white_eggs'%} {% set white_eggs_selected = 'checked' %} {% set white_eggs_count = comboDetail.prot_crab %} {% endif %} {% endfor %} {% endif %}
{# #}
{# #}
{# #}
{# #}
{% endfor %} {% else %} {% endif %} {% endif %} {# #}

{%if product_image is defined and product_image != ''%} {%endif%}
{%if days is not empty%} {%for days in days%} {%set checked = ''%} {%if avail is not empty%} {%for avail in avail%} {%if avail.main_days_id == days.days_master_id %} {%set checked ='checked="checked"'%} {%endif%} {%endfor%} {%endif%}  {{days.days_name}}   {%endfor%} {%endif%}

{%set active_check = ''%} {%set inactive_check = ''%} {%if product_status == 'active'%} {%set active_check = 'checked'%} {%endif%} {%if product_status == 'inactive'%} {%set inactive_check = 'checked'%} {%endif%}

{% endfor %}
{% endif %}
{% endblock %} {% block js %} {% endblock %}