{% block product_price_grid %} {% set custom_locale = app.request.getLocale() %} {% if request_quote_session.culture is defined %} {% set custom_locale = request_quote_session.culture %} {% endif %} {% set custom_locale = (app.request.cookies.get('CUSTOM_SITE_CULTURE') is defined and app.request.cookies.get('CUSTOM_SITE_CULTURE') != "")?app.request.cookies.get('CUSTOM_SITE_CULTURE'):custom_locale %} {% set price_type_from_api = 'decorative' %} {% if decorative_pricing is defined and decorative_pricing and decorative_pricing == 1 %} {% set price_type_from_api = 'decorative' %} {% elseif blank_pricing is defined and blank_pricing and blank_pricing == 1 %} {% set price_type_from_api = 'blank' %} {% endif %} {% if product_detail.pricing_for_other_country is defined %} {% set pricing_for_other_country = product_detail.pricing_for_other_country %} {% endif %} {# Decision making for flags started #} {# decide the final pricing started #} {% if price_type is defined and price_type == 'variations' %} {% set final_pricing = variation_pricing_for_other_country %} {% set final_country_available = variation_pricing_country_available %} {% else %} {% set final_pricing = pricing_for_other_country %} {% set final_country_available = country_available %} {% endif %} {# decide the final pricing ended #} {# decide the default price started #} {% set is_us_default_price = false %} {% set is_ca_default_price = false %} {% set is_us_price_available = false %} {% set is_ca_price_available = false %} {% if final_country_available['us'] is defined and final_country_available['us'] == true and final_pricing['us'] is defined %} {% set is_us_price_available = true %} {% endif %} {% if final_country_available['ca'] is defined and final_country_available['ca'] == true and final_pricing['ca'] is defined %} {% set is_ca_price_available = true %} {% endif %} {% if custom_locale == 'en_ca' and is_ca_price_available == true %} {% set is_ca_default_price = true %} {% elseif custom_locale == 'en_us' and is_us_price_available == true %} {% set is_us_default_price = true %} {% else %} {% if is_us_price_available == true %} {% set is_us_default_price = true %} {% elseif is_ca_price_available == true %} {% set is_ca_default_price = true %} {% endif %} {% endif %} {# decide the default price ended #} {# Decision making for flags ended #} {% if fromQuickQuote is defined and fromQuickQuote == 'yes' %} {% if custom_locale == 'en_us' %} {% if is_us_price_available == true and is_ca_price_available == true %} {% set is_us_price_available = true %} {% set is_ca_price_available = false %} {% endif %} {% else %} {% if is_us_price_available == true and is_ca_price_available == true %} {% set is_us_price_available = false %} {% set is_ca_price_available = true %} {% endif %} {% endif %} {% endif %}