{% if (ob_project_user_type == 'guest' and ob_project_transaction_configuration_rule.wish_list.guest_user.status == 1) %} {% set prefix = '' %} {% elseif (ob_project_user_type == 'registered' and ob_project_transaction_configuration_rule.wish_list.registered_user.status == 1) %} {% set prefix = 'coded_' %} {% endif %} {% set show_heading = (show_heading is defined) ? show_heading : null %} {% set show_table = (show_table is defined) ? show_table : null %} {% set is_solr_data = (is_solr_data is defined) ? is_solr_data : null %} {% set show_print_price_table = (show_print_price_table is defined) ? show_print_price_table : null %} {% set price_unit = (price_unit is defined and price_unit!='') ? price_unit : 'each' %} {% if is_solr_data == null %} {% if price_type == 'variations' %} {% set price_charges = (price_array is defined) ? price_array : null %} {% elseif price_type == 'regular' %} {% if price_array_type == 'decorative' %} {% set price_charges = (price_array.decorative is defined) ? price_array.decorative : null %} {% elseif price_array_type == 'blank' %} {% set price_charges = (price_array.blank is defined) ? price_array.blank : null %} {% elseif price_type == 'NOT_EXIST' %} {% set price_charges =null %} {% else %} {% set price_charges =null %} {% endif %} {% elseif price_type == 'call_for_price' %} {% set price_charges = (price_array.decorative is defined) ? price_array.decorative : null %} {% elseif price_type == 'piece_wise' %} {% set price_charges = (price_array.decorative is defined) ? price_array.decorative : null %} {% endif %} {% else %} {% set special_price = [] %} {% set base_price = [] %} {% set break = 0 %} {% for i in range(1, 15) if break == 0 %} {% if(ob_project_user_service_group_id > 0 and row['min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i] is defined) %} {% set base_price = base_price|merge([{ 'special_min_qty' : 'min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i , 'special_max_qty' : 'max_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i, 'special_price' : prefix~'price'~ '_'~ob_project_user_service_group_id~'_' ~ i ,'min_qty' : 'min_qty'~ '_' ~ i , 'max_qty' : 'max_qty'~ '_' ~ i, 'price' : prefix~'price'~ '_' ~ i,'code':'code'~'_'~ob_project_user_service_group_id~'_'~i,'code_orig':'code'~'_'~i}]) %} {% if row[prefix~'price'~ '_'~ob_project_user_service_group_id~'_' ~ i] != row[prefix~'price'~ '_' ~ i] %} {% set special_price = 'true' %} {% endif %} {% elseif(ob_project_user_service_group_id > 0 and row['min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i] is not defined) %} {#% set break = 1 %#} {% set base_price = base_price|merge([{ 'min_qty' : 'min_qty'~ '_' ~ i , 'max_qty' : 'max_qty'~ '_' ~ i, 'price' : prefix~'price'~ '_' ~ i, 'code' : 'code'~'_'~i }]) %} {% else %} {% set base_price = base_price|merge([{ 'min_qty' : 'min_qty'~ '_' ~ i , 'max_qty' : 'max_qty'~ '_' ~ i, 'price' : prefix~'price'~ '_' ~ i, 'code' : 'code'~'_'~i }]) %} {% endif %} {% endfor %} {% endif %} {% if show_table == null %} {% include ob_project_instance_theme_path~':'~ob_project_instance_theme~':ProductDetail/Elements/quantityWisePricePanelDiv.html.twig' %} {% else %}
{% if is_solr_data %} {% set break = 0 %} {% for i in range(1, 15) if break == 0 %} {% if(ob_project_user_service_group_id > 0 and row['min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i] is defined) %} {% set min_qty = 'min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i %} {% set max_qty = 'max_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i %} {% elseif(ob_project_user_service_group_id > 0 and row['min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i] is not defined) %} {% set min_qty = 'min_qty'~ '_' ~ i %} {% set max_qty = 'max_qty'~ '_' ~ i %} {% else %} {% set min_qty = 'min_qty'~ '_' ~ i %} {% set max_qty = 'max_qty'~ '_' ~ i %} {% endif %} {% if row[min_qty] is defined %} {% else %} {% set break = 1 %} {% endif %} {% endfor %} {% else %} {% if price_type == 'variations' %} {% for variation_id,variation_data in price_charges %} {% if loop.first and variation_data.pricing.decorative is defined %} {% for quantity_ranges in variation_data.pricing.decorative %} {% endfor %} {% endif %} {% endfor %} {% elseif price_type == 'regular' or price_type == 'call_for_price' %} {% for quantity_ranges in price_charges %} {% endfor %} {% endif %} {% endif %} {% if is_solr_data %} {% if special_price is defined and special_price == 'true' %} {% set discountCode = [] %} {% set discountOrigCode = [] %} {% if price_type is defined and price_type != 'call_for_price' %} {% set break = 0 %} {% for i in range(1, 15) if break == 0 %} {% set min_qty = 'min_qty'~ '_' ~ i %} {% set max_qty = 'max_qty'~ '_' ~ i %} {% set price = prefix~'price'~ '_' ~ i %} {% set code = 'code'~ '_' ~ i %} {% if regular_variations_charges[min_qty] is defined %} {% if regular_variations_charges[code] !="" %} {% set discountOrigCode = discountOrigCode|merge([regular_variations_charges[code]]) %} {% endif %} {% else %} {% set break = 1 %} {% endif %} {% endfor %} {% if prefix == "" and discountOrigCode is defined and discountOrigCode|length >0 %} {% else %} {% endif %} {% else %} {% endif %} {% if price_type is defined and price_type != 'call_for_price' %} {% set break = 0 %} {% for i in range(1, 15) if break == 0 %} {% if(ob_project_user_service_group_id > 0 and row['min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i] is defined) %} {% set min_qty = 'min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i %} {% set max_qty = 'max_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i %} {% set price = prefix~'price'~ '_'~ob_project_user_service_group_id~'_' ~ i %} {% set code = 'code'~ '_'~ob_project_user_service_group_id~'_' ~ i %} {% elseif(ob_project_user_service_group_id > 0 and row['min_qty'~ '_'~ob_project_user_service_group_id~'_' ~ i] is not defined) %} {% set min_qty = 'min_qty'~ '_' ~ i %} {% set max_qty = 'max_qty'~ '_' ~ i %} {% set price = prefix~'price'~ '_' ~ i %} {% set code = 'code'~ '_' ~ i %} {% else %} {% set min_qty = 'min_qty'~ '_' ~ i %} {% set max_qty = 'max_qty'~ '_' ~ i %} {% set price = prefix~'price'~ '_' ~ i %} {% set code = 'code'~ '_' ~ i %} {% endif %} {% if regular_variations_charges[min_qty] is defined %} {% if regular_variations_charges[code] !="" %} {% set discountCode = discountCode|merge([regular_variations_charges[code]]) %} {% endif %} {% else %} {% set break = 1 %} {% endif %} {% endfor %} {% if prefix == "" and discountCode is defined and discountCode|length >0 %} {% else %} {% endif %} {% else %} {% endif %} {% else %} {% set discountCode = [] %} {% if price_type is defined and price_type != 'call_for_price' %} {% set break = 0 %} {% for i in range(1, 15) if break == 0 %} {% set min_qty = 'min_qty'~ '_' ~ i %} {% set max_qty = 'max_qty'~ '_' ~ i %} {% set price = prefix~'price'~ '_' ~ i %} {% set code = 'code'~ '_' ~ i %} {% if regular_variations_charges[min_qty] is defined %} {% if regular_variations_charges[code] !="" %} {% set discountCode = discountCode|merge([regular_variations_charges[code]]) %} {% endif %} {% else %} {% set break = 1 %} {% endif %} {% endfor %} {% if prefix == "" and discountCode is defined and discountCode|length >0 %} {% else %} {% endif %} {% else %} {% endif %} {% endif %} {% else %} {% if price_type == 'variations' %} {# store previous variation data #} {% set first_variation_data = '' %} {% for variation_id,variation_data in price_charges %} {% set discountCode = [] %} {% set discountOrigCode = [] %} {% if variation_data.pricing.decorative.0.rate_orig is defined %} {% for price_ranges in variation_data.pricing.decorative %} {% if loop.first and first_variation_data != '' %} {% for previous_price_ranges in first_variation_data.pricing.decorative %} {% if price_ranges.from_qty > previous_price_ranges.from_qty %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% for price_ranges in variation_data.pricing.decorative %} {% if loop.first and first_variation_data != '' %} {% for previous_price_ranges in first_variation_data.pricing.decorative %} {% if price_ranges.from_qty > previous_price_ranges.from_qty %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} {% for price_ranges in variation_data.pricing.decorative %} {% if loop.first and first_variation_data != '' %} {% for previous_price_ranges in first_variation_data.pricing.decorative %} {% if price_ranges.from_qty > previous_price_ranges.from_qty %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endif %} {# store variation data as previous variation data #} {% if loop.first %} {% set first_variation_data = variation_data %} {% endif %} {% endfor %} {% elseif price_type == 'regular' or price_type == 'call_for_price' %} {% if price_charges is defined %} {% set discountCode = [] %} {% set discountOrigCode = [] %} {% if price_charges.0.rate_orig is defined %} {% if price_type is defined and price_type != 'call_for_price' %} {% for rvc in price_charges %} {% if rvc.rate_orig is defined %} {% if rvc.code_orig !="" %} {% set discountOrigCode = discountOrigCode|merge([rvc.code_orig]) %} {% endif %} {% endif %} {% endfor %} {% if prefix == "" and discountOrigCode is defined and discountOrigCode|length >0 %} {% else %} {% endif %} {% else %} {% endif %} {% if price_type is defined and price_type != 'call_for_price' %} {% if price_type is defined and price_type != 'call_for_price' %} {% for rvc in price_charges %} {% if prefix == "" and rvc.code !="" %} {% set discountCode = discountCode|merge([rvc.code]) %} {% else %} {% set discountCode = 'goldstar_theme.products_detail.net'|trans({},"goldstar") %} {% endif %} {% endfor %} {% else %} {% endif %} {% if prefix == "" and discountCode is defined and discountCode|length >0 %} {% else %} {% endif %} {% endif %} {% else %} {% set discountCode = [] %} {% if price_type is defined and price_type != 'call_for_price' %} {% for rvc in price_charges %} {% if prefix == "" and rvc.code !="" %} {% set discountCode = discountCode|merge([rvc.code]) %} {% else %} {% set discountCode = 'goldstar_theme.products_detail.net'|trans({},"goldstar") %} {% endif %} {% endfor %} {% if prefix == "" and discountCode is defined and discountCode|length >0 %} {% else %} {% endif %} {% else %} {% endif %} {% endif %} {% endif %} {% endif %} {% endif %}
{{ 'quantity'| trans({},"app") }} {{ (price_unit!='each')?('('~('piece_wise_price.'~price_unit)|trans({}, 'app')~')'):null }} {{ row[min_qty] }}{% if row[max_qty] is defined and row[max_qty] < 999999 %}{#}-{{ row[max_qty] }}{#}{% else %}+{% endif %} {{ quantity_ranges.from }}{% if quantity_ranges.to is defined and quantity_ranges.to != '' %}{#}-{{ quantity_ranges.to }}{#}{% else %}+{% endif %} {{ quantity_ranges.from }}{% if quantity_ranges.to is defined and quantity_ranges.to != '' %}{#}-{{ quantity_ranges.to }}{#}{% else %}+{% endif %}  
{{ 'products_detail.price_old'|trans({"%price_currency%":ob_project_setting.currency_name|upper},'goldstar') }}*{{ ob_project_currency_code }} {{ regular_variations_charges[price] | currency }}({{ discountOrigCode|characterCount|trim }}){{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }}{{ 'call_for_price_price_range'| trans({},"app") }}
{{ 'products_detail.special'|trans({},'goldstar') }} ({{ ob_project_setting.currency_name|upper }}){{ ob_project_currency_code }} {{ regular_variations_charges[price] | currency }}({{ discountCode|characterCount|trim }}){{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }}{{ 'call_for_price_price_range'| trans({},"app") }}
{{ 'products_detail.price'|trans({"%price_currency%":ob_project_setting.currency_name|upper},"goldstar") }}{{ ob_project_currency_code }} {{ regular_variations_charges[price] | currency }}({{ discountCode|characterCount|trim }}){{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }}{{ 'call_for_price_price_range'| trans({},"app") }}
{% if variation_data.variation_title is defined %} {{ variation_data.variation_title }} {{ 'products_detail.price_old'|trans({"%price_currency%":ob_project_setting.currency_name|upper},'goldstar') }}* {% endif %} N/A {{ ob_project_currency_code }} {{ price_ranges.rate_orig | currency }} {% if price_ranges.code_orig !="" %} {% set discountOrigCode = discountOrigCode|merge([price_ranges.code_orig]) %} {% endif %} {% if prefix == "" and discountOrigCode is defined and discountOrigCode|length >0 %} ({{ discountOrigCode|characterCount|trim }}) {% else %} {{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }} {% endif %}
{% if variation_data.variation_title is defined %} {{ variation_data.variation_title }} {{ 'products_detail.special'|trans({},'goldstar') }} ({{ ob_project_setting.currency_name|upper }})* {% endif %} N/A {{ ob_project_currency_code }} {{ price_ranges.rate | currency }} {% if price_ranges.code !="" %} {% set discountCode = discountCode|merge([price_ranges.code]) %} {% endif %} {% if prefix == "" and discountCode is defined and discountCode|length >0 %} ({{ discountCode|characterCount|trim }}) {% else %} {{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }} {% endif %}
{% if variation_data.variation_title is defined %} {{ variation_data.variation_title }} {{ 'products_detail.price_old'|trans({"%price_currency%":ob_project_setting.currency_name|upper},'goldstar') }}* {% endif %} N/A {{ ob_project_currency_code }} {{ price_ranges.rate | currency }} {% if price_ranges.code !="" %} {% set discountCode = discountCode|merge([price_ranges.code]) %} {% endif %} {% if prefix == "" and discountCode is defined and discountCode|length >0 %} ({{ discountCode|characterCount|trim }}) {% else %} {{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }} {% endif %}
{{ 'products_detail.price_old'|trans({"%price_currency%":ob_project_setting.currency_name|upper},'goldstar') }}*{{ ob_project_currency_code }} {{ rvc.rate_orig | currency }}({{ discountOrigCode|characterCount|trim }}){{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }}{{ 'call_for_price_price_range'| trans({},"app") }}
{{ 'products_detail.special'|trans({},'goldstar') }} ({{ ob_project_setting.currency_name|upper }}){{ ob_project_currency_code }} {{ rvc.rate | currency }}{{ 'call_for_price_price_range'| trans({},"app") }}({{ discountCode|characterCount|trim }}){{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }}
{{ 'products_detail.price'|trans({"%price_currency%":ob_project_setting.currency_name|upper},"goldstar") }}{{ ob_project_currency_code }} {{ rvc.rate | currency }}({{ discountCode|characterCount|trim }}){{ 'goldstar_theme.products_detail.net'|trans({},"goldstar") }}{{ 'call_for_price_price_range'| trans({},"app") }}
{% endif %}