Internet Explorer wordt niet ondersteund voor deze website. U wordt geadviseerd om een moderne webbrowser te gebruiken.
Even geduld...
Bezig met laden configurator
Stap 1 3

Kies uw voordeur

Gebruik de filters om snel te zoeken en de resultaten te verfijnen.

Stap 2 3

Bepaal de juiste maat

Pas de deur volledig aan naar jouw situatie.

{substepvalue} {substepname}
Kies een draairichting
Voor buitendeuren is het belangrijk om aan te geven of de deur naar binnen of naar buiten open draait. De meeste voordeuren gaan naar binnen open en de meeste achterdeuren naar buiten.
{substepvalue} {substepname}
Stap 3 3

Accessoires

Maak je deur compleet door accessoires toe te voegen.

{substepvalue} {substepname}
{substepvalue} {substepname}
Stap 5 5 2

Controleer je bestelling

Je hebt voor de onderstaande producten gekozen. We adviseren je om de informatie nog eenmaal goed te controleren.

Terug
    {mainsteps}
  •   Bestellen/mailen Deze deur wordt speciaal voor jou op maat gemaakt en kan daarom niet geretourneerd worden
    Totaalprijs*
    * Eventuele kortingen worden berekend in de winkelwagen

Mail deze configuratie naar mijn mailadres

Bewaar deze configuratie

Vul hier je e-mailadres in en kies een naam voor deze configuratie.

Uw configuratie is opgeslagen

Voeg configuratie toe aan uw winkelwagen op uw mobiel

Door het scannen van de QR-code wordt deze configuratie in de winkelwagen van Praxis geplaatst. Hier kun je de bestelling eenvoudig en veilig afronden.

  • {stepnumber} {mainstepname} {steps}
  • {stepvalue} {stepname}:

    Request Details

    Session Id:nz2fcstmnv2wxkvz2wql1gabRequest Type:GET
    Time of Request:21-10-2021 16:06:36Status Code:200
    Request Encoding:Unicode (UTF-8)Response Encoding:Unicode (UTF-8)

    Trace Information

    CategoryMessageFrom First(s)From Last(s)
    aspx.pageBegin PreInit
    aspx.pageEnd PreInit0,0000140,000014
    aspx.pageBegin Init0,0000220,000008
    LoginControl_Init - isValidForThisDomain: True0,0005430,000521
    LoginControl - SetupWebsite - proceed: True, GoAnCode: , TagManagerId: GTM-TSQHNV80,0010170,000474
    useTagManager: False0,0010800,000063
    This is page: homepage.aspx. With masterpagefile: 0,0013150,000235
    CSS template IDs found: 0,0016630,000348
    End load CSS from Wiser...0,0016790,000016
    JS template IDs found: 0,0020960,000417
    NO JS template inline found0,0021150,000019
    End load JS from Wiser...0,0021220,000007
    aspx.pageEnd Init0,0021710,000048
    aspx.pageBegin InitComplete0,0021780,000008
    aspx.pageEnd InitComplete0,0021840,000006
    aspx.pageBegin PreLoad0,0021900,000006
    aspx.pageEnd PreLoad0,0021980,000008
    aspx.pageBegin Load0,0022040,000006
    aspx.pageEnd Load0,0022170,000013
    aspx.pageBegin LoadComplete0,0022240,000007
    aspx.pageEnd LoadComplete0,0022300,000006
    aspx.pageBegin PreRender0,0022350,000006
    aspx.pageEnd PreRender0,0024310,000196
    aspx.pageBegin PreRenderComplete0,0024420,000011
    aspx.pageEnd PreRenderComplete0,0024480,000006
    aspx.pageBegin SaveState0,0025990,000151
    aspx.pageEnd SaveState0,0026070,000008
    aspx.pageBegin SaveStateComplete0,0026130,000006
    aspx.pageEnd SaveStateComplete0,0026190,000006
    aspx.pageBegin Render0,0026240,000005
    QUERY SYSCON START:
                           SELECT
                               #SUMMARY
                               IFNULL(configvalues_duplicate.summary_template,configvalues.summary_template) AS summary_template
                               ,IFNULL(configvalues_duplicate.summary_mainstep_template,configvalues.summary_mainstep_template) AS summary_mainstep_template
                               ,IFNULL(configvalues_duplicate.summary_step_template,configvalues.summary_step_template) AS summary_step_template

                               #PROGRESS
                               ,IFNULL(configvalues_duplicate.pre_progress_template,configvalues.pre_progress_template) AS progress_pre_template
                               ,IFNULL(configvalues_duplicate.pre_progress_step_template,configvalues.pre_progress_step_template) AS progress_pre_step_template
                               ,IFNULL(configvalues_duplicate.pre_progress_substep_template,configvalues.pre_progress_substep_template) AS progress_pre_substep_template

                               ,IFNULL(configvalues_duplicate.post_progress_template,configvalues.post_progress_template) AS progress_post_template
                               ,IFNULL(configvalues_duplicate.post_progress_step_template,configvalues.post_progress_step_template) AS progress_post_step_template
                               ,IFNULL(configvalues_duplicate.post_progress_substep_template,configvalues.post_progress_substep_template) AS progress_post_substep_template

                               ,IFNULL(configvalues_duplicate.progress_template,configvalues.progress_template) AS progress_template
                               ,IFNULL(configvalues_duplicate.progress_step_template,configvalues.progress_step_template) AS progress_step_template
                               ,IFNULL(configvalues_duplicate.progress_substep_template,configvalues.progress_substep_template) AS progress_substep_template

                               #CONFIGURATOR
                           ,configurator.name
                           ,IFNULL(configvalues_duplicate.template,configvalues.template) AS template
                               ,configvalues.price_calculation_query

                               #MAIN STEPS
                           #,IF(mainstepvalues.step_template IS NULL OR TRIM(mainstepvalues.step_template)='',IFNULL(configvalues_duplicate.step_template,configvalues.step_template),mainstepvalues.step_template) AS mainstep_template
                               ,IF(IFNULL(mainstepvalues_duplicate.step_template,mainstepvalues.step_template) IS NULL OR TRIM(IFNULL(mainstepvalues_duplicate.step_template,mainstepvalues.step_template))='',IFNULL(configvalues_duplicate.step_template,configvalues.step_template),IFNULL(mainstepvalues_duplicate.step_template,mainstepvalues.step_template)) AS mainstep_template
                           ,mainsteps.name AS mainstepname
                               ,mainstepvalues.free_content1 AS mainstep_free_content1
                               ,mainstepvalues.free_content2 AS mainstep_free_content2
                               ,mainstepvalues.free_content3 AS mainstep_free_content3
                               ,mainstepvalues.free_content4 AS mainstep_free_content4
                               ,mainstepvalues.free_content5 AS mainstep_free_content5

                               #STEPS
                           ,IF(IFNULL(stepvalues_duplicate.step_template,stepvalues.step_template) IS NULL OR TRIM(IFNULL(stepvalues_duplicate.step_template,stepvalues.step_template))='',IFNULL(configvalues_duplicate.default_step_template,configvalues.default_step_template),IFNULL(stepvalues_duplicate.step_template,stepvalues.step_template)) AS step_template
                           ,steps.name AS stepname
                           ,IFNULL(stepvalues_duplicate.values_template,stepvalues.values_template) AS values_template
                           ,stepvalues.datasource
                           ,stepvalues.custom_query
                           ,stepvalues.fixed_valuelist
                               ,stepvalues.datasource_connectedtype
                               ,IF(IFNULL(stepvalues.variable_name,'')='',steps.seoname,stepvalues.variable_name) AS variable_name
                               ,stepvalues.free_content1 AS step_free_content1
                               ,stepvalues.free_content2 AS step_free_content2
                               ,stepvalues.free_content3 AS step_free_content3
                               ,stepvalues.free_content4 AS step_free_content4
                               ,stepvalues.free_content5 AS step_free_content5
                               ,stepvalues.datasource_connectedid
                               ,stepvalues.isrequired
                               ,stepvalues.check_connectedid

                               #SUBSTEPS
                           ,substeps.name AS substepname
                           ,IFNULL(substepvalues_duplicate.step_template,substepvalues.step_template) AS substep_template
                           ,IFNULL(substepvalues_duplicate.values_template,substepvalues.values_template) AS substep_values_template
                           ,substepvalues.datasource AS substep_datasource
                           ,substepvalues.custom_query AS substep_custom_query
                           ,substepvalues.fixed_valuelist AS substep_fixed_valuelist
                               ,substepvalues.datasource_connectedtype AS substep_datasource_connectedtype
                               ,IF(IFNULL(substepvalues.variable_name,'')='',substeps.seoname,substepvalues.variable_name) AS substep_variable_name
                               ,substepvalues.datasource_connectedid AS substep_datasource_connectedid
                               ,substepvalues.isrequired AS substep_isrequired
                               ,substepvalues.check_connectedid AS substep_check_connectedid

                               #Get the applied regex
                               ,IF(IFNULL(mainstepvalues.urlregex,'')<>'',mainstepvalues.urlregex,
                                   IF(IFNULL(stepvalues.urlregex,'')<>'',stepvalues.urlregex,IFNULL(substepvalues.urlregex,''))) AS urlregex

                           FROM easy_items configurator
                           JOIN `easy_configuratorsetup` configvalues ON configvalues.itemid = configurator.id
    LEFT JOIN `easy_configuratorsetup` configvalues_duplicate ON configvalues_duplicate.itemid=configvalues.duplicatelayoutfrom
                           JOIN easy_items mainsteps ON mainsteps.moduleid=320 AND mainsteps.`level`=2 AND mainsteps.parent_id=configurator.id AND mainsteps.published=1

                           LEFT JOIN `easy_configuratorsetup` mainstepvalues ON mainstepvalues.itemid = mainsteps.id
                           LEFT JOIN `easy_configuratorsetup` mainstepvalues_duplicate ON mainstepvalues_duplicate.itemid=mainstepvalues.duplicatelayoutfrom

                           LEFT JOIN easy_items steps ON steps.moduleid=320 AND steps.`level`=3 AND steps.parent_id=mainsteps.id AND steps.published=1
                           LEFT JOIN `easy_configuratorsetup` stepvalues ON stepvalues.itemid = steps.id
                           LEFT JOIN `easy_configuratorsetup` stepvalues_duplicate ON stepvalues_duplicate.itemid=stepvalues.duplicatelayoutfrom
                           LEFT JOIN easy_items substeps ON substeps.moduleid=320 AND substeps.`level`=4 AND substeps.parent_id=steps.id AND substeps.published=1
                           LEFT JOIN `easy_configuratorsetup` substepvalues ON substepvalues.itemid = substeps.id
                           LEFT JOIN `easy_configuratorsetup` substepvalues_duplicate ON substepvalues_duplicate.itemid=substepvalues.duplicatelayoutfrom
                           WHERE
                           configurator.moduleid=320 AND
                           configurator.`level`=1 AND
                           configurator.`name`=?name
                           ORDER BY mainsteps.volgnr,steps.volgnr
                          
    0,0032800,000656
    Open connection with DB0,0033950,000115
    QUERY SYSCON END:
                           SELECT
                               #SUMMARY
                               IFNULL(configvalues_duplicate.summary_template,configvalues.summary_template) AS summary_template
                               ,IFNULL(configvalues_duplicate.summary_mainstep_template,configvalues.summary_mainstep_template) AS summary_mainstep_template
                               ,IFNULL(configvalues_duplicate.summary_step_template,configvalues.summary_step_template) AS summary_step_template

                               #PROGRESS
                               ,IFNULL(configvalues_duplicate.pre_progress_template,configvalues.pre_progress_template) AS progress_pre_template
                               ,IFNULL(configvalues_duplicate.pre_progress_step_template,configvalues.pre_progress_step_template) AS progress_pre_step_template
                               ,IFNULL(configvalues_duplicate.pre_progress_substep_template,configvalues.pre_progress_substep_template) AS progress_pre_substep_template

                               ,IFNULL(configvalues_duplicate.post_progress_template,configvalues.post_progress_template) AS progress_post_template
                               ,IFNULL(configvalues_duplicate.post_progress_step_template,configvalues.post_progress_step_template) AS progress_post_step_template
                               ,IFNULL(configvalues_duplicate.post_progress_substep_template,configvalues.post_progress_substep_template) AS progress_post_substep_template

                               ,IFNULL(configvalues_duplicate.progress_template,configvalues.progress_template) AS progress_template
                               ,IFNULL(configvalues_duplicate.progress_step_template,configvalues.progress_step_template) AS progress_step_template
                               ,IFNULL(configvalues_duplicate.progress_substep_template,configvalues.progress_substep_template) AS progress_substep_template

                               #CONFIGURATOR
                           ,configurator.name
                           ,IFNULL(configvalues_duplicate.template,configvalues.template) AS template
                               ,configvalues.price_calculation_query

                               #MAIN STEPS
                           #,IF(mainstepvalues.step_template IS NULL OR TRIM(mainstepvalues.step_template)='',IFNULL(configvalues_duplicate.step_template,configvalues.step_template),mainstepvalues.step_template) AS mainstep_template
                               ,IF(IFNULL(mainstepvalues_duplicate.step_template,mainstepvalues.step_template) IS NULL OR TRIM(IFNULL(mainstepvalues_duplicate.step_template,mainstepvalues.step_template))='',IFNULL(configvalues_duplicate.step_template,configvalues.step_template),IFNULL(mainstepvalues_duplicate.step_template,mainstepvalues.step_template)) AS mainstep_template
                           ,mainsteps.name AS mainstepname
                               ,mainstepvalues.free_content1 AS mainstep_free_content1
                               ,mainstepvalues.free_content2 AS mainstep_free_content2
                               ,mainstepvalues.free_content3 AS mainstep_free_content3
                               ,mainstepvalues.free_content4 AS mainstep_free_content4
                               ,mainstepvalues.free_content5 AS mainstep_free_content5

                               #STEPS
                           ,IF(IFNULL(stepvalues_duplicate.step_template,stepvalues.step_template) IS NULL OR TRIM(IFNULL(stepvalues_duplicate.step_template,stepvalues.step_template))='',IFNULL(configvalues_duplicate.default_step_template,configvalues.default_step_template),IFNULL(stepvalues_duplicate.step_template,stepvalues.step_template)) AS step_template
                           ,steps.name AS stepname
                           ,IFNULL(stepvalues_duplicate.values_template,stepvalues.values_template) AS values_template
                           ,stepvalues.datasource
                           ,stepvalues.custom_query
                           ,stepvalues.fixed_valuelist
                               ,stepvalues.datasource_connectedtype
                               ,IF(IFNULL(stepvalues.variable_name,'')='',steps.seoname,stepvalues.variable_name) AS variable_name
                               ,stepvalues.free_content1 AS step_free_content1
                               ,stepvalues.free_content2 AS step_free_content2
                               ,stepvalues.free_content3 AS step_free_content3
                               ,stepvalues.free_content4 AS step_free_content4
                               ,stepvalues.free_content5 AS step_free_content5
                               ,stepvalues.datasource_connectedid
                               ,stepvalues.isrequired
                               ,stepvalues.check_connectedid

                               #SUBSTEPS
                           ,substeps.name AS substepname
                           ,IFNULL(substepvalues_duplicate.step_template,substepvalues.step_template) AS substep_template
                           ,IFNULL(substepvalues_duplicate.values_template,substepvalues.values_template) AS substep_values_template
                           ,substepvalues.datasource AS substep_datasource
                           ,substepvalues.custom_query AS substep_custom_query
                           ,substepvalues.fixed_valuelist AS substep_fixed_valuelist
                               ,substepvalues.datasource_connectedtype AS substep_datasource_connectedtype
                               ,IF(IFNULL(substepvalues.variable_name,'')='',substeps.seoname,substepvalues.variable_name) AS substep_variable_name
                               ,substepvalues.datasource_connectedid AS substep_datasource_connectedid
                               ,substepvalues.isrequired AS substep_isrequired
                               ,substepvalues.check_connectedid AS substep_check_connectedid

                               #Get the applied regex
                               ,IF(IFNULL(mainstepvalues.urlregex,'')<>'',mainstepvalues.urlregex,
                                   IF(IFNULL(stepvalues.urlregex,'')<>'',stepvalues.urlregex,IFNULL(substepvalues.urlregex,''))) AS urlregex

                           FROM easy_items configurator
                           JOIN `easy_configuratorsetup` configvalues ON configvalues.itemid = configurator.id
    LEFT JOIN `easy_configuratorsetup` configvalues_duplicate ON configvalues_duplicate.itemid=configvalues.duplicatelayoutfrom
                           JOIN easy_items mainsteps ON mainsteps.moduleid=320 AND mainsteps.`level`=2 AND mainsteps.parent_id=configurator.id AND mainsteps.published=1

                           LEFT JOIN `easy_configuratorsetup` mainstepvalues ON mainstepvalues.itemid = mainsteps.id
                           LEFT JOIN `easy_configuratorsetup` mainstepvalues_duplicate ON mainstepvalues_duplicate.itemid=mainstepvalues.duplicatelayoutfrom

                           LEFT JOIN easy_items steps ON steps.moduleid=320 AND steps.`level`=3 AND steps.parent_id=mainsteps.id AND steps.published=1
                           LEFT JOIN `easy_configuratorsetup` stepvalues ON stepvalues.itemid = steps.id
                           LEFT JOIN `easy_configuratorsetup` stepvalues_duplicate ON stepvalues_duplicate.itemid=stepvalues.duplicatelayoutfrom
                           LEFT JOIN easy_items substeps ON substeps.moduleid=320 AND substeps.`level`=4 AND substeps.parent_id=steps.id AND substeps.published=1
                           LEFT JOIN `easy_configuratorsetup` substepvalues ON substepvalues.itemid = substeps.id
                           LEFT JOIN `easy_configuratorsetup` substepvalues_duplicate ON substepvalues_duplicate.itemid=substepvalues.duplicatelayoutfrom
                           WHERE
                           configurator.moduleid=320 AND
                           configurator.`level`=1 AND
                           configurator.`name`=?name
                           ORDER BY mainsteps.volgnr,steps.volgnr
                          
    0,0622340,058838
    RenderStep Kies uw buitendeur connected to: 2289 - mainstepnumber: 1 - stepnumber: 1 - dependentvalue: 2289 - datasource connectedid: 22890,0647560,002523
    [RenderValues] set query and/or replacements0,0647940,000038
    [RenderValues] Execute query0,0657430,000949
    QUERY SYSCON START: SET @doortype = 'buitendeur';
    SET @doorsubtype = 'voordeuren';
    SET @_door_id = IF('{door_id}' LIKE '{%}', false, CAST('{door_id}' AS UNSIGNED));
    SET @_glass_id = IF('{glass_id}' LIKE '{%}', false, CAST('{glass_id}' AS UNSIGNED));

    SELECT
    door.fsc AS fsc,
    door.KOMO AS komo,
    IF(IFNULL(door.warrantyinYears,0)>9,1,0) AS ten_yr_guarantee,
    door.id AS door_id,
    doorCat.id AS door_cat_id,
    doorCat.`name` AS door_name,
    doorCat.style AS style,
    IFNULL(doorCat.door_wood_type, "Overig") AS door_wood_type,
    GROUP_CONCAT(DISTINCT CONCAT(door.height, "x", door.width)) AS sizes,
       IFNULL(MIN(glass.id),"") AS glass_id,
    IFNULL(glass.description_short, "") AS glass_name,
    doorCat.containsglass AS has_glass,
    IFNULL(GROUP_CONCAT(DISTINCT IF(glass.glassType='Paneel', 'Zonder glas', glass.glassType)), IF(doorCat.containsglass =0 OR  glass.glassType='Paneel' ,"Zonder glas", "")) AS glass_type,
    #CONCAT_WS(IF(glass.description_short <> 'Paneel',' met ',' '), doorCat.name, REPLACE(glass.description_short,'Paneel','zonder glas')) AS `name`,
       REPLACE(CONCAT_WS(" met ", doorCat.name, glass.description_short), 'met zonder','zonder') AS `name`,
    GROUP_CONCAT(DISTINCT door.producttype) AS door_type,
    door.eancode AS door_ean,
    glass.eancode AS glass_ean,
    MIN(door.priceDTM)  AS door_price,
    glass.priceDTM  AS glass_price,
    REPLACE(TRUNCATE(MIN(door.priceDTM) + IFNULL(glass.priceDTM,0) + IFNULL(mounting_package.priceDTM,0),2), '.',',') AS total_price,
    IFNULL(CONCAT('<li>',REPLACE(doorCat.usp_s, '\r\n', '</li><li>'),'</li>'),'') AS usps,
    CONCAT('https://configurator.cando.eu/images/product/overzicht/',IFNULL(IFNULL(img.bestandsnaam,imgBackup.bestandsnaam), '')) AS img_url,
    REPLACE(CONCAT('https://configurator.cando.eu/images/product/overzicht/',IFNULL(IFNULL(img.bestandsnaam,imgBackup.bestandsnaam), '')),'_klein_','_vergroting_')  AS img_url_large,
       REPLACE(CONCAT('https://configurator.cando.eu/images/product/overzicht/',IFNULL(img2.bestandsnaam, '')),'_klein_','_vergroting_')  AS img2_url_large,
       IFNULL(img2.bestandsnaam, '') AS sfeerImageFile,
    glass.visibleDTM AS `visible`,
    glass.description_short AS `glass_description`
    FROM shop_products door
    JOIN shop_pro_cat door_to_cat ON door_to_cat.product_id=door.id
    JOIN shop_category doorCat ON doorCat.doortype=@doortype AND doorCat.id=door_to_cat.cat_id
    LEFT JOIN shop_koppeling glass_to_door ON glass_to_door.prod_dest=door.id AND glass_to_door.koppeltype IN("Roede", "Glas")
    LEFT JOIN shop_products glass ON glass.id=glass_to_door.prod_source #AND glass.visibleDTM <> 0
    LEFT JOIN shop_koppeling mounting_package_to_glass ON mounting_package_to_glass.prod_dest=glass.id AND mounting_package_to_glass.koppeltype="Verplicht item"
    LEFT JOIN shop_products mounting_package ON mounting_package.id=mounting_package_to_glass.prod_source
    LEFT JOIN shop_pictures img ON img.cat_id=doorCat.id AND img.formaatnaam = 'klein' AND img.fototype='deur' AND IF(glass.description_short IS NULL, img.name = doorCat.`name`, img.name = glass.description_short)
    LEFT JOIN shop_pictures img2 ON img2.cat_id=doorCat.id AND img2.formaatnaam = 'vergroting' AND img2.fototype='sfeerfoto' AND IF(glass.description_short IS NULL, img.name = doorCat.`name`, img.name = glass.description_short)
    LEFT JOIN shop_pictures imgBackup ON imgBackup.cat_id=doorCat.id AND imgBackup.formaatnaam = 'klein' AND imgBackup.fototype='deur'
    WHERE doorCat.doortype=@doortype
    AND doorCat.doorsubtype=@doorsubtype
       #AND (glass.visibleDTM <> 0 OR IFNULL(glass.description_short, "") = 'zonder glas')
       AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', doorCat.visibleDTM, doorCat.visibleDTMBranch) <> 0
    AND IF(@_door_id = false, 1, door.id = @_door_id)
    AND IF(@_glass_id = false, 1, glass.id = @_glass_id)
       AND (glass.id IS NULL OR glass.visibleDTM <> 0)
    GROUP BY `name`
    HAVING (visible <> 0 OR IFNULL(glass_description, "") = 'zonder glas' OR LOWER(glass_type) = 'zonder glas' OR NULLIF(glass_type, '') IS NULL)
    ORDER BY `name`
    0,0657890,000046
    Open connection with DB0,0662700,000481
    QUERY SYSCON END: SET @doortype = 'buitendeur';
    SET @doorsubtype = 'voordeuren';
    SET @_door_id = IF('{door_id}' LIKE '{%}', false, CAST('{door_id}' AS UNSIGNED));
    SET @_glass_id = IF('{glass_id}' LIKE '{%}', false, CAST('{glass_id}' AS UNSIGNED));

    SELECT
    door.fsc AS fsc,
    door.KOMO AS komo,
    IF(IFNULL(door.warrantyinYears,0)>9,1,0) AS ten_yr_guarantee,
    door.id AS door_id,
    doorCat.id AS door_cat_id,
    doorCat.`name` AS door_name,
    doorCat.style AS style,
    IFNULL(doorCat.door_wood_type, "Overig") AS door_wood_type,
    GROUP_CONCAT(DISTINCT CONCAT(door.height, "x", door.width)) AS sizes,
       IFNULL(MIN(glass.id),"") AS glass_id,
    IFNULL(glass.description_short, "") AS glass_name,
    doorCat.containsglass AS has_glass,
    IFNULL(GROUP_CONCAT(DISTINCT IF(glass.glassType='Paneel', 'Zonder glas', glass.glassType)), IF(doorCat.containsglass =0 OR  glass.glassType='Paneel' ,"Zonder glas", "")) AS glass_type,
    #CONCAT_WS(IF(glass.description_short <> 'Paneel',' met ',' '), doorCat.name, REPLACE(glass.description_short,'Paneel','zonder glas')) AS `name`,
       REPLACE(CONCAT_WS(" met ", doorCat.name, glass.description_short), 'met zonder','zonder') AS `name`,
    GROUP_CONCAT(DISTINCT door.producttype) AS door_type,
    door.eancode AS door_ean,
    glass.eancode AS glass_ean,
    MIN(door.priceDTM)  AS door_price,
    glass.priceDTM  AS glass_price,
    REPLACE(TRUNCATE(MIN(door.priceDTM) + IFNULL(glass.priceDTM,0) + IFNULL(mounting_package.priceDTM,0),2), '.',',') AS total_price,
    IFNULL(CONCAT('<li>',REPLACE(doorCat.usp_s, '\r\n', '</li><li>'),'</li>'),'') AS usps,
    CONCAT('https://configurator.cando.eu/images/product/overzicht/',IFNULL(IFNULL(img.bestandsnaam,imgBackup.bestandsnaam), '')) AS img_url,
    REPLACE(CONCAT('https://configurator.cando.eu/images/product/overzicht/',IFNULL(IFNULL(img.bestandsnaam,imgBackup.bestandsnaam), '')),'_klein_','_vergroting_')  AS img_url_large,
       REPLACE(CONCAT('https://configurator.cando.eu/images/product/overzicht/',IFNULL(img2.bestandsnaam, '')),'_klein_','_vergroting_')  AS img2_url_large,
       IFNULL(img2.bestandsnaam, '') AS sfeerImageFile,
    glass.visibleDTM AS `visible`,
    glass.description_short AS `glass_description`
    FROM shop_products door
    JOIN shop_pro_cat door_to_cat ON door_to_cat.product_id=door.id
    JOIN shop_category doorCat ON doorCat.doortype=@doortype AND doorCat.id=door_to_cat.cat_id
    LEFT JOIN shop_koppeling glass_to_door ON glass_to_door.prod_dest=door.id AND glass_to_door.koppeltype IN("Roede", "Glas")
    LEFT JOIN shop_products glass ON glass.id=glass_to_door.prod_source #AND glass.visibleDTM <> 0
    LEFT JOIN shop_koppeling mounting_package_to_glass ON mounting_package_to_glass.prod_dest=glass.id AND mounting_package_to_glass.koppeltype="Verplicht item"
    LEFT JOIN shop_products mounting_package ON mounting_package.id=mounting_package_to_glass.prod_source
    LEFT JOIN shop_pictures img ON img.cat_id=doorCat.id AND img.formaatnaam = 'klein' AND img.fototype='deur' AND IF(glass.description_short IS NULL, img.name = doorCat.`name`, img.name = glass.description_short)
    LEFT JOIN shop_pictures img2 ON img2.cat_id=doorCat.id AND img2.formaatnaam = 'vergroting' AND img2.fototype='sfeerfoto' AND IF(glass.description_short IS NULL, img.name = doorCat.`name`, img.name = glass.description_short)
    LEFT JOIN shop_pictures imgBackup ON imgBackup.cat_id=doorCat.id AND imgBackup.formaatnaam = 'klein' AND imgBackup.fototype='deur'
    WHERE doorCat.doortype=@doortype
    AND doorCat.doorsubtype=@doorsubtype
       #AND (glass.visibleDTM <> 0 OR IFNULL(glass.description_short, "") = 'zonder glas')
       AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', doorCat.visibleDTM, doorCat.visibleDTMBranch) <> 0
    AND IF(@_door_id = false, 1, door.id = @_door_id)
    AND IF(@_glass_id = false, 1, glass.id = @_glass_id)
       AND (glass.id IS NULL OR glass.visibleDTM <> 0)
    GROUP BY `name`
    HAVING (visible <> 0 OR IFNULL(glass_description, "") = 'zonder glas' OR LOWER(glass_type) = 'zonder glas' OR NULLIF(glass_type, '') IS NULL)
    ORDER BY `name`
    0,6165540,550284
    [RenderValues] Do last replacements. Num items: 980,6166020,000048
    [RenderValues] replacements done1,8055501,188948
    RenderStep (values rendered) Kies uw buitendeur connected to: 2289 - mainstepnumber: 1 - stepnumber: 1 - dependentvalue: 2289 - datasource connectedid: 22891,8059820,000432
    [RenderValues] set query and/or replacements1,8068300,000848
    RenderSubStep  connected to:  - mainstepnumber: 1 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 1,8068440,000013
    Language 38 is new1,8069880,000144
    Cache item 'ML_38' already exists, so language is not cached again1,8070090,000021
    Session 'MlJclLanguage' set to 381,8070290,000020
    Start replace dynamic content1,8070470,000018
    Replace dynamic content only once1,8072090,000162
    End replace dynamic content1,8072180,000008
    No caching of lanuage 38. Because it is not changed within this session.1,9241720,116955
    Cache item 'ML_38' already exists, so language is not cached again1,9242350,000063
    Session 'MlJclLanguage' set to 381,9242450,000010
    Start replace dynamic content1,9248540,000610
    Replace dynamic content only once1,9265480,001694
    End replace dynamic content1,9265640,000016
    Start replacing system objects1,9265730,000009
    Start replacing translation1,9280930,001520
    Start replacing objects1,9285080,000415
    Start replacing request1,9290630,000556
    Start replacing session2,0321710,103108
    Start replacing standards2,0424940,010323
    Start replacing objecs again2,0432790,000785
    [RenderValues] set query and/or replacements2,4039600,360681
    RenderSubStep  connected to:  - mainstepnumber: 1 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,4040090,000049
    No caching of lanuage 38. Because it is not changed within this session.2,4041810,000172
    Cache item 'ML_38' already exists, so language is not cached again2,4042060,000025
    Session 'MlJclLanguage' set to 382,4042160,000010
    Start replace dynamic content2,4042340,000019
    Replace dynamic content only once2,4043010,000067
    End replace dynamic content2,4043090,000008
    RenderStep Binnendraaiend connected to: binnendeuren  deurtype - mainstepnumber: 2 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: binnendeuren - deurtype2,4130980,008789
    [RenderValues] set query and/or replacements2,4131330,000036
    RenderStep (values rendered) Binnendraaiend connected to: binnendeuren  deurtype - mainstepnumber: 2 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: binnendeuren - deurtype2,4131560,000023
    [RenderValues] set query and/or replacements2,4131790,000023
    [RenderValues] Execute query2,4133020,000123
    QUERY SYSCON START: SET @isBinnen = IF('{uitvoering}' ='Binnendraaiend', true,false);
    SET @isSet = IF('{uitvoering}' LIKE '{%}', false, true);

    SELECT * FROM (
    SELECT 'Links binnendraaiend' AS valuelist_1, 'linksbinnendraaiend' AS valuelist_2, 'L1' AS valuelist_3
    UNION
    SELECT'Rechts binnendraaiend', 'rechtsbinnendraaiend', 'R2'
    ) binnen
    WHERE @isBinnen AND @isSet
    UNION ALL

    SELECT * FROM (
    SELECT 'Links buitendraaiend' AS valuelist_1, 'linksbuitendraaiend' AS valuelist_2, 'L3' AS valuelist_3
    UNION
    SELECT'Rechts buitendraaiend', 'rechtsbuitendraaiend', 'R4'
    ) buiten
    WHERE @isBinnen = false AND @isSet;
    2,4133180,000016
    Open connection with DB2,4133330,000016
    QUERY SYSCON END: SET @isBinnen = IF('{uitvoering}' ='Binnendraaiend', true,false);
    SET @isSet = IF('{uitvoering}' LIKE '{%}', false, true);

    SELECT * FROM (
    SELECT 'Links binnendraaiend' AS valuelist_1, 'linksbinnendraaiend' AS valuelist_2, 'L1' AS valuelist_3
    UNION
    SELECT'Rechts binnendraaiend', 'rechtsbinnendraaiend', 'R2'
    ) binnen
    WHERE @isBinnen AND @isSet
    UNION ALL

    SELECT * FROM (
    SELECT 'Links buitendraaiend' AS valuelist_1, 'linksbuitendraaiend' AS valuelist_2, 'L3' AS valuelist_3
    UNION
    SELECT'Rechts buitendraaiend', 'rechtsbuitendraaiend', 'R4'
    ) buiten
    WHERE @isBinnen = false AND @isSet;
    2,4398960,026562
    [RenderValues] Do last replacements. Num items: 02,4399480,000053
    [RenderValues] replacements done2,4399560,000007
    RenderSubStep Kies een draairichting (binnen) connected to: draairichting - mainstepnumber: 2 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: draairichting2,4399870,000031
    No caching of lanuage 38. Because it is not changed within this session.2,4401850,000198
    Cache item 'ML_38' already exists, so language is not cached again2,4402110,000025
    Session 'MlJclLanguage' set to 382,4402200,000009
    Start replace dynamic content2,4402470,000027
    Replace dynamic content only once2,4402970,000050
    End replace dynamic content2,4403040,000007
    No caching of lanuage 38. Because it is not changed within this session.2,4424220,002118
    Cache item 'ML_38' already exists, so language is not cached again2,4424470,000025
    Session 'MlJclLanguage' set to 382,4424560,000009
    Start replace dynamic content2,4424810,000025
    QUERY SYSCON START: SELECT * FROM easy_webpages WHERE id=642,4428240,000343
    Open connection with DB2,4428480,000024
    QUERY SYSCON END: SELECT * FROM easy_webpages WHERE id=642,4980040,055156
    Set SEO fields on webpage2,4980420,000038
    title: Welkom op mijn website2,4980540,000012
    metadescription: Vul hier de meta description in2,4980610,000007
    canonicalurl: 2,4980670,000007
    noindex: False2,4980750,000008
    nofollow: False2,4980820,000007
    AddSEOFields: Title=Welkom op mijn website, Description=Vul hier de meta description in, Keywords=Vul hier de metatags in, CanonicalURL=, NoIndex=False, NoFollow=False, Robots=2,4980990,000017
    page Is Nothing: False2,4981120,000013
    page.Header Is Nothing: True2,4981190,000006
    String.IsNullOrWhiteSpace(MetaName): False2,4981250,000007
    page Is Nothing: False2,4982210,000096
    page.Header Is Nothing: True2,4982300,000009
    String.IsNullOrWhiteSpace(MetaName): False2,4982360,000006
    Start replace dynamic content2,4982750,000038
    Replace dynamic content only once2,4983170,000042
    End replace dynamic content2,4983240,000007
    Start replace dynamic content2,4983380,000014
    End replace dynamic content2,4983820,000043
    End replace dynamic content2,4983980,000016
    [RenderValues] set query and/or replacements2,4984530,000055
    [RenderValues] Execute query2,4985670,000114
    QUERY SYSCON START: SET @isBinnen = IF('{uitvoering}' ='Binnendraaiend', true,false);
    SET @isSet = IF('{uitvoering}' LIKE '{%}', false, true);

    SELECT * FROM (
    SELECT 'Links binnendraaiend' AS valuelist_1, 'linksbinnendraaiend' AS valuelist_2, 'L1' AS valuelist_3
    UNION
    SELECT'Rechts binnendraaiend', 'rechtsbinnendraaiend', 'R2'
    ) binnen
    WHERE @isBinnen AND @isSet
    UNION ALL

    SELECT * FROM (
    SELECT 'Links buitendraaiend' AS valuelist_1, 'linksbuitendraaiend' AS valuelist_2, 'L3' AS valuelist_3
    UNION
    SELECT'Rechts buitendraaiend', 'rechtsbuitendraaiend', 'R4'
    ) buiten
    WHERE @isBinnen = false AND @isSet;
    2,4985830,000016
    Open connection with DB2,4985990,000016
    QUERY SYSCON END: SET @isBinnen = IF('{uitvoering}' ='Binnendraaiend', true,false);
    SET @isSet = IF('{uitvoering}' LIKE '{%}', false, true);

    SELECT * FROM (
    SELECT 'Links binnendraaiend' AS valuelist_1, 'linksbinnendraaiend' AS valuelist_2, 'L1' AS valuelist_3
    UNION
    SELECT'Rechts binnendraaiend', 'rechtsbinnendraaiend', 'R2'
    ) binnen
    WHERE @isBinnen AND @isSet
    UNION ALL

    SELECT * FROM (
    SELECT 'Links buitendraaiend' AS valuelist_1, 'linksbuitendraaiend' AS valuelist_2, 'L3' AS valuelist_3
    UNION
    SELECT'Rechts buitendraaiend', 'rechtsbuitendraaiend', 'R4'
    ) buiten
    WHERE @isBinnen = false AND @isSet;
    2,5247060,026107
    [RenderValues] Do last replacements. Num items: 02,5247470,000041
    [RenderValues] replacements done2,5247610,000014
    RenderSubStep Kies een draairichting (binnen) connected to: draairichting - mainstepnumber: 2 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: draairichting2,5247940,000033
    No caching of lanuage 38. Because it is not changed within this session.2,5249870,000193
    Cache item 'ML_38' already exists, so language is not cached again2,5250070,000020
    Session 'MlJclLanguage' set to 382,5250160,000009
    Start replace dynamic content2,5250370,000021
    Replace dynamic content only once2,5250890,000052
    End replace dynamic content2,5250970,000008
    RenderStep Bepaal de afmeting connected to: deurtype;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: deurtype;uitvoering;draairichting2,5251470,000050
    [RenderValues] set query and/or replacements2,5251810,000035
    [RenderValues] Execute query2,5256620,000481
    QUERY SYSCON START: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);

    SET @turnDirection = IF(@turnType IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));


    SELECT
    DISTINCT(door.height) AS hoogte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail.visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    WHERE  (FIND_IN_SET(@implementationDirect, door.producttype) OR (FIND_IN_SET(@implementation, door.producttype)))
    AND IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.height;



    /*
    #SET @doorCat = 2342;#'1';
    SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat =   CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    #SET @turnType = '{draairichting}';
    #SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    #SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);

    #SET @glassCat = (SELECT cat_id FROM shop_pro_cat WHERE product_id=@doorGlass LIMIT 1);

    SELECT DISTINCT(door.height) AS hoogte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id=door.id
    JOIN shop_category doorCat ON doorCat.id=spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail .visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    #LEFT JOIN shop_pro_cat spk ON spk.cat_id=@glassCat
    #LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=spk.product_id

    WHERE IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    #AND (door.producttype = @implementation OR door.producttype = CONCAT(@implementation, ' ', @turnType))
    #AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.height

    / *
    SET @doorCat = '1';

    SELECT DISTINCT(height) AS hoogte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id
    WHERE doorCat.parent_cat_id=2289 AND doorCat.id = @doorCat
    AND door.visibleDTM<>0
    AND doorCat.visibleDTM<>0
    ORDER BY height
    */
    2,5256970,000035
    Open connection with DB2,5257640,000067
    QUERY SYSCON END: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);

    SET @turnDirection = IF(@turnType IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));


    SELECT
    DISTINCT(door.height) AS hoogte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail.visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    WHERE  (FIND_IN_SET(@implementationDirect, door.producttype) OR (FIND_IN_SET(@implementation, door.producttype)))
    AND IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.height;



    /*
    #SET @doorCat = 2342;#'1';
    SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat =   CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    #SET @turnType = '{draairichting}';
    #SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    #SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);

    #SET @glassCat = (SELECT cat_id FROM shop_pro_cat WHERE product_id=@doorGlass LIMIT 1);

    SELECT DISTINCT(door.height) AS hoogte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id=door.id
    JOIN shop_category doorCat ON doorCat.id=spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail .visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    #LEFT JOIN shop_pro_cat spk ON spk.cat_id=@glassCat
    #LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=spk.product_id

    WHERE IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    #AND (door.producttype = @implementation OR door.producttype = CONCAT(@implementation, ' ', @turnType))
    #AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.height

    / *
    SET @doorCat = '1';

    SELECT DISTINCT(height) AS hoogte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id
    WHERE doorCat.parent_cat_id=2289 AND doorCat.id = @doorCat
    AND door.visibleDTM<>0
    AND doorCat.visibleDTM<>0
    ORDER BY height
    */
    2,5548090,029045
    [RenderValues] Do last replacements. Num items: 02,5548570,000048
    [RenderValues] replacements done2,5548690,000012
    RenderStep (values rendered) Bepaal de afmeting connected to: deurtype;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: deurtype;uitvoering;draairichting2,5549090,000040
    [RenderValues] set query and/or replacements2,5549760,000067
    [RenderValues] Execute query2,5553590,000383
    QUERY SYSCON START: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);
    SET @turnDirection = IF(@turnType IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));

    SELECT
    DISTINCT(door.width) AS breedte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail .visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    #WHERE  (door.producttype = @implementation OR door.producttype = CONCAT(@implementation, ' ', @turnType))
    WHERE  (FIND_IN_SET(@implementationDirect, door.producttype) OR (FIND_IN_SET(@implementation, door.producttype)))
    AND IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    AND door.height='{height}'
    #AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.width
    2,5553840,000024
    Open connection with DB2,5554280,000044
    QUERY SYSCON END: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);
    SET @turnDirection = IF(@turnType IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));

    SELECT
    DISTINCT(door.width) AS breedte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail .visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    #WHERE  (door.producttype = @implementation OR door.producttype = CONCAT(@implementation, ' ', @turnType))
    WHERE  (FIND_IN_SET(@implementationDirect, door.producttype) OR (FIND_IN_SET(@implementation, door.producttype)))
    AND IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    AND door.height='{height}'
    #AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.width
    2,5860210,030593
    [RenderValues] Do last replacements. Num items: 02,5861120,000090
    [RenderValues] replacements done2,5861310,000019
    RenderSubStep Breedte connected to: hoogte;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: hoogte;uitvoering;draairichting2,5861720,000041
    No caching of lanuage 38. Because it is not changed within this session.2,5865770,000404
    Cache item 'ML_38' already exists, so language is not cached again2,5866290,000052
    Session 'MlJclLanguage' set to 382,5866740,000045
    Start replace dynamic content2,5867090,000035
    Replace dynamic content only once2,5868170,000108
    End replace dynamic content2,5868310,000015
    No caching of lanuage 38. Because it is not changed within this session.2,5872540,000422
    Cache item 'ML_38' already exists, so language is not cached again2,5872840,000031
    Session 'MlJclLanguage' set to 382,5873040,000019
    Start replace dynamic content2,5873300,000026
    Replace dynamic content only once2,5873990,000070
    End replace dynamic content2,5874140,000014
    [RenderValues] set query and/or replacements2,5874390,000026
    [RenderValues] Execute query2,5878270,000388
    QUERY SYSCON START: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);
    SET @turnDirection = IF(@turnType IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));

    SELECT
    DISTINCT(door.width) AS breedte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail .visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    #WHERE  (door.producttype = @implementation OR door.producttype = CONCAT(@implementation, ' ', @turnType))
    WHERE  (FIND_IN_SET(@implementationDirect, door.producttype) OR (FIND_IN_SET(@implementation, door.producttype)))
    AND IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    AND door.height='{height}'
    #AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.width
    2,5878530,000027
    Open connection with DB2,5878920,000038
    QUERY SYSCON END: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);
    SET @turnDirection = IF(@turnType IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));

    SELECT
    DISTINCT(door.width) AS breedte
    FROM shop_products door
    JOIN shop_pro_cat spc ON spc.product_id = door.id
    JOIN shop_category doorCat ON doorCat.id = spc.cat_id AND doorCat.parent_cat_id=2289 AND doorCat.id=@doorCat AND doorCat.visibleDTM<>0

    LEFT JOIN shop_products glass_org ON glass_org.id=@doorGlass
    LEFT JOIN shop_products glass_avail ON glass_avail.description_short=glass_org.description_short AND glass_avail .visibleDTM<>0
    LEFT JOIN shop_koppeling k ON k.prod_dest=door.id AND k.prod_source=glass_avail.id

    #WHERE  (door.producttype = @implementation OR door.producttype = CONCAT(@implementation, ' ', @turnType))
    WHERE  (FIND_IN_SET(@implementationDirect, door.producttype) OR (FIND_IN_SET(@implementation, door.producttype)))
    AND IF(@doorGlass > 0, k.id IS NOT NULL, 1)
    AND door.height='{height}'
    #AND door.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visibleDTM, door.visibleDTMBranch) <> 0
    ORDER BY door.width
    2,6154790,027587
    [RenderValues] Do last replacements. Num items: 02,6155330,000054
    [RenderValues] replacements done2,6155460,000014
    RenderSubStep Breedte connected to: hoogte;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: hoogte;uitvoering;draairichting2,6155960,000049
    No caching of lanuage 38. Because it is not changed within this session.2,6159550,000359
    Cache item 'ML_38' already exists, so language is not cached again2,6159970,000043
    Session 'MlJclLanguage' set to 382,6160150,000018
    Start replace dynamic content2,6160540,000040
    Replace dynamic content only once2,6161450,000090
    End replace dynamic content2,6161640,000019
    RenderStep Draairaamset connected to: deurtype;draairichting;draairichtingsub;hoogte;breedte - mainstepnumber: 3 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: deurtype;draairichting;draairichtingsub;hoogte;breedte2,6176060,001442
    [RenderValues] set query and/or replacements2,6176220,000017
    [RenderValues] Execute query2,6179380,000316
    QUERY SYSCON START: /* STEP LOGIC:
    This step should only be showed if the door is of type "roosterdeur".
    Than it should show the multiple options
    But the options must be connected to the door to show them.
    */

    # Variables
    SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @_uitvoering = 'Stomp'; #'{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = '{height}';
    SET @_width = '{width}';

    #options
    SET @_connectionType = 'Draairaamset';
    SET @_doorType = NULL;#'Roosterdeur';
    SET @_presetGlassType = 'Rooster';

    # Get door
    SET @doorCat =     CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);

    SET @implementation = IF(@_uitvoering IN('Binnendraaiend', 'Buitendraaiend'), 'stomp', @_uitvoering);
    SET @turntype = IF(@_draairichting LIKE '{%}', '',@_draairichting);
    SET @implementationTest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turntype,'%'), CONCAT('%',@implementation,'%')));
    SET @doorId = (SELECT p.id FROM shop_products p JOIN shop_pro_cat parent ON parent.product_id=p.id AND parent.cat_id=@doorCat WHERE p.height=@_height AND p.width=@_width AND p.producttype LIKE @implementationTest LIMIT 1);

    SELECT
    product.id AS productId,
    product.description_short AS valueName,
    product.description_short AS description,
       img.bestandsnaam AS afbeeldingUrl,
       REPLACE(img.bestandsnaam, 'normaal', 'vergroting') AS afbeeldingUrlGroot
    FROM shop_products product
    JOIN shop_products door ON door.id=@doorId
    JOIN shop_pro_cat door2cat ON door2cat.product_id=door.id
    JOIN shop_category doorCat ON doorCat.id=door2cat.cat_id AND IF(@_doorType IS NOT NULL, doorCat.doortype=@_doorType, 1)AND IF(@_presetGlassType IS NOT NULL, doorCat.preconfigured_glass=@_presetGlassType, 1)
    JOIN shop_koppeling product2door ON product2door.prod_source=product.id AND product2door.prod_dest=door.id AND IF(@_connectionType IS NOT NULL, product2door.koppeltype=@_connectionType, 1)
    LEFT JOIN shop_pictures img ON img.product_id=product.id AND img.formaatnaam='normaal'
    WHERE 1
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', product.visibleDTM, product.visibleDTMBranch) <> 0
    2,6179580,000019
    Open connection with DB2,6179930,000036
    QUERY SYSCON END: /* STEP LOGIC:
    This step should only be showed if the door is of type "roosterdeur".
    Than it should show the multiple options
    But the options must be connected to the door to show them.
    */

    # Variables
    SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @_uitvoering = 'Stomp'; #'{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = '{height}';
    SET @_width = '{width}';

    #options
    SET @_connectionType = 'Draairaamset';
    SET @_doorType = NULL;#'Roosterdeur';
    SET @_presetGlassType = 'Rooster';

    # Get door
    SET @doorCat =     CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);

    SET @implementation = IF(@_uitvoering IN('Binnendraaiend', 'Buitendraaiend'), 'stomp', @_uitvoering);
    SET @turntype = IF(@_draairichting LIKE '{%}', '',@_draairichting);
    SET @implementationTest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turntype,'%'), CONCAT('%',@implementation,'%')));
    SET @doorId = (SELECT p.id FROM shop_products p JOIN shop_pro_cat parent ON parent.product_id=p.id AND parent.cat_id=@doorCat WHERE p.height=@_height AND p.width=@_width AND p.producttype LIKE @implementationTest LIMIT 1);

    SELECT
    product.id AS productId,
    product.description_short AS valueName,
    product.description_short AS description,
       img.bestandsnaam AS afbeeldingUrl,
       REPLACE(img.bestandsnaam, 'normaal', 'vergroting') AS afbeeldingUrlGroot
    FROM shop_products product
    JOIN shop_products door ON door.id=@doorId
    JOIN shop_pro_cat door2cat ON door2cat.product_id=door.id
    JOIN shop_category doorCat ON doorCat.id=door2cat.cat_id AND IF(@_doorType IS NOT NULL, doorCat.doortype=@_doorType, 1)AND IF(@_presetGlassType IS NOT NULL, doorCat.preconfigured_glass=@_presetGlassType, 1)
    JOIN shop_koppeling product2door ON product2door.prod_source=product.id AND product2door.prod_dest=door.id AND IF(@_connectionType IS NOT NULL, product2door.koppeltype=@_connectionType, 1)
    LEFT JOIN shop_pictures img ON img.product_id=product.id AND img.formaatnaam='normaal'
    WHERE 1
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', product.visibleDTM, product.visibleDTMBranch) <> 0
    2,6454540,027461
    [RenderValues] Do last replacements. Num items: 02,6455030,000049
    [RenderValues] replacements done2,6455180,000015
    RenderStep (values rendered) Draairaamset connected to: deurtype;draairichting;draairichtingsub;hoogte;breedte - mainstepnumber: 3 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: deurtype;draairichting;draairichtingsub;hoogte;breedte2,6455650,000047
    [RenderValues] set query and/or replacements2,6456840,000119
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,6457510,000067
    No caching of lanuage 38. Because it is not changed within this session.2,6459620,000211
    Cache item 'ML_38' already exists, so language is not cached again2,6460140,000053
    Session 'MlJclLanguage' set to 382,6460300,000016
    Start replace dynamic content2,6460530,000023
    Replace dynamic content only once2,6461200,000067
    End replace dynamic content2,6461300,000010
    No caching of lanuage 38. Because it is not changed within this session.2,6465700,000439
    Cache item 'ML_38' already exists, so language is not cached again2,6465970,000028
    Session 'MlJclLanguage' set to 382,6466100,000013
    Start replace dynamic content2,6466290,000019
    Replace dynamic content only once2,6467170,000087
    End replace dynamic content2,6467270,000010
    [RenderValues] set query and/or replacements2,6467470,000021
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,6467590,000011
    No caching of lanuage 38. Because it is not changed within this session.2,6469080,000149
    Cache item 'ML_38' already exists, so language is not cached again2,6469430,000036
    Session 'MlJclLanguage' set to 382,6469680,000024
    Start replace dynamic content2,6469840,000017
    Replace dynamic content only once2,6470370,000053
    End replace dynamic content2,6470460,000010
    RenderStep Veiligheidspakket connected to: uitvoering;draairichting;hoogte;breedte;draairaamset - mainstepnumber: 3 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte;draairaamset2,6470790,000032
    [RenderValues] set query and/or replacements2,6470950,000017
    [RenderValues] Execute query2,6474500,000355
    QUERY SYSCON START: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    SELECT
    @doorId,
    p.id AS product_id,
    p.eancode,
    p.description_short AS description_short,
    IFNULL(p.serie, p.producttype) AS name,
       REPLACE(REPLACE(p.priceDTM, '.',','), ',00', ',-')  AS price,
    spk.cat_id,
    sp.bestandsnaam,
    REPLACE(sp.bestandsnaam, 'normaal', 'vergroting') AS afbeeldingUrlGroot,
    suitable_for,
    suitable_for2,
    IFNULL(CONCAT('<li>',REPLACE(p.usp_s, '\r\n', '</li><li>'),'</li>'),'') AS usps
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype = 'veiligheidspakket'
    JOIN shop_pro_cat spk ON spk.product_id=p.id
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'
    WHERE IFNULL(p.serie, p.producttype) = 'Veiligheidspakket'
    AND ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
    (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    '{draairichting}' LIKE CONCAT('%', suitable_for , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    ORDER BY name
    2,6474730,000023
    Open connection with DB2,6475320,000060
    QUERY SYSCON END: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    SELECT
    @doorId,
    p.id AS product_id,
    p.eancode,
    p.description_short AS description_short,
    IFNULL(p.serie, p.producttype) AS name,
       REPLACE(REPLACE(p.priceDTM, '.',','), ',00', ',-')  AS price,
    spk.cat_id,
    sp.bestandsnaam,
    REPLACE(sp.bestandsnaam, 'normaal', 'vergroting') AS afbeeldingUrlGroot,
    suitable_for,
    suitable_for2,
    IFNULL(CONCAT('<li>',REPLACE(p.usp_s, '\r\n', '</li><li>'),'</li>'),'') AS usps
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype = 'veiligheidspakket'
    JOIN shop_pro_cat spk ON spk.product_id=p.id
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'
    WHERE IFNULL(p.serie, p.producttype) = 'Veiligheidspakket'
    AND ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
    (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    '{draairichting}' LIKE CONCAT('%', suitable_for , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    ORDER BY name
    2,6773520,029820
    [RenderValues] Do last replacements. Num items: 02,6773960,000043
    [RenderValues] replacements done2,6774070,000012
    RenderStep (values rendered) Veiligheidspakket connected to: uitvoering;draairichting;hoogte;breedte;draairaamset - mainstepnumber: 3 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte;draairaamset2,6774480,000041
    [RenderValues] set query and/or replacements2,6775100,000062
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,6775250,000015
    No caching of lanuage 38. Because it is not changed within this session.2,6778640,000339
    Cache item 'ML_38' already exists, so language is not cached again2,6779000,000036
    Session 'MlJclLanguage' set to 382,6779180,000017
    Start replace dynamic content2,6779450,000027
    Replace dynamic content only once2,6780520,000107
    End replace dynamic content2,6780690,000017
    No caching of lanuage 38. Because it is not changed within this session.2,6784370,000369
    Cache item 'ML_38' already exists, so language is not cached again2,6784600,000023
    Session 'MlJclLanguage' set to 382,6784720,000013
    Start replace dynamic content2,6784950,000023
    Replace dynamic content only once2,6785540,000058
    End replace dynamic content2,6785640,000011
    [RenderValues] set query and/or replacements2,6785860,000021
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,6785980,000012
    No caching of lanuage 38. Because it is not changed within this session.2,6788760,000278
    Cache item 'ML_38' already exists, so language is not cached again2,6789040,000028
    Session 'MlJclLanguage' set to 382,6789160,000013
    Start replace dynamic content2,6789470,000030
    Replace dynamic content only once2,6790340,000087
    End replace dynamic content2,6790470,000013
    RenderStep Driepuntssluiting (alleen bij geen veiligheidspakket) connected to: veiligheidspakket;draairaamset - mainstepnumber: 3 - stepnumber: 3 - dependentvalue: 1 - datasource connectedid: veiligheidspakket;draairaamset2,6790880,000041
    [RenderValues] set query and/or replacements2,6791020,000015
    [RenderValues] Execute query2,6795070,000404
    QUERY SYSCON START: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);
    SET @results = false;

    SELECT * FROM (
    SELECT 'Geen driepuntsluiting' AS valuelist_1, 0 AS valuelist_2, 0 AS valuelist_3, 0 AS result

    UNION

    SELECT
    /*IF(p.serie LIKE '%sleutel%','Sleutelbediend','Krukbediend')*/p.description_short,
    IF(p.serie LIKE '%sleutel%','sleutelbediend','krukbediend'),
    p.id,
    GREATEST(@results := true, -1) AS result
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_source=p.id AND k.prod_dest = @doorId AND k.koppeltype = 'Driepuntssluiting'
    WHERE ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', suitable_for , '%')
    OR
    #inverted
    suitable_for LIKE CONCAT('%', REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )  
    #AND p.visibleDTM<>0
       AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ) res
    WHERE '{veiligheidspakketJanee}'='Nee' AND @results
    2,6795370,000030
    Open connection with DB2,6796040,000067
    QUERY SYSCON END: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);
    SET @results = false;

    SELECT * FROM (
    SELECT 'Geen driepuntsluiting' AS valuelist_1, 0 AS valuelist_2, 0 AS valuelist_3, 0 AS result

    UNION

    SELECT
    /*IF(p.serie LIKE '%sleutel%','Sleutelbediend','Krukbediend')*/p.description_short,
    IF(p.serie LIKE '%sleutel%','sleutelbediend','krukbediend'),
    p.id,
    GREATEST(@results := true, -1) AS result
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_source=p.id AND k.prod_dest = @doorId AND k.koppeltype = 'Driepuntssluiting'
    WHERE ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', suitable_for , '%')
    OR
    #inverted
    suitable_for LIKE CONCAT('%', REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )  
    #AND p.visibleDTM<>0
       AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ) res
    WHERE '{veiligheidspakketJanee}'='Nee' AND @results
    2,7152600,035656
    [RenderValues] Do last replacements. Num items: 02,7153260,000066
    [RenderValues] replacements done2,7153410,000016
    RenderStep (values rendered) Driepuntssluiting (alleen bij geen veiligheidspakket) connected to: veiligheidspakket;draairaamset - mainstepnumber: 3 - stepnumber: 3 - dependentvalue: 1 - datasource connectedid: veiligheidspakket;draairaamset2,7153950,000053
    [RenderValues] set query and/or replacements2,7154700,000076
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 3 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,7154920,000022
    No caching of lanuage 38. Because it is not changed within this session.2,7158540,000362
    Cache item 'ML_38' already exists, so language is not cached again2,7159000,000046
    Session 'MlJclLanguage' set to 382,7159230,000023
    Start replace dynamic content2,7159570,000034
    Replace dynamic content only once2,7160610,000104
    End replace dynamic content2,7160800,000020
    No caching of lanuage 38. Because it is not changed within this session.2,7165770,000497
    Cache item 'ML_38' already exists, so language is not cached again2,7166070,000031
    Session 'MlJclLanguage' set to 382,7166250,000018
    Start replace dynamic content2,7166880,000063
    Replace dynamic content only once2,7167890,000101
    End replace dynamic content2,7168100,000020
    [RenderValues] set query and/or replacements2,7168430,000033
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 3 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,7169000,000057
    No caching of lanuage 38. Because it is not changed within this session.2,7171850,000285
    Cache item 'ML_38' already exists, so language is not cached again2,7172140,000030
    Session 'MlJclLanguage' set to 382,7172350,000021
    Start replace dynamic content2,7172640,000028
    Replace dynamic content only once2,7173620,000099
    End replace dynamic content2,7173820,000019
    RenderStep Slotgatfrezing (bij geen driepuntsluiting) nieuw connected to: uitvoering;draairichting;driepuntsluiting;veiligheidspakket - mainstepnumber: 3 - stepnumber: 4 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;driepuntsluiting;veiligheidspakket2,7174460,000065
    [RenderValues] set query and/or replacements2,7174740,000027
    [RenderValues] Execute query2,7182960,000822
    QUERY SYSCON START: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###
    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);

    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    IFNULL(info.html, '') AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))) AS product_name,
       REPLACE(REPLACE(p.priceDTM * IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%',2,1), '.',','), ',00', ',-')  AS price,
       'images/prod-scharnieren.png' AS product_image,
    spk.cat_id,
    IFNULL(sp.bestandsnaam, '') AS bestandsnaam,
    p.suitable_for,
    p.suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype = 'service'
    JOIN shop_pro_cat spk ON spk.product_id=p.id #AND spk.cat_id IN(2386)# CAT (accessoires)
    LEFT JOIN easy_webpages info ON info.seoname = CONCAT('uitleg-', IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))))
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'

    WHERE ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', suitable_for , '%')
    OR
    #inverted
    suitable_for LIKE CONCAT('%', REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )   AND  '{veiligheidspakketJanee}' = 'Nee'  AND '{driepuntssluiting}' = '0' AND  p.producttype='slotgatfrezing'
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    2,7183430,000047
    Open connection with DB2,7184590,000116
    QUERY SYSCON END: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###
    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);

    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    IFNULL(info.html, '') AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))) AS product_name,
       REPLACE(REPLACE(p.priceDTM * IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%',2,1), '.',','), ',00', ',-')  AS price,
       'images/prod-scharnieren.png' AS product_image,
    spk.cat_id,
    IFNULL(sp.bestandsnaam, '') AS bestandsnaam,
    p.suitable_for,
    p.suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype = 'service'
    JOIN shop_pro_cat spk ON spk.product_id=p.id #AND spk.cat_id IN(2386)# CAT (accessoires)
    LEFT JOIN easy_webpages info ON info.seoname = CONCAT('uitleg-', IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))))
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'

    WHERE ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', suitable_for , '%')
    OR
    #inverted
    suitable_for LIKE CONCAT('%', REPLACE(REPLACE('{draairichting}', 'links', 'R2/L3'), 'rechts', 'L1/R4') , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )   AND  '{veiligheidspakketJanee}' = 'Nee'  AND '{driepuntssluiting}' = '0' AND  p.producttype='slotgatfrezing'
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    2,7474990,029040
    [RenderValues] Do last replacements. Num items: 02,7475650,000066
    [RenderValues] replacements done2,7475910,000026
    RenderStep (values rendered) Slotgatfrezing (bij geen driepuntsluiting) nieuw connected to: uitvoering;draairichting;driepuntsluiting;veiligheidspakket - mainstepnumber: 3 - stepnumber: 4 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;driepuntsluiting;veiligheidspakket2,7477210,000130
    [RenderValues] set query and/or replacements2,7478110,000090
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 4 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,7478320,000022
    No caching of lanuage 38. Because it is not changed within this session.2,7481100,000278
    Cache item 'ML_38' already exists, so language is not cached again2,7481490,000038
    Session 'MlJclLanguage' set to 382,7481670,000018
    Start replace dynamic content2,7481960,000029
    Replace dynamic content only once2,7482930,000097
    End replace dynamic content2,7483110,000018
    No caching of lanuage 38. Because it is not changed within this session.2,7487410,000430
    Cache item 'ML_38' already exists, so language is not cached again2,7487650,000024
    Session 'MlJclLanguage' set to 382,7487840,000019
    Start replace dynamic content2,7488090,000026
    Replace dynamic content only once2,7488770,000068
    End replace dynamic content2,7488920,000015
    [RenderValues] set query and/or replacements2,7489180,000026
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 4 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,7489340,000016
    No caching of lanuage 38. Because it is not changed within this session.2,7491340,000200
    Cache item 'ML_38' already exists, so language is not cached again2,7491550,000021
    Session 'MlJclLanguage' set to 382,7491710,000017
    Start replace dynamic content2,7491920,000021
    Replace dynamic content only once2,7492620,000070
    End replace dynamic content2,7492800,000018
    RenderStep Brievenbuspakket connected to: veiligheidspakket - mainstepnumber: 3 - stepnumber: 5 - dependentvalue: 1 - datasource connectedid: veiligheidspakket2,7493330,000053
    [RenderValues] set query and/or replacements2,7493510,000019
    [RenderValues] Execute query2,7499190,000567
    QUERY SYSCON START:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    # uitvoering
    SET @securityPackageVersion = (SELECT version FROM shop_products WHERE eancode='{veiligheidspakketSerie}' AND version <> '');

    SELECT
    @doorId,
    p.id AS product_id,
        p.eancode,
         p.description_short AS description_short,
    IFNULL(p.serie, p.producttype) AS name,
       REPLACE(REPLACE(p.priceDTM, '.',','), ',00', ',-')  AS price,
    spk.cat_id,
    sp.bestandsnaam,
    suitable_for,
    suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype = 'brievenbuspakket'
    JOIN shop_pro_cat spk ON spk.product_id=p.id
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'
    WHERE /* IFNULL(p.serie, p.producttype) = 'brievenbuspakket'
    AND */ ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
    (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    '{draairichting}' LIKE CONCAT('%', suitable_for , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0
    AND (@securityPackageVersion IS NULL /*OR p.version IS NULL */ OR p.version = @securityPackageVersion)
    GROUP BY p.id
    ORDER BY name
    2,7499580,000039
    Open connection with DB2,7501280,000171
    QUERY SYSCON END:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    # uitvoering
    SET @securityPackageVersion = (SELECT version FROM shop_products WHERE eancode='{veiligheidspakketSerie}' AND version <> '');

    SELECT
    @doorId,
    p.id AS product_id,
        p.eancode,
         p.description_short AS description_short,
    IFNULL(p.serie, p.producttype) AS name,
       REPLACE(REPLACE(p.priceDTM, '.',','), ',00', ',-')  AS price,
    spk.cat_id,
    sp.bestandsnaam,
    suitable_for,
    suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype = 'brievenbuspakket'
    JOIN shop_pro_cat spk ON spk.product_id=p.id
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'
    WHERE /* IFNULL(p.serie, p.producttype) = 'brievenbuspakket'
    AND */ ( NULLIF(suitable_for2,'') IS NULL
    OR suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(@implementation, 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
    (suitable_for IS NULL OR suitable_for = 'ALLE' OR
    '{draairichting}' LIKE CONCAT('%', suitable_for , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = '{draairichting}') LIKE CONCAT('%', suitable_for , '%')
    )
    )
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0
    AND (@securityPackageVersion IS NULL /*OR p.version IS NULL */ OR p.version = @securityPackageVersion)
    GROUP BY p.id
    ORDER BY name
    2,7789310,028802
    [RenderValues] Do last replacements. Num items: 02,7789810,000051
    [RenderValues] replacements done2,7789920,000010
    RenderStep (values rendered) Brievenbuspakket connected to: veiligheidspakket - mainstepnumber: 3 - stepnumber: 5 - dependentvalue: 1 - datasource connectedid: veiligheidspakket2,7790310,000040
    [RenderValues] set query and/or replacements2,7790890,000057
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 5 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,7791160,000028
    No caching of lanuage 38. Because it is not changed within this session.2,7794290,000312
    Cache item 'ML_38' already exists, so language is not cached again2,7794600,000032
    Session 'MlJclLanguage' set to 382,7794760,000015
    Start replace dynamic content2,7794990,000023
    Replace dynamic content only once2,7795850,000086
    End replace dynamic content2,7796090,000024
    No caching of lanuage 38. Because it is not changed within this session.2,7800520,000443
    Cache item 'ML_38' already exists, so language is not cached again2,7800780,000025
    Session 'MlJclLanguage' set to 382,7800900,000013
    Start replace dynamic content2,7801130,000023
    Replace dynamic content only once2,7801690,000056
    End replace dynamic content2,7801790,000010
    [RenderValues] set query and/or replacements2,7802000,000020
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 5 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,7802130,000013
    No caching of lanuage 38. Because it is not changed within this session.2,7803590,000147
    Cache item 'ML_38' already exists, so language is not cached again2,7803730,000013
    Session 'MlJclLanguage' set to 382,7803840,000011
    Start replace dynamic content2,7803970,000013
    Replace dynamic content only once2,7804430,000046
    End replace dynamic content2,7804530,000010
    RenderStep Briefplaatfrezing connected to: brievenbuspakket - mainstepnumber: 3 - stepnumber: 6 - dependentvalue: 1 - datasource connectedid: brievenbuspakket2,7804870,000034
    [RenderValues] set query and/or replacements2,7805130,000026
    [RenderValues] Execute query2,7809900,000477
    QUERY SYSCON START: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);


    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    IFNULL(info.html, '') AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    LOWER(IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', '')))) AS product_name,
    REPLACE(REPLACE(p.priceDTM * IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%',2,1), '.',','), ',00', ',-')  AS price,
       'images/prod-scharnieren.png' AS product_image,
    spk.cat_id,
    IFNULL(sp.bestandsnaam, '') AS bestandsnaam,
    p.suitable_for,
    p.suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype= 'service'
    JOIN shop_pro_cat spk ON spk.product_id=p.id #AND spk.cat_id IN(2386)# CAT (accessoires)
    LEFT JOIN easy_webpages info ON info.seoname = CONCAT('uitleg-', IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))))
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'

    WHERE (NULLIF(p.suitable_for2,'') IS NULL
    OR p.suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(LOWER(@implementation), 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (p.suitable_for IS NULL OR p.suitable_for = 'ALLE' OR
    REPLACE(REPLACE(@turnDirection, 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', p.suitable_for , '%') OR
    # reversed
    p.suitable_for LIKE CONCAT('%', REPLACE(REPLACE(@turnDirection, 'links', 'R2/L3'), 'rechts', 'L1/R4') , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = @turnDirection) LIKE CONCAT('%', p.suitable_for , '%')
    )
    )  AND '{brievenbuspakketJanee}' = 'Nee' AND  p.producttype='briefplaatfrezing'
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    2,7810360,000046
    Open connection with DB2,7811110,000075
    QUERY SYSCON END: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);


    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    IFNULL(info.html, '') AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    LOWER(IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', '')))) AS product_name,
    REPLACE(REPLACE(p.priceDTM * IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%',2,1), '.',','), ',00', ',-')  AS price,
       'images/prod-scharnieren.png' AS product_image,
    spk.cat_id,
    IFNULL(sp.bestandsnaam, '') AS bestandsnaam,
    p.suitable_for,
    p.suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype= 'service'
    JOIN shop_pro_cat spk ON spk.product_id=p.id #AND spk.cat_id IN(2386)# CAT (accessoires)
    LEFT JOIN easy_webpages info ON info.seoname = CONCAT('uitleg-', IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))))
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'

    WHERE (NULLIF(p.suitable_for2,'') IS NULL
    OR p.suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(LOWER(@implementation), 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (p.suitable_for IS NULL OR p.suitable_for = 'ALLE' OR
    REPLACE(REPLACE(@turnDirection, 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', p.suitable_for , '%') OR
    # reversed
    p.suitable_for LIKE CONCAT('%', REPLACE(REPLACE(@turnDirection, 'links', 'R2/L3'), 'rechts', 'L1/R4') , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = @turnDirection) LIKE CONCAT('%', p.suitable_for , '%')
    )
    )  AND '{brievenbuspakketJanee}' = 'Nee' AND  p.producttype='briefplaatfrezing'
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    2,8105250,029414
    [RenderValues] Do last replacements. Num items: 02,8105780,000053
    [RenderValues] replacements done2,8105900,000013
    RenderStep (values rendered) Briefplaatfrezing connected to: brievenbuspakket - mainstepnumber: 3 - stepnumber: 6 - dependentvalue: 1 - datasource connectedid: brievenbuspakket2,8109820,000392
    [RenderValues] set query and/or replacements2,8110700,000088
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 6 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,8111180,000048
    No caching of lanuage 38. Because it is not changed within this session.2,8115220,000404
    Cache item 'ML_38' already exists, so language is not cached again2,8115620,000040
    Session 'MlJclLanguage' set to 382,8115840,000022
    Start replace dynamic content2,8116130,000029
    Replace dynamic content only once2,8117410,000128
    End replace dynamic content2,8117570,000016
    No caching of lanuage 38. Because it is not changed within this session.2,8121120,000355
    Cache item 'ML_38' already exists, so language is not cached again2,8121360,000024
    Session 'MlJclLanguage' set to 382,8121560,000020
    Start replace dynamic content2,8121880,000032
    Replace dynamic content only once2,8122500,000062
    End replace dynamic content2,8122650,000015
    [RenderValues] set query and/or replacements2,8122880,000024
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 6 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,8123780,000090
    No caching of lanuage 38. Because it is not changed within this session.2,8125920,000213
    Cache item 'ML_38' already exists, so language is not cached again2,8126190,000028
    Session 'MlJclLanguage' set to 382,8126640,000045
    Start replace dynamic content2,8126950,000031
    Replace dynamic content only once2,8127630,000068
    End replace dynamic content2,8127780,000015
    RenderStep Scharnierkrozingen connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 7 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte2,8128230,000045
    [RenderValues] set query and/or replacements2,8128550,000032
    [RenderValues] Execute query2,8132740,000419
    QUERY SYSCON START:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###


    SET @isDubbel = IF('{dubbel}' = 'Ja', 1, 0);

    SELECT
      @isIndustrial,
    false AS hidden,
    'scharnierkrozingen' AS product_name,
    'scharnierkrozingen' AS product_description,
    sp.bestandsnaam,
    p.id,
    p.eancode,
    p.description_short,
    p.version,
    REPLACE(REPLACE(IFNULL(SUM(p.priceDTM),0), '.',','), ',00', ',-')  AS price
    FROM shop_products p
    JOIN shop_products door ON door.id=@doorId
    JOIN shop_koppeling k ON k.prod_source = p.id AND k.prod_dest=door.id AND k.koppeltype = 'Scharnierkrozing'
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'
    WHERE p.suitable_for = REPLACE(REPLACE(@turnType, 'links', 'L1'),'rechts','R2')
    AND p.visibleDTM<>0
    GROUP BY p.id
    2,8133060,000032
    Open connection with DB2,8133760,000070
    QUERY SYSCON END:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###


    SET @isDubbel = IF('{dubbel}' = 'Ja', 1, 0);

    SELECT
      @isIndustrial,
    false AS hidden,
    'scharnierkrozingen' AS product_name,
    'scharnierkrozingen' AS product_description,
    sp.bestandsnaam,
    p.id,
    p.eancode,
    p.description_short,
    p.version,
    REPLACE(REPLACE(IFNULL(SUM(p.priceDTM),0), '.',','), ',00', ',-')  AS price
    FROM shop_products p
    JOIN shop_products door ON door.id=@doorId
    JOIN shop_koppeling k ON k.prod_source = p.id AND k.prod_dest=door.id AND k.koppeltype = 'Scharnierkrozing'
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'
    WHERE p.suitable_for = REPLACE(REPLACE(@turnType, 'links', 'L1'),'rechts','R2')
    AND p.visibleDTM<>0
    GROUP BY p.id
    2,8430270,029651
    [RenderValues] Do last replacements. Num items: 02,8430810,000054
    [RenderValues] replacements done2,8430880,000007
    RenderStep (values rendered) Scharnierkrozingen connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 7 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte2,8431220,000034
    [RenderValues] set query and/or replacements2,8431960,000074
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 7 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,8432060,000011
    No caching of lanuage 38. Because it is not changed within this session.2,8434120,000205
    Cache item 'ML_38' already exists, so language is not cached again2,8434390,000028
    Session 'MlJclLanguage' set to 382,8434480,000009
    Start replace dynamic content2,8434660,000018
    Replace dynamic content only once2,8435200,000054
    End replace dynamic content2,8435270,000008
    No caching of lanuage 38. Because it is not changed within this session.2,8437440,000217
    Cache item 'ML_38' already exists, so language is not cached again2,8437570,000012
    Session 'MlJclLanguage' set to 382,8437640,000008
    Start replace dynamic content2,8437760,000012
    Replace dynamic content only once2,8438130,000037
    End replace dynamic content2,8438200,000007
    [RenderValues] set query and/or replacements2,8438340,000013
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 7 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,8438410,000008
    No caching of lanuage 38. Because it is not changed within this session.2,8439910,000150
    Cache item 'ML_38' already exists, so language is not cached again2,8440100,000019
    Session 'MlJclLanguage' set to 382,8440230,000013
    Start replace dynamic content2,8440350,000012
    Replace dynamic content only once2,8440710,000036
    End replace dynamic content2,8440770,000007
    RenderStep Accessoires connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 8 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte2,8441100,000033
    [RenderValues] set query and/or replacements2,8441350,000025
    [RenderValues] Execute query2,8444930,000358
    QUERY SYSCON START:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);


    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    #IFNULL(info.html, '') AS info,
    p.usp_s AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    LOWER(IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', '')))) AS product_name,
       REPLACE(REPLACE(IFNULL(SUM(innerProducts.priceDTM), p.priceDTM) * IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%',2,1), '.',','), ',00', ',-')  AS price,
       'images/prod-scharnieren.png' AS product_image,
    spk.cat_id,
    IFNULL(MIN(spi.bestandsnaam), sp.bestandsnaam) AS bestandsnaam,
    p.suitable_for,
    p.suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype IN ('accessoire', 'accessoirepakket')
    JOIN shop_pro_cat spk ON spk.product_id=p.id #AND spk.cat_id IN(2386)# CAT (accessoires)
    LEFT JOIN easy_webpages info ON info.seoname = CONCAT('uitleg-', IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))))
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'

    LEFT JOIN shop_koppeling k2 ON k2.prod_dest = k.prod_source AND k2.koppeltype='accessoire' # schuifsysteem
    LEFT JOIN shop_products innerProducts ON innerProducts.id=k2.prod_source
    LEFT JOIN shop_pictures spi ON spi.product_id=innerProducts.id AND spi.formaatnaam='normaal'

    WHERE (NULLIF(p.suitable_for2,'') IS NULL
    OR p.suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(LOWER(@implementation), 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (p.suitable_for IS NULL OR p.suitable_for = 'ALLE' OR
    REPLACE(REPLACE(@turntype, 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', p.suitable_for , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = @turntype) LIKE CONCAT('%', p.suitable_for , '%')
    )
    )  
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    2,8445150,000022
    Open connection with DB2,8445680,000052
    QUERY SYSCON END:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

    ### Get correct door id and information.
    SET @doorChoice = IF(@_doorType LIKE '{%}', '0,0,0', @_doorType);

    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @doorExtra = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 3), ',', -1) AS UNSIGNED);
    SET @implementation = IF(@_uitvoering LIKE '{%}', NULL, IF(@_uitvoering IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}'));
    SET @turnDirection = IF(@_draairichting IN ('R2/L3', 'L3', 'R2'), 'links', 'rechts');
    SET @implementationDirect = CONCAT_WS(' ', @implementation, IF(@turnDirection LIKE '{%}', NULL, @turnDirection));
    SET @implementationTestNearest = IF(@implementation = 'schuifdeur', '%stomp%', IF(@implementation='opdek', CONCAT('%',@implementation, ' ', @turnDirection,'%'), CONCAT('%', @implementation ,'%')));

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### END door vars ###

    SET @isIndustrial = (SELECT IF(COUNT(*)>0,true,false) FROM shop_category WHERE id=@doorCat AND style LIKE '%industrial%');
    SET @isDouble = IF('{dubbel}' = 'Ja', true, false);


    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    #IFNULL(info.html, '') AS info,
    p.usp_s AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    LOWER(IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', '')))) AS product_name,
       REPLACE(REPLACE(IFNULL(SUM(innerProducts.priceDTM), p.priceDTM) * IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%',2,1), '.',','), ',00', ',-')  AS price,
       'images/prod-scharnieren.png' AS product_image,
    spk.cat_id,
    IFNULL(MIN(spi.bestandsnaam), sp.bestandsnaam) AS bestandsnaam,
    p.suitable_for,
    p.suitable_for2
    FROM shop_products p
    JOIN shop_koppeling k ON k.prod_dest = @doorId AND k.prod_source = p.id AND k.koppeltype IN ('accessoire', 'accessoirepakket')
    JOIN shop_pro_cat spk ON spk.product_id=p.id #AND spk.cat_id IN(2386)# CAT (accessoires)
    LEFT JOIN easy_webpages info ON info.seoname = CONCAT('uitleg-', IFNULL(NULLIF(p.producttype,''), IFNULL(p.serie, REPLACE(p.description_short, ' ', ''))))
    LEFT JOIN shop_pictures sp ON sp.product_id=p.id AND sp.formaatnaam='normaal'

    LEFT JOIN shop_koppeling k2 ON k2.prod_dest = k.prod_source AND k2.koppeltype='accessoire' # schuifsysteem
    LEFT JOIN shop_products innerProducts ON innerProducts.id=k2.prod_source
    LEFT JOIN shop_pictures spi ON spi.product_id=innerProducts.id AND spi.formaatnaam='normaal'

    WHERE (NULLIF(p.suitable_for2,'') IS NULL
    OR p.suitable_for2 LIKE CONCAT('%', IF(@isDouble, 'dubbel', 'enkel'), ' ', REPLACE(LOWER(@implementation), 'schuifdeur', 'schuif'), '%')
    ) AND
    # turntypes
     (p.suitable_for IS NULL OR p.suitable_for = 'ALLE' OR
    REPLACE(REPLACE(@turntype, 'links', 'R2/L3'), 'rechts', 'L1/R4') LIKE CONCAT('%', p.suitable_for , '%')
    OR (
    (SELECT suitable_for FROM shop_products WHERE eancode = @turntype) LIKE CONCAT('%', p.suitable_for , '%')
    )
    )  
    #AND p.visibleDTM<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visibleDTM, p.visibleDTMBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    2,8748790,030312
    [RenderValues] Do last replacements. Num items: 02,8749350,000055
    [RenderValues] replacements done2,8749610,000026
    RenderStep (values rendered) Accessoires connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 8 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte2,8750200,000059
    [RenderValues] set query and/or replacements2,8751180,000099
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 8 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,8751430,000024
    No caching of lanuage 38. Because it is not changed within this session.2,8754020,000259
    Cache item 'ML_38' already exists, so language is not cached again2,8754360,000034
    Session 'MlJclLanguage' set to 382,8754530,000016
    Start replace dynamic content2,8754770,000024
    Replace dynamic content only once2,8755580,000082
    End replace dynamic content2,8755780,000020
    No caching of lanuage 38. Because it is not changed within this session.2,8759780,000399
    Cache item 'ML_38' already exists, so language is not cached again2,8760010,000023
    Session 'MlJclLanguage' set to 382,8760160,000015
    Start replace dynamic content2,8760380,000022
    Replace dynamic content only once2,8760940,000056
    End replace dynamic content2,8761050,000010
    [RenderValues] set query and/or replacements2,8761330,000028
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 8 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,8761600,000028
    No caching of lanuage 38. Because it is not changed within this session.2,8764010,000241
    Cache item 'ML_38' already exists, so language is not cached again2,8764300,000028
    Session 'MlJclLanguage' set to 382,8764420,000013
    Start replace dynamic content2,8764600,000018
    Replace dynamic content only once2,8765390,000080
    End replace dynamic content2,8765600,000021
    No caching of lanuage 38. Because it is not changed within this session.2,8838770,007317
    Cache item 'ML_38' already exists, so language is not cached again2,8839160,000039
    Session 'MlJclLanguage' set to 382,8839260,000010
    Start replace dynamic content2,8845360,000610
    Replace dynamic content only once2,8863080,001772
    End replace dynamic content2,8863270,000019
    Start replacing system objects2,8863350,000008
    Start replacing translation2,8945830,008248
    Start replacing objects2,8949980,000415
    Start replacing request2,8954790,000481
    Start replacing session3,0402120,144733
    Start replacing standards3,0525640,012352
    Start replacing objecs again3,0533470,000783
    aspx.pageEnd Render3,0741770,020830

    Control Tree

    Control UniqueIDTypeRender Size Bytes (including children)ViewState Size Bytes (excluding children)ControlState Size Bytes (excluding children)
    __PageASP.homepage_aspx28133200
        ctl00System.Web.UI.HtmlControls.HtmlHead106800
            ctl01System.Web.UI.HtmlControls.HtmlMeta2400
            ctl02System.Web.UI.HtmlControls.HtmlMeta7000
            ctl03System.Web.UI.HtmlControls.HtmlMeta4500
            LiteralTagmanagerCodeSystem.Web.UI.WebControls.Literal8400
            ctl08System.Web.UI.LiteralControl8600
            ctl04System.Web.UI.HtmlControls.HtmlTitle5100
            ctl05System.Web.UI.HtmlControls.HtmlGenericControl46400
                ctl09System.Web.UI.LiteralControl42400
            ctl06System.Web.UI.HtmlControls.HtmlLink11500
            ctl07System.Web.UI.HtmlControls.HtmlGenericControl11600
        LoginCJuiceControlLibrary.LoginControl2400

    Session State

    Session KeyTypeValue
    JCLSEOURLSystem.String 
    JCLSEOURLWQSSystem.String 
    JCLSEOURLQSSystem.String 
    JuiceControlCustIdSystem.Int32290
    MlJclLanguageSystem.Int3238

    Application State

    Application KeyTypeValue

    Request Cookies Collection

    NameValueSize

    Response Cookies Collection

    NameValueSize
    ASP.NET_SessionIdnz2fcstmnv2wxkvz2wql1gab42

    Headers Collection

    NameValue
    Connectionclose
    Content-Length0
    Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encodingbr,gzip
    Accept-Languageen-US,en;q=0.5
    Hostconfigurator-dtm-cando.happygeeks.dev
    If-Modified-SinceMon, 27 Sep 2021 18:30:47 GMT
    User-AgentCCBot/2.0 (https://commoncrawl.org/faq/)
    X-Forwarded-Protohttp
    X-Forwarded-For18.204.2.231

    Response Headers Collection

    NameValue
    Set-CookieASP.NET_SessionId=nz2fcstmnv2wxkvz2wql1gab; path=/; secure; HttpOnly; SameSite=Lax
    Cache-Controlprivate
    Content-Typetext/html

    Form Collection

    NameValue

    Querystring Collection

    NameValue
    configuratorvoordeuren

    Server Variables

    NameValue
    ALL_HTTPHTTP_CONNECTION:close HTTP_CONTENT_LENGTH:0 HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_ENCODING:br,gzip HTTP_ACCEPT_LANGUAGE:en-US,en;q=0.5 HTTP_HOST:configurator-dtm-cando.happygeeks.dev HTTP_IF_MODIFIED_SINCE:Mon, 27 Sep 2021 18:30:47 GMT HTTP_USER_AGENT:CCBot/2.0 (https://commoncrawl.org/faq/) HTTP_X_FORWARDED_PROTO:http HTTP_X_FORWARDED_FOR:18.204.2.231
    ALL_RAWConnection: close Content-Length: 0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: br,gzip Accept-Language: en-US,en;q=0.5 Host: configurator-dtm-cando.happygeeks.dev If-Modified-Since: Mon, 27 Sep 2021 18:30:47 GMT User-Agent: CCBot/2.0 (https://commoncrawl.org/faq/) X-Forwarded-Proto: http X-Forwarded-For: 18.204.2.231
    APPL_MD_PATH/LM/W3SVC/22/ROOT
    APPL_PHYSICAL_PATHC:\inetpub\wwwroot\configurator-cando - LIVE\
    AUTH_TYPE 
    AUTH_USER 
    AUTH_PASSWORD 
    LOGON_USER 
    REMOTE_USER 
    CERT_COOKIE 
    CERT_FLAGS 
    CERT_ISSUER 
    CERT_KEYSIZE 
    CERT_SECRETKEYSIZE 
    CERT_SERIALNUMBER 
    CERT_SERVER_ISSUER 
    CERT_SERVER_SUBJECT 
    CERT_SUBJECT 
    CONTENT_LENGTH0
    CONTENT_TYPE 
    GATEWAY_INTERFACECGI/1.1
    HTTPSoff
    HTTPS_KEYSIZE 
    HTTPS_SECRETKEYSIZE 
    HTTPS_SERVER_ISSUER 
    HTTPS_SERVER_SUBJECT 
    INSTANCE_ID22
    INSTANCE_META_PATH/LM/W3SVC/22
    LOCAL_ADDR136.144.214.155
    PATH_INFO/homepage.aspx
    PATH_TRANSLATEDC:\inetpub\wwwroot\configurator-cando - LIVE\homepage.aspx
    QUERY_STRINGconfigurator=voordeuren
    REMOTE_ADDR136.144.151.255
    REMOTE_HOST136.144.151.255
    REMOTE_PORT45148
    REQUEST_METHODGET
    SCRIPT_NAME/homepage.aspx
    SERVER_NAMEconfigurator-dtm-cando.happygeeks.dev
    SERVER_PORT80
    SERVER_PORT_SECURE0
    SERVER_PROTOCOLHTTP/1.1
    SERVER_SOFTWAREMicrosoft-IIS/10.0
    URL/homepage.aspx
    HTTP_CONNECTIONclose
    HTTP_CONTENT_LENGTH0
    HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_ENCODINGbr,gzip
    HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
    HTTP_HOSTconfigurator-dtm-cando.happygeeks.dev
    HTTP_IF_MODIFIED_SINCEMon, 27 Sep 2021 18:30:47 GMT
    HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
    HTTP_X_FORWARDED_PROTOhttp
    HTTP_X_FORWARDED_FOR18.204.2.231

    Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0