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

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:3zvkis3oca5bmboknqay5toqRequest Type:GET
    Time of Request:14-8-2026 11:22:29Status 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,0000540,000054
    aspx.pageBegin Init0,0000660,000012
    LoginControl_Init - isValidForThisDomain: True0,0008200,000754
    LoginControl - SetupWebsite - proceed: True, GoAnCode: , TagManagerId: 0,0013280,000508
    This is page: homepage.aspx. With masterpagefile: 0,0015040,000176
    CSS template IDs found: 0,0069500,005447
    End load CSS from Wiser...0,0069990,000049
    No general JS/CSS found with regex values0,0259530,018954
    No general JS/CSS found with regex values0,0997220,073770
    No general JS/CSS found with regex values0,0999210,000198
    JS template IDs found: 0,1000470,000126
    NO JS template inline found0,1000570,000010
    End load JS from Wiser...0,1000640,000007
    aspx.pageEnd Init0,1002920,000227
    aspx.pageBegin InitComplete0,1003130,000021
    aspx.pageEnd InitComplete0,1003220,000010
    aspx.pageBegin PreLoad0,1003360,000014
    aspx.pageEnd PreLoad0,1003470,000011
    aspx.pageBegin Load0,1003560,000008
    aspx.pageEnd Load0,1037990,003444
    aspx.pageBegin LoadComplete0,1038430,000043
    aspx.pageEnd LoadComplete0,1038490,000007
    aspx.pageBegin PreRender0,1038550,000006
    aspx.pageEnd PreRender0,1221760,018322
    aspx.pageBegin PreRenderComplete0,1222710,000095
    aspx.pageEnd PreRenderComplete0,1222920,000020
    aspx.pageBegin SaveState0,1225370,000246
    aspx.pageEnd SaveState0,1225480,000011
    aspx.pageBegin SaveStateComplete0,1225540,000006
    aspx.pageEnd SaveStateComplete0,1225600,000006
    aspx.pageBegin Render0,1225650,000006
    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,1338140,011249
    Open connection with DB0,1339590,000145
    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,2566450,122686
    RenderStep Kies uw buitendeur connected to: 2289 - mainstepnumber: 1 - stepnumber: 1 - dependentvalue: 2289 - datasource connectedid: 22890,3079310,051286
    [RenderValues] set query and/or replacements0,3106800,002749
    [RenderValues] Execute query0,3199970,009317
    query cachinghours: 2000,3203700,000373
    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,
       doorCat.isEasy AS gelaktgeleverd,
       doorCat.cando_comfort as candocomfort,
    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,
    doorCat.isolerend AS isolerend,
    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', 'Dichte deur', glass.glassType)), IF(doorCat.containsglass =0 OR  glass.glassType='Paneel' ,"Dichte deur", "")) 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.pricecando)  AS door_price,
    glass.pricecando  AS glass_price,
    REPLACE(TRUNCATE(MIN(door.pricecando) + IFNULL(glass.pricecando,0) + IFNULL(mounting_package.pricecando,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.visiblecando AS `visible`,
    glass.description_short AS `glass_description`,
       doorCat.sequence AS `orderNr`
    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.visiblecando <> 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 IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', doorCat.visiblecando, doorCat.visiblecandoBranch) <> 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.visiblecando <> 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 doorCat.sequence
    0,3204210,000051
    Open connection with DB0,3204980,000077
    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,
       doorCat.isEasy AS gelaktgeleverd,
       doorCat.cando_comfort as candocomfort,
    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,
    doorCat.isolerend AS isolerend,
    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', 'Dichte deur', glass.glassType)), IF(doorCat.containsglass =0 OR  glass.glassType='Paneel' ,"Dichte deur", "")) 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.pricecando)  AS door_price,
    glass.pricecando  AS glass_price,
    REPLACE(TRUNCATE(MIN(door.pricecando) + IFNULL(glass.pricecando,0) + IFNULL(mounting_package.pricecando,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.visiblecando AS `visible`,
    glass.description_short AS `glass_description`,
       doorCat.sequence AS `orderNr`
    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.visiblecando <> 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 IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', doorCat.visiblecando, doorCat.visiblecandoBranch) <> 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.visiblecando <> 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 doorCat.sequence
    0,6773700,356872
    [RenderValues] Do last replacements. Num items: 810,6774110,000041
    [RenderValues] replacements done2,1859331,508522
    RenderStep (values rendered) Kies uw buitendeur connected to: 2289 - mainstepnumber: 1 - stepnumber: 1 - dependentvalue: 2289 - datasource connectedid: 22892,1874230,001490
    [RenderValues] set query and/or replacements2,1926730,005250
    RenderSubStep  connected to:  - mainstepnumber: 1 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,1927360,000063
    Language 38 is a changed language from 12,1940880,001352
    Caching of languagewords in cache is starting because 'ML_38' is empty2,1941420,000055
    QUERY SYSCON START:
                   SELECT fieldname, translation
                   FROM site_languagefields
                   WHERE languageid = ?languageId
                   GROUP BY fieldname
    2,1946090,000467
    Open connection with DB2,1946340,000025
    QUERY SYSCON END:
                   SELECT fieldname, translation
                   FROM site_languagefields
                   WHERE languageid = ?languageId
                   GROUP BY fieldname
    2,2126660,018032
    0 woorden gecached voor key 'ML_38'2,2127960,000129
    Session 'MlJclLanguage' set to 382,2128440,000048
    Start replace dynamic content2,2291460,016302
    Replace dynamic content only once2,2540570,024912
    End replace dynamic content2,2541250,000068
    Filled translationcomponent from cache.2,2635180,009393
    No caching of lanuage 38. Because it is not changed within this session.2,4480840,184566
    Cache item 'ML_38' already exists, so language is not cached again2,4481610,000077
    Session 'MlJclLanguage' set to 382,4481710,000009
    Start replace dynamic content2,4495730,001402
    Replace dynamic content only once2,4525430,002970
    End replace dynamic content2,4525860,000044
    Filled translationcomponent from cache.2,4534210,000835
    Start replacing system objects2,4849140,031493
    Start replacing translation2,4875880,002674
    Start replacing objects2,4882500,000662
    Start replacing request2,4891270,000877
    Start replacing session2,5938460,104720
    Start replacing standards2,6206390,026792
    Start replacing objecs again2,6221120,001473
    [RenderValues] set query and/or replacements3,0155630,393451
    RenderSubStep  connected to:  - mainstepnumber: 1 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,0156150,000052
    No caching of lanuage 38. Because it is not changed within this session.3,0158010,000186
    Cache item 'ML_38' already exists, so language is not cached again3,0158290,000028
    Session 'MlJclLanguage' set to 383,0158430,000014
    Start replace dynamic content3,0158660,000023
    Replace dynamic content only once3,0159450,000079
    End replace dynamic content3,0159520,000006
    Filled translationcomponent from cache.3,0164620,000510
    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
                          
    3,0449800,028518
    Open connection with DB3,0451100,000130
    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
                          
    3,0818830,036774
    RenderStep Binnendraaiend connected to: binnendeuren  deurtype - mainstepnumber: 2 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: binnendeuren - deurtype3,0851060,003223
    [RenderValues] set query and/or replacements3,0851470,000041
    RenderStep (values rendered) Binnendraaiend connected to: binnendeuren  deurtype - mainstepnumber: 2 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: binnendeuren - deurtype3,0851890,000041
    [RenderValues] set query and/or replacements3,0852270,000038
    [RenderValues] Execute query3,0855450,000318
    query cachinghours: 2003,0856320,000087
    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;
    3,0856570,000025
    Open connection with DB3,0856790,000022
    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;
    3,1023650,016686
    [RenderValues] Do last replacements. Num items: 03,1024040,000039
    [RenderValues] replacements done3,1024110,000006
    RenderSubStep Kies een draairichting (binnen) connected to: draairichting - mainstepnumber: 2 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: draairichting3,1024460,000035
    No caching of lanuage 38. Because it is not changed within this session.3,1026950,000249
    Cache item 'ML_38' already exists, so language is not cached again3,1027090,000014
    Session 'MlJclLanguage' set to 383,1027200,000012
    Start replace dynamic content3,1027490,000029
    Replace dynamic content only once3,1028030,000054
    End replace dynamic content3,1028090,000006
    Filled translationcomponent from cache.3,1033540,000545
    No caching of lanuage 38. Because it is not changed within this session.3,1299790,026626
    Cache item 'ML_38' already exists, so language is not cached again3,1300410,000062
    Session 'MlJclLanguage' set to 383,1300530,000012
    Start replace dynamic content3,1300920,000040
    QUERY SYSCON START: SELECT * FROM easy_webpages WHERE id=643,1469350,016843
    Open connection with DB3,1469800,000045
    QUERY SYSCON END: SELECT * FROM easy_webpages WHERE id=643,1641510,017171
    Set SEO fields on webpage3,1642110,000060
    title: Welkom op mijn website3,1643270,000116
    metadescription: Vul hier de meta description in3,1643620,000035
    canonicalurl: 3,1643770,000015
    noindex: False3,1643960,000019
    nofollow: False3,1644100,000015
    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=3,1720210,007611
    Trying to add meta data, but no header with runat='server' was found3,1720920,000071
    Start replace dynamic content3,1721770,000085
    Replace dynamic content only once3,1723350,000158
    End replace dynamic content3,1723560,000020
    Filled translationcomponent from cache.3,1730690,000714
    Start replace dynamic content3,1757270,002658
    End replace dynamic content3,1758790,000152
    Filled translationcomponent from cache.3,1765380,000659
    End replace dynamic content3,2041960,027659
    Filled translationcomponent from cache.3,2049350,000739
    [RenderValues] set query and/or replacements3,2386580,033723
    [RenderValues] Execute query3,2391180,000460
    query cachinghours: 2003,2392800,000161
    query from cache 'JCLDC2a8ee254c5365604b0b2bdf7a6987f6c'3,2393370,000057
    QUERY SYSCON END (FROM CACHE): 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;
    3,2393750,000039
    [RenderValues] Do last replacements. Num items: 03,2393890,000013
    [RenderValues] replacements done3,2393990,000010
    RenderSubStep Kies een draairichting (binnen) connected to: draairichting - mainstepnumber: 2 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: draairichting3,2394160,000018
    No caching of lanuage 38. Because it is not changed within this session.3,2396830,000267
    Cache item 'ML_38' already exists, so language is not cached again3,2397050,000022
    Session 'MlJclLanguage' set to 383,2397130,000008
    Start replace dynamic content3,2397370,000024
    Replace dynamic content only once3,2398100,000073
    End replace dynamic content3,2398200,000010
    Filled translationcomponent from cache.3,2402790,000458
    RenderStep Bepaal de afmeting connected to: deurtype;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: deurtype;uitvoering;draairichting3,2654850,025206
    [RenderValues] set query and/or replacements3,2655380,000053
    [RenderValues] Execute query3,2661920,000654
    query cachinghours: 2003,2663090,000118
    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, 0 AS isAllInclusive
    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.visiblecando<>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.visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 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.visiblecando<>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 .visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 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.visiblecando<>0
    AND doorCat.visiblecando<>0
    ORDER BY height
    */
    3,2663370,000027
    Open connection with DB3,2663980,000061
    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, 0 AS isAllInclusive
    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.visiblecando<>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.visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 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.visiblecando<>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 .visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 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.visiblecando<>0
    AND doorCat.visiblecando<>0
    ORDER BY height
    */
    3,2848690,018471
    [RenderValues] Do last replacements. Num items: 03,2849170,000048
    [RenderValues] replacements done3,2849230,000006
    RenderStep (values rendered) Bepaal de afmeting connected to: deurtype;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: deurtype;uitvoering;draairichting3,2849530,000030
    [RenderValues] set query and/or replacements3,2850170,000064
    [RenderValues] Execute query3,2854470,000430
    query cachinghours: 2003,2855350,000088
    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.visiblecando<>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 .visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 0
    ORDER BY door.width
    3,2855630,000028
    Open connection with DB3,2856040,000041
    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.visiblecando<>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 .visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 0
    ORDER BY door.width
    3,3022130,016609
    [RenderValues] Do last replacements. Num items: 03,3023150,000102
    [RenderValues] replacements done3,3023250,000010
    RenderSubStep Breedte connected to: hoogte;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: hoogte;uitvoering;draairichting3,3023560,000031
    No caching of lanuage 38. Because it is not changed within this session.3,3026330,000277
    Cache item 'ML_38' already exists, so language is not cached again3,3026500,000017
    Session 'MlJclLanguage' set to 383,3026590,000009
    Start replace dynamic content3,3026900,000030
    Replace dynamic content only once3,3027550,000065
    End replace dynamic content3,3027610,000007
    Filled translationcomponent from cache.3,3032040,000443
    No caching of lanuage 38. Because it is not changed within this session.3,3310670,027862
    Cache item 'ML_38' already exists, so language is not cached again3,3311400,000073
    Session 'MlJclLanguage' set to 383,3311540,000014
    Start replace dynamic content3,3311960,000042
    Replace dynamic content only once3,3313090,000113
    End replace dynamic content3,3313220,000013
    Filled translationcomponent from cache.3,3319330,000611
    [RenderValues] set query and/or replacements3,3584270,026494
    [RenderValues] Execute query3,3589040,000477
    query cachinghours: 2003,3589820,000079
    query from cache 'JCLDCc39abe028994805ccd6c94d8c410e1d9'3,3589930,000011
    QUERY SYSCON END (FROM CACHE): 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.visiblecando<>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 .visiblecando<>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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', door.visiblecando, door.visiblecandoBranch) <> 0
    ORDER BY door.width
    3,3590070,000014
    [RenderValues] Do last replacements. Num items: 03,3590180,000011
    [RenderValues] replacements done3,3590240,000006
    RenderSubStep Breedte connected to: hoogte;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: hoogte;uitvoering;draairichting3,3590350,000011
    No caching of lanuage 38. Because it is not changed within this session.3,3592800,000245
    Cache item 'ML_38' already exists, so language is not cached again3,3592990,000019
    Session 'MlJclLanguage' set to 383,3593080,000010
    Start replace dynamic content3,3593340,000025
    Replace dynamic content only once3,3594080,000075
    End replace dynamic content3,3594190,000010
    Filled translationcomponent from cache.3,3598580,000440
    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
                          
    3,3851140,025256
    Open connection with DB3,3852720,000158
    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
                          
    3,4156330,030361
    RenderStep Draairaamset connected to: deurtype;draairichting;draairichtingsub;hoogte;breedte - mainstepnumber: 3 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: deurtype;draairichting;draairichtingsub;hoogte;breedte3,4175100,001877
    [RenderValues] set query and/or replacements3,4175430,000033
    [RenderValues] Execute query3,4179320,000390
    query cachinghours: 2003,4180110,000079
    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.visiblecando, product.visiblecandoBranch) <> 0
    3,4180330,000021
    Open connection with DB3,4180810,000049
    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.visiblecando, product.visiblecandoBranch) <> 0
    3,4368920,018811
    [RenderValues] Do last replacements. Num items: 03,4369440,000052
    [RenderValues] replacements done3,4369530,000009
    RenderStep (values rendered) Draairaamset connected to: deurtype;draairichting;draairichtingsub;hoogte;breedte - mainstepnumber: 3 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: deurtype;draairichting;draairichtingsub;hoogte;breedte3,4369920,000039
    [RenderValues] set query and/or replacements3,4370630,000070
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,4370770,000014
    No caching of lanuage 38. Because it is not changed within this session.3,4373870,000310
    Cache item 'ML_38' already exists, so language is not cached again3,4374140,000027
    Session 'MlJclLanguage' set to 383,4374260,000012
    Start replace dynamic content3,4374480,000021
    Replace dynamic content only once3,4375100,000062
    End replace dynamic content3,4375170,000007
    Filled translationcomponent from cache.3,4379920,000476
    No caching of lanuage 38. Because it is not changed within this session.3,4746880,036696
    Cache item 'ML_38' already exists, so language is not cached again3,4747680,000080
    Session 'MlJclLanguage' set to 383,4747830,000015
    Start replace dynamic content3,4748230,000041
    Replace dynamic content only once3,4749330,000110
    End replace dynamic content3,4749450,000011
    Filled translationcomponent from cache.3,4756340,000690
    [RenderValues] set query and/or replacements3,5022930,026659
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,5023610,000068
    No caching of lanuage 38. Because it is not changed within this session.3,5026240,000263
    Cache item 'ML_38' already exists, so language is not cached again3,5026750,000051
    Session 'MlJclLanguage' set to 383,5026860,000011
    Start replace dynamic content3,5027100,000024
    Replace dynamic content only once3,5028060,000096
    End replace dynamic content3,5028150,000009
    Filled translationcomponent from cache.3,5034330,000618
    RenderStep Veiligheidspakket connected to: uitvoering;draairichting;hoogte;breedte;draairaamset - mainstepnumber: 3 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte;draairaamset3,5298210,026388
    [RenderValues] set query and/or replacements3,5298830,000063
    [RenderValues] Execute query3,5304830,000599
    query cachinghours: 2003,5305760,000093
    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.pricecando, '.',','), ',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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    ORDER BY name
    3,5305950,000019
    Open connection with DB3,5306440,000049
    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.pricecando, '.',','), ',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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    ORDER BY name
    3,5544140,023770
    [RenderValues] Do last replacements. Num items: 03,5544800,000066
    [RenderValues] replacements done3,5544910,000011
    RenderStep (values rendered) Veiligheidspakket connected to: uitvoering;draairichting;hoogte;breedte;draairaamset - mainstepnumber: 3 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte;draairaamset3,5545340,000044
    [RenderValues] set query and/or replacements3,5546200,000086
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,5546360,000016
    No caching of lanuage 38. Because it is not changed within this session.3,5548970,000261
    Cache item 'ML_38' already exists, so language is not cached again3,5549210,000023
    Session 'MlJclLanguage' set to 383,5549360,000015
    Start replace dynamic content3,5549640,000028
    Replace dynamic content only once3,5550610,000097
    End replace dynamic content3,5550720,000011
    Filled translationcomponent from cache.3,5557350,000664
    No caching of lanuage 38. Because it is not changed within this session.3,5922290,036493
    Cache item 'ML_38' already exists, so language is not cached again3,5923370,000108
    Session 'MlJclLanguage' set to 383,5923510,000014
    Start replace dynamic content3,5923960,000045
    Replace dynamic content only once3,5925090,000113
    End replace dynamic content3,5925320,000023
    Filled translationcomponent from cache.3,5932000,000669
    [RenderValues] set query and/or replacements3,6263820,033182
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,6264440,000062
    No caching of lanuage 38. Because it is not changed within this session.3,6267380,000294
    Cache item 'ML_38' already exists, so language is not cached again3,6267980,000060
    Session 'MlJclLanguage' set to 383,6268110,000014
    Start replace dynamic content3,6268340,000023
    Replace dynamic content only once3,6269290,000095
    End replace dynamic content3,6269400,000011
    Filled translationcomponent from cache.3,6275940,000654
    RenderStep Driepuntssluiting (alleen bij geen veiligheidspakket) connected to: veiligheidspakket;draairaamset - mainstepnumber: 3 - stepnumber: 3 - dependentvalue: 1 - datasource connectedid: veiligheidspakket;draairaamset3,6596460,032052
    [RenderValues] set query and/or replacements3,6597030,000057
    [RenderValues] Execute query3,6603580,000655
    query cachinghours: 2003,6604590,000101
    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.visiblecando<>0
       AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ) res
    WHERE IF('{veiligheidspakketJanee}' = '', '', '{veiligheidspakketJanee}') ='Nee' AND @results
    3,6604900,000031
    Open connection with DB3,6605710,000081
    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.visiblecando<>0
       AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ) res
    WHERE IF('{veiligheidspakketJanee}' = '', '', '{veiligheidspakketJanee}') ='Nee' AND @results
    3,6827530,022182
    [RenderValues] Do last replacements. Num items: 03,6828290,000076
    [RenderValues] replacements done3,6828440,000015
    RenderStep (values rendered) Driepuntssluiting (alleen bij geen veiligheidspakket) connected to: veiligheidspakket;draairaamset - mainstepnumber: 3 - stepnumber: 3 - dependentvalue: 1 - datasource connectedid: veiligheidspakket;draairaamset3,6828900,000046
    [RenderValues] set query and/or replacements3,6829680,000078
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 3 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,6829820,000014
    No caching of lanuage 38. Because it is not changed within this session.3,6832850,000303
    Cache item 'ML_38' already exists, so language is not cached again3,6833150,000030
    Session 'MlJclLanguage' set to 383,6833300,000015
    Start replace dynamic content3,6833620,000033
    Replace dynamic content only once3,6834630,000101
    End replace dynamic content3,6834750,000012
    Filled translationcomponent from cache.3,6841070,000631
    No caching of lanuage 38. Because it is not changed within this session.3,7176740,033567
    Cache item 'ML_38' already exists, so language is not cached again3,7177570,000082
    Session 'MlJclLanguage' set to 383,7177680,000012
    Start replace dynamic content3,7178070,000039
    Replace dynamic content only once3,7179580,000151
    End replace dynamic content3,7179650,000007
    Filled translationcomponent from cache.3,7184810,000516
    [RenderValues] set query and/or replacements3,7441160,025635
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 3 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,7441670,000051
    No caching of lanuage 38. Because it is not changed within this session.3,7443680,000201
    Cache item 'ML_38' already exists, so language is not cached again3,7443930,000024
    Session 'MlJclLanguage' set to 383,7444010,000008
    Start replace dynamic content3,7444200,000020
    Replace dynamic content only once3,7445030,000083
    End replace dynamic content3,7445130,000010
    Filled translationcomponent from cache.3,7450180,000505
    RenderStep Slotgatfrezing (bij geen driepuntsluiting) nieuw connected to: uitvoering;draairichting;driepuntsluiting;veiligheidspakket - mainstepnumber: 3 - stepnumber: 4 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;driepuntsluiting;veiligheidspakket3,7700110,024994
    [RenderValues] set query and/or replacements3,7700690,000058
    [RenderValues] Execute query3,7705820,000513
    query cachinghours: 2003,7706930,000111
    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.pricecando * 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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    3,7707260,000033
    Open connection with DB3,7707870,000061
    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.pricecando * 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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    3,7909120,020125
    [RenderValues] Do last replacements. Num items: 03,7909550,000043
    [RenderValues] replacements done3,7909610,000006
    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;veiligheidspakket3,7909950,000034
    [RenderValues] set query and/or replacements3,7910510,000056
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 4 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,7910590,000008
    No caching of lanuage 38. Because it is not changed within this session.3,7912970,000238
    Cache item 'ML_38' already exists, so language is not cached again3,7913160,000019
    Session 'MlJclLanguage' set to 383,7913230,000008
    Start replace dynamic content3,7913410,000018
    Replace dynamic content only once3,7914010,000059
    End replace dynamic content3,7914070,000006
    Filled translationcomponent from cache.3,7918140,000407
    No caching of lanuage 38. Because it is not changed within this session.3,8230630,031249
    Cache item 'ML_38' already exists, so language is not cached again3,8231570,000094
    Session 'MlJclLanguage' set to 383,8231730,000016
    Start replace dynamic content3,8232220,000049
    Replace dynamic content only once3,8233440,000122
    End replace dynamic content3,8233540,000011
    Filled translationcomponent from cache.3,8240150,000661
    [RenderValues] set query and/or replacements3,8544310,030416
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 4 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,8545030,000072
    No caching of lanuage 38. Because it is not changed within this session.3,8547440,000242
    Cache item 'ML_38' already exists, so language is not cached again3,8547800,000035
    Session 'MlJclLanguage' set to 383,8547910,000011
    Start replace dynamic content3,8548170,000027
    Replace dynamic content only once3,8549150,000098
    End replace dynamic content3,8549270,000012
    Filled translationcomponent from cache.3,8556420,000715
    RenderStep Brievenbuspakket connected to: veiligheidspakket - mainstepnumber: 3 - stepnumber: 5 - dependentvalue: 1 - datasource connectedid: veiligheidspakket3,8914400,035798
    [RenderValues] set query and/or replacements3,8915060,000066
    [RenderValues] Execute query3,8921820,000676
    query cachinghours: 2003,8923700,000188
    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.pricecando, '.',','), ',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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0
    AND (@securityPackageVersion IS NULL /*OR p.version IS NULL */ OR p.version = @securityPackageVersion)
    GROUP BY p.id
    ORDER BY name
    3,8924030,000034
    Open connection with DB3,8924830,000080
    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.pricecando, '.',','), ',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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0
    AND (@securityPackageVersion IS NULL /*OR p.version IS NULL */ OR p.version = @securityPackageVersion)
    GROUP BY p.id
    ORDER BY name
    3,9186250,026142
    [RenderValues] Do last replacements. Num items: 03,9186660,000041
    [RenderValues] replacements done3,9186740,000008
    RenderStep (values rendered) Brievenbuspakket connected to: veiligheidspakket - mainstepnumber: 3 - stepnumber: 5 - dependentvalue: 1 - datasource connectedid: veiligheidspakket3,9187030,000029
    [RenderValues] set query and/or replacements3,9187510,000048
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 5 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,9187590,000008
    No caching of lanuage 38. Because it is not changed within this session.3,9189590,000200
    Cache item 'ML_38' already exists, so language is not cached again3,9189760,000017
    Session 'MlJclLanguage' set to 383,9189860,000010
    Start replace dynamic content3,9190080,000021
    Replace dynamic content only once3,9190800,000072
    End replace dynamic content3,9190900,000010
    Filled translationcomponent from cache.3,9195580,000468
    No caching of lanuage 38. Because it is not changed within this session.3,9461360,026578
    Cache item 'ML_38' already exists, so language is not cached again3,9462330,000097
    Session 'MlJclLanguage' set to 383,9462520,000019
    Start replace dynamic content3,9463070,000055
    Replace dynamic content only once3,9463860,000079
    End replace dynamic content3,9463920,000007
    Filled translationcomponent from cache.3,9468440,000452
    [RenderValues] set query and/or replacements3,9724600,025616
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 5 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,9725100,000051
    No caching of lanuage 38. Because it is not changed within this session.3,9726940,000183
    Cache item 'ML_38' already exists, so language is not cached again3,9727150,000021
    Session 'MlJclLanguage' set to 383,9727220,000008
    Start replace dynamic content3,9727420,000020
    Replace dynamic content only once3,9728160,000074
    End replace dynamic content3,9728260,000010
    Filled translationcomponent from cache.3,9733020,000476
    RenderStep Briefplaatfrezing connected to: brievenbuspakket - mainstepnumber: 3 - stepnumber: 6 - dependentvalue: 1 - datasource connectedid: brievenbuspakket3,9962830,022981
    [RenderValues] set query and/or replacements3,9963400,000057
    [RenderValues] Execute query3,9968410,000501
    query cachinghours: 2003,9969250,000084
    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.pricecando * 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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    3,9969600,000035
    Open connection with DB3,9970240,000064
    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.pricecando * 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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    4,0159880,018965
    [RenderValues] Do last replacements. Num items: 04,0160450,000057
    [RenderValues] replacements done4,0160560,000011
    RenderStep (values rendered) Briefplaatfrezing connected to: brievenbuspakket - mainstepnumber: 3 - stepnumber: 6 - dependentvalue: 1 - datasource connectedid: brievenbuspakket4,0161240,000068
    [RenderValues] set query and/or replacements4,0161900,000067
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 6 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,0162170,000027
    No caching of lanuage 38. Because it is not changed within this session.4,0164290,000213
    Cache item 'ML_38' already exists, so language is not cached again4,0164470,000018
    Session 'MlJclLanguage' set to 384,0164550,000008
    Start replace dynamic content4,0164780,000023
    Replace dynamic content only once4,0165410,000063
    End replace dynamic content4,0165480,000007
    Filled translationcomponent from cache.4,0170480,000501
    No caching of lanuage 38. Because it is not changed within this session.4,0442530,027205
    Cache item 'ML_38' already exists, so language is not cached again4,0443180,000065
    Session 'MlJclLanguage' set to 384,0443260,000009
    Start replace dynamic content4,0443620,000036
    Replace dynamic content only once4,0444370,000076
    End replace dynamic content4,0444440,000007
    Filled translationcomponent from cache.4,0448760,000432
    [RenderValues] set query and/or replacements4,0750840,030208
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 6 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,0751450,000062
    No caching of lanuage 38. Because it is not changed within this session.4,0754480,000303
    Cache item 'ML_38' already exists, so language is not cached again4,0754850,000037
    Session 'MlJclLanguage' set to 384,0755190,000034
    Start replace dynamic content4,0755500,000031
    Replace dynamic content only once4,0756470,000097
    End replace dynamic content4,0756570,000010
    Filled translationcomponent from cache.4,0763700,000713
    RenderStep Scharnierkrozingen connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 7 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,1005640,024194
    [RenderValues] set query and/or replacements4,1006200,000056
    [RenderValues] Execute query4,1010150,000394
    query cachinghours: 2004,1010890,000075
    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.pricecando),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.visiblecando<>0
    GROUP BY p.id
    4,1011070,000018
    Open connection with DB4,1011480,000041
    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.pricecando),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.visiblecando<>0
    GROUP BY p.id
    4,1194930,018345
    [RenderValues] Do last replacements. Num items: 04,1195340,000041
    [RenderValues] replacements done4,1195400,000006
    RenderStep (values rendered) Scharnierkrozingen connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 7 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,1195720,000032
    [RenderValues] set query and/or replacements4,1196230,000051
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 7 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,1196310,000009
    No caching of lanuage 38. Because it is not changed within this session.4,1198580,000226
    Cache item 'ML_38' already exists, so language is not cached again4,1198790,000022
    Session 'MlJclLanguage' set to 384,1198880,000009
    Start replace dynamic content4,1199070,000019
    Replace dynamic content only once4,1199700,000063
    End replace dynamic content4,1199760,000006
    Filled translationcomponent from cache.4,1204940,000518
    No caching of lanuage 38. Because it is not changed within this session.4,1472920,026798
    Cache item 'ML_38' already exists, so language is not cached again4,1473580,000066
    Session 'MlJclLanguage' set to 384,1473670,000009
    Start replace dynamic content4,1474020,000035
    Replace dynamic content only once4,1474760,000075
    End replace dynamic content4,1474830,000007
    Filled translationcomponent from cache.4,1479390,000456
    [RenderValues] set query and/or replacements4,1725320,024594
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 7 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,1725910,000058
    No caching of lanuage 38. Because it is not changed within this session.4,1727730,000182
    Cache item 'ML_38' already exists, so language is not cached again4,1727940,000021
    Session 'MlJclLanguage' set to 384,1728010,000008
    Start replace dynamic content4,1728350,000034
    Replace dynamic content only once4,1729050,000070
    End replace dynamic content4,1729120,000007
    Filled translationcomponent from cache.4,1733440,000433
    RenderStep Accessoires connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 8 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,1959480,022603
    [RenderValues] set query and/or replacements4,1960120,000065
    [RenderValues] Execute query4,1965470,000535
    query cachinghours: 2004,1966270,000079
    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.pricecando), p.pricecando) * 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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    4,1966470,000020
    Open connection with DB4,1967340,000088
    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.pricecando), p.pricecando) * 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.visiblecando<>0
    AND IF('{branch}' LIKE '{%}' OR '{branch}' = '', p.visiblecando, p.visiblecandoBranch) <> 0

    GROUP BY p.id
    ORDER BY product_name
    4,2172220,020487
    [RenderValues] Do last replacements. Num items: 04,2173080,000086
    [RenderValues] replacements done4,2173140,000006
    RenderStep (values rendered) Accessoires connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 8 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,2173460,000032
    [RenderValues] set query and/or replacements4,2174020,000057
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 8 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,2174140,000012
    No caching of lanuage 38. Because it is not changed within this session.4,2176270,000213
    Cache item 'ML_38' already exists, so language is not cached again4,2176430,000016
    Session 'MlJclLanguage' set to 384,2176560,000013
    Start replace dynamic content4,2176840,000028
    Replace dynamic content only once4,2177560,000072
    End replace dynamic content4,2177630,000007
    Filled translationcomponent from cache.4,2183620,000599
    No caching of lanuage 38. Because it is not changed within this session.4,2439280,025565
    Cache item 'ML_38' already exists, so language is not cached again4,2439890,000062
    Session 'MlJclLanguage' set to 384,2439970,000008
    Start replace dynamic content4,2440270,000030
    Replace dynamic content only once4,2441020,000075
    End replace dynamic content4,2441090,000007
    Filled translationcomponent from cache.4,2445840,000476
    [RenderValues] set query and/or replacements4,2698170,025233
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 8 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,2698860,000068
    No caching of lanuage 38. Because it is not changed within this session.4,2701290,000243
    Cache item 'ML_38' already exists, so language is not cached again4,2701660,000038
    Session 'MlJclLanguage' set to 384,2701790,000012
    Start replace dynamic content4,2702220,000044
    Replace dynamic content only once4,2703290,000106
    End replace dynamic content4,2703370,000008
    Filled translationcomponent from cache.4,2707830,000446
    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
                          
    4,2941730,023390
    Open connection with DB4,2943570,000184
    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
                          
    4,3235200,029163
    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
                          
    4,3246400,001121
    Open connection with DB4,3247700,000130
    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
                          
    4,3556670,030897
    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
                          
    4,3571160,001449
    Open connection with DB4,3573230,000208
    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
                          
    4,4025870,045264
    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
                          
    4,4062190,003632
    Open connection with DB4,4064230,000204
    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
                          
    4,4359710,029548
    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
                          
    4,4391580,003187
    Open connection with DB4,4393930,000235
    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
                          
    4,4698100,030417
    No caching of lanuage 38. Because it is not changed within this session.4,4715300,001721
    Cache item 'ML_38' already exists, so language is not cached again4,4715740,000043
    Session 'MlJclLanguage' set to 384,4715870,000013
    Start replace dynamic content4,4728670,001280
    Replace dynamic content only once4,4758540,002987
    End replace dynamic content4,4758870,000033
    Filled translationcomponent from cache.4,4765810,000695
    Start replacing system objects4,5225890,046007
    Start replacing translation4,5354790,012891
    Start replacing objects4,5362430,000764
    Start replacing request4,5371190,000877
    Start replacing session4,7503410,213222
    Start replacing standards4,7692120,018871
    Start replacing objecs again4,7707670,001555
    aspx.pageEnd Render4,7954860,024719

    Control Tree

    Control UniqueIDTypeRender Size Bytes (including children)ViewState Size Bytes (excluding children)ControlState Size Bytes (excluding children)
    __PageASP.homepage_aspx25268800
        ctl00System.Web.UI.HtmlControls.HtmlHead77400
            ctl01System.Web.UI.HtmlControls.HtmlMeta2400
            ctl02System.Web.UI.HtmlControls.HtmlMeta7000
            ctl03System.Web.UI.HtmlControls.HtmlMeta4500
            LiteralTagmanagerCodeSystem.Web.UI.WebControls.Literal6000
            ctl09System.Web.UI.LiteralControl8200
            ctl04System.Web.UI.HtmlControls.HtmlTitle5100
            ctl05System.Web.UI.HtmlControls.HtmlGenericControl6800
            ctl06System.Web.UI.HtmlControls.HtmlGenericControl13000
                ctl10System.Web.UI.LiteralControl11300
            ctl07System.Web.UI.HtmlControls.HtmlLink11500
            ctl08System.Web.UI.HtmlControls.HtmlGenericControl11600
        LoginCJuiceControlLibrary.LoginControl2400

    Session State

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

    Application State

    Application KeyTypeValue

    Request Cookies Collection

    NameValueSize
    ASP.NET_SessionId3zvkis3oca5bmboknqay5toq42

    Response Cookies Collection

    NameValueSize
    CurrentDomainhubo.cando.eu27

    Headers Collection

    NameValue
    Connectionclose
    Content-Length0
    Accept*/*
    Accept-Encodinggzip, br, zstd, deflate
    CookieASP.NET_SessionId=3zvkis3oca5bmboknqay5toq
    Hosthubo.cando.eu
    User-AgentMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

    Response Headers Collection

    NameValue
    Cache-Controlprivate
    Content-Typetext/html

    Form Collection

    NameValue

    Querystring Collection

    NameValue
    configuratorvoordeuren
    typevoordeuren

    Server Variables

    NameValue
    ALL_HTTPHTTP_CONNECTION:close HTTP_CONTENT_LENGTH:0 HTTP_ACCEPT:*/* HTTP_ACCEPT_ENCODING:gzip, br, zstd, deflate HTTP_COOKIE:ASP.NET_SessionId=3zvkis3oca5bmboknqay5toq HTTP_HOST:hubo.cando.eu HTTP_USER_AGENT:Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
    ALL_RAWConnection: close Content-Length: 0 Accept: */* Accept-Encoding: gzip, br, zstd, deflate Cookie: ASP.NET_SessionId=3zvkis3oca5bmboknqay5toq Host: hubo.cando.eu User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
    APPL_MD_PATH/LM/W3SVC/1/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_KEYSIZE256
    CERT_SECRETKEYSIZE2048
    CERT_SERIALNUMBER 
    CERT_SERVER_ISSUERC=NL, O=Trust Provider B.V., CN=Trust Provider B.V. TLS RSA EV CA G2
    CERT_SERVER_SUBJECTC=NL, L=Gorinchem, O=Deli Home Products B.V., CN=*.cando.eu
    CERT_SUBJECT 
    CONTENT_LENGTH0
    CONTENT_TYPE 
    GATEWAY_INTERFACECGI/1.1
    HTTPSon
    HTTPS_KEYSIZE256
    HTTPS_SECRETKEYSIZE2048
    HTTPS_SERVER_ISSUERC=NL, O=Trust Provider B.V., CN=Trust Provider B.V. TLS RSA EV CA G2
    HTTPS_SERVER_SUBJECTC=NL, L=Gorinchem, O=Deli Home Products B.V., CN=*.cando.eu
    INSTANCE_ID1
    INSTANCE_META_PATH/LM/W3SVC/1
    LOCAL_ADDR136.144.214.154
    PATH_INFO/homepage.aspx
    PATH_TRANSLATEDC:\inetpub\wwwroot\configurator-cando - LIVE\homepage.aspx
    QUERY_STRINGconfigurator=voordeuren&type=voordeuren
    REMOTE_ADDR89.41.168.6
    REMOTE_HOST89.41.168.6
    REMOTE_PORT52116
    REQUEST_METHODGET
    SCRIPT_NAME/homepage.aspx
    SERVER_NAMEhubo.cando.eu
    SERVER_PORT443
    SERVER_PORT_SECURE1
    SERVER_PROTOCOLHTTP/1.1
    SERVER_SOFTWAREMicrosoft-IIS/10.0
    URL/homepage.aspx
    HTTP_CONNECTIONclose
    HTTP_CONTENT_LENGTH0
    HTTP_ACCEPT*/*
    HTTP_ACCEPT_ENCODINGgzip, br, zstd, deflate
    HTTP_COOKIEASP.NET_SessionId=3zvkis3oca5bmboknqay5toq
    HTTP_HOSThubo.cando.eu
    HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

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