{% 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 total_cat_status = '' %} {% set product_combo = null %} {% set product_combo1 = null %} {% set package_ids = null %} {% set product_nutrition = '' %} {% set product_fat = '' %} {% set product_calory = '' %} {% set product_prot = '' %} {% set product_carb = '' %} {% set product_cost_price = '' %} {% set product_for_cat = '' %} {% set product_fiber = '' %} {% set new_combo = null %} {%set style_dis = ''%} {% for language in language_list %}
{% set action = path('admin_product_saveproduct') %} {% set product_name = '' %} {% set product_name_ar = '' %} {% set product_food_type = '' %} {% set product_description = '' %} {% set product_description_ar = '' %} {% set product_max_meal_value = 1 %} {% 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 total_cat_status = main_product.total_cat_status %} {% set product_name = main_product.product_name %} {% set product_name_ar = main_product.product_name_ar %} {% set product_food_type = main_product.food_type %} {% 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_description_ar = main_product.product_description_ar %} {% set product_fat = main_product.fat %} {% set product_calory = main_product.calory %} {% set product_fiber = main_product.fiber %} {% set product_prot = main_product.prot %} {% set product_carb= main_product.carb %} {% set product_cost_price= main_product.cost_price %} {% set product_for_cat= main_product.for_cat %} {% set product_nutrition = main_product.product_nutrition %} {% set product_max_meal_value = main_product.max_meal_value %} {% set package_ids = main_product.package_ids %} {% endif %} {% endfor %} {% endif %}





{% set display_package_wise = '' %} {% 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 == 'package_wise' %} {% set display_package_wise = 'checked' %} {% set display_none = '' %} {% endif %} {% if combo_display.combo_type == 'prot_carb' %} {% set display_prot_carb = 'checked' %} {% set display_none = '' %} {% endif %} {% endfor %} {% endif %}




{%if product_image is defined and product_image != ''%} {%endif%}
Week 1
{%if days is not empty%} {%for days in days%} {% if language.language_master_id == days.language_id %} {%set checked = ''%} {%if avail is not empty%} {%for avail in avail%} {%if avail.main_days_id == days.main_days_master_id and 'week1' in avail.week_id %} {%set checked ='checked="checked"'%} {%endif%} {%endfor%} {%endif%} {% if language.language_master_id !=1 %}  {% else %} {% endif %}{{days.days_name}}{% if language.language_master_id !=1 %}   {% else %}  {% endif %} {%endif%} {%endfor%} {%endif%}
Week 2
{%if days is not empty%} {%for days in days%} {% if language.language_master_id == days.language_id %} {%set checked = ''%} {%if avail is not empty%} {%for avail in avail%} {%if avail.main_days_id == days.main_days_master_id and 'week2' in avail.week_id %} {%set checked ='checked="checked"'%} {%endif%} {%endfor%} {%endif%} {% if language.language_master_id !=1 %}  {% else %} {% endif %}{{days.days_name}}{% if language.language_master_id !=1 %}   {% else %}  {% endif %} {%endif%} {%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%}

{%set total_cat_active_check = ''%} {%set total_cat_inactive_check = ''%} {%if total_cat_status == 'active'%} {%set total_cat_active_check = 'checked'%} {%endif%} {%if total_cat_status == 'inactive'%} {%set total_cat_inactive_check = 'checked'%} {%endif%}
  Cancel
{% endfor %}
{% endif %}
{% endblock %} {% block js %} {% endblock %}