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:e5wvybqhwu2attkojp20guohRequest Type:GET
    Time of Request:28-4-2026 14:05:00Status 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,0000520,000052
    aspx.pageBegin Init0,0000620,000010
    LoginControl_Init - isValidForThisDomain: True0,0006840,000623
    LoginControl - SetupWebsite - proceed: True, GoAnCode: , TagManagerId: 0,0010970,000412
    This is page: homepage.aspx. With masterpagefile: 0,0013610,000265
    CSS template IDs found: 0,0017140,000352
    End load CSS from Wiser...0,0017240,000010
    JS template IDs found: 0,0023220,000598
    NO JS template inline found0,0023350,000013
    End load JS from Wiser...0,0023410,000006
    aspx.pageEnd Init0,0023840,000042
    aspx.pageBegin InitComplete0,0024120,000028
    aspx.pageEnd InitComplete0,0024180,000006
    aspx.pageBegin PreLoad0,0024230,000006
    aspx.pageEnd PreLoad0,0024460,000022
    aspx.pageBegin Load0,0024520,000006
    aspx.pageEnd Load0,0024920,000040
    aspx.pageBegin LoadComplete0,0024990,000007
    aspx.pageEnd LoadComplete0,0025040,000006
    aspx.pageBegin PreRender0,0025330,000029
    aspx.pageEnd PreRender0,0027760,000243
    aspx.pageBegin PreRenderComplete0,0027910,000016
    aspx.pageEnd PreRenderComplete0,0028000,000008
    aspx.pageBegin SaveState0,0029990,000199
    aspx.pageEnd SaveState0,0030050,000006
    aspx.pageBegin SaveStateComplete0,0030110,000005
    aspx.pageEnd SaveStateComplete0,0030160,000006
    aspx.pageBegin Render0,0030220,000005
    QUERY SYSCON START:
                           SELECT
                               #SUMMARY
                               IFNULL(configvalues_duplicate.summary_template,configvalues.summary_template) AS summary_template
                               ,IFNULL(configvalues_duplicate.summary_mainstep_template,configvalues.summary_mainstep_template) AS summary_mainstep_template
                               ,IFNULL(configvalues_duplicate.summary_step_template,configvalues.summary_step_template) AS summary_step_template

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

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

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

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

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

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

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

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

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

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

                           LEFT JOIN easy_items steps ON steps.moduleid=320 AND steps.`level`=3 AND steps.parent_id=mainsteps.id AND steps.published=1
                           LEFT JOIN `easy_configuratorsetup` stepvalues ON stepvalues.itemid = steps.id
                           LEFT JOIN `easy_configuratorsetup` stepvalues_duplicate ON stepvalues_duplicate.itemid=stepvalues.duplicatelayoutfrom
                           LEFT JOIN easy_items substeps ON substeps.moduleid=320 AND substeps.`level`=4 AND substeps.parent_id=steps.id AND substeps.published=1
                           LEFT JOIN `easy_configuratorsetup` substepvalues ON substepvalues.itemid = substeps.id
                           LEFT JOIN `easy_configuratorsetup` substepvalues_duplicate ON substepvalues_duplicate.itemid=substepvalues.duplicatelayoutfrom
                           WHERE
                           configurator.moduleid=320 AND
                           configurator.`level`=1 AND
                           configurator.`name`=?name
                           ORDER BY mainsteps.volgnr,steps.volgnr
                          
    0,0133720,010350
    Open connection with DB0,0135330,000162
    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,4182190,404686
    RenderStep Kies uw buitendeur connected to: 2289 - mainstepnumber: 1 - stepnumber: 1 - dependentvalue: 2289 - datasource connectedid: 22890,4696690,051449
    [RenderValues] set query and/or replacements0,4719520,002283
    [RenderValues] Execute query0,4823160,010364
    query cachinghours: 2000,4826650,000350
    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,4827210,000056
    Open connection with DB0,4827890,000068
    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
    1,1244690,641680
    [RenderValues] Do last replacements. Num items: 811,1245180,000049
    [RenderValues] replacements done2,6615211,537002
    RenderStep (values rendered) Kies uw buitendeur connected to: 2289 - mainstepnumber: 1 - stepnumber: 1 - dependentvalue: 2289 - datasource connectedid: 22892,6625980,001078
    [RenderValues] set query and/or replacements2,6660000,003402
    RenderSubStep  connected to:  - mainstepnumber: 1 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 2,6660450,000045
    Language 38 is a changed language from 12,6682510,002206
    Caching of languagewords in cache is starting because 'ML_38' is empty2,6683150,000065
    QUERY SYSCON START:
                   SELECT fieldname, translation
                   FROM site_languagefields
                   WHERE languageid = ?languageId
                   GROUP BY fieldname
    2,6688780,000563
    Open connection with DB2,6689090,000031
    QUERY SYSCON END:
                   SELECT fieldname, translation
                   FROM site_languagefields
                   WHERE languageid = ?languageId
                   GROUP BY fieldname
    2,7897780,120868
    0 woorden gecached voor key 'ML_38'2,7899790,000202
    Session 'MlJclLanguage' set to 382,7900090,000030
    Start replace dynamic content2,7953530,005344
    Replace dynamic content only once2,7956910,000338
    End replace dynamic content2,7957080,000017
    Filled translationcomponent from cache.2,7963100,000602
    No caching of lanuage 38. Because it is not changed within this session.2,9742340,177924
    Cache item 'ML_38' already exists, so language is not cached again2,9743030,000069
    Session 'MlJclLanguage' set to 382,9743130,000009
    Start replace dynamic content2,9758400,001527
    Replace dynamic content only once2,9786090,002769
    End replace dynamic content2,9786490,000040
    Filled translationcomponent from cache.2,9794440,000795
    Start replacing system objects3,0240230,044579
    Start replacing translation3,0282210,004198
    Start replacing objects3,0294290,001208
    Start replacing request3,0311510,001722
    Start replacing session3,1626070,131457
    Start replacing standards3,1909460,028339
    Start replacing objecs again3,1941290,003183
    [RenderValues] set query and/or replacements3,6279820,433853
    RenderSubStep  connected to:  - mainstepnumber: 1 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 3,6280390,000057
    No caching of lanuage 38. Because it is not changed within this session.3,6282230,000184
    Cache item 'ML_38' already exists, so language is not cached again3,6282470,000024
    Session 'MlJclLanguage' set to 383,6282550,000008
    Start replace dynamic content3,6282740,000019
    Replace dynamic content only once3,6283400,000066
    End replace dynamic content3,6283460,000006
    Filled translationcomponent from cache.3,6287570,000411
    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,6724280,043671
    Open connection with DB3,6725780,000150
    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,7410080,068430
    RenderStep Binnendraaiend connected to: binnendeuren  deurtype - mainstepnumber: 2 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: binnendeuren - deurtype3,7446660,003659
    [RenderValues] set query and/or replacements3,7447120,000046
    RenderStep (values rendered) Binnendraaiend connected to: binnendeuren  deurtype - mainstepnumber: 2 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: binnendeuren - deurtype3,7453900,000678
    [RenderValues] set query and/or replacements3,7455000,000110
    [RenderValues] Execute query3,7457530,000252
    query cachinghours: 2003,7458170,000064
    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,7458330,000016
    Open connection with DB3,7458620,000030
    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,7664690,020607
    [RenderValues] Do last replacements. Num items: 03,7665080,000040
    [RenderValues] replacements done3,7665140,000006
    RenderSubStep Kies een draairichting (binnen) connected to: draairichting - mainstepnumber: 2 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: draairichting3,7665550,000041
    No caching of lanuage 38. Because it is not changed within this session.3,7668020,000247
    Cache item 'ML_38' already exists, so language is not cached again3,7668160,000014
    Session 'MlJclLanguage' set to 383,7668240,000008
    Start replace dynamic content3,7668750,000051
    Replace dynamic content only once3,7669490,000074
    End replace dynamic content3,7669560,000007
    Filled translationcomponent from cache.3,7676160,000659
    No caching of lanuage 38. Because it is not changed within this session.3,7955870,027971
    Cache item 'ML_38' already exists, so language is not cached again3,7956480,000061
    Session 'MlJclLanguage' set to 383,7956560,000009
    Start replace dynamic content3,7956920,000036
    QUERY SYSCON START: SELECT * FROM easy_webpages WHERE id=643,8066330,010941
    Open connection with DB3,8066700,000037
    QUERY SYSCON END: SELECT * FROM easy_webpages WHERE id=643,8258380,019168
    Set SEO fields on webpage3,8258870,000048
    title: Welkom op mijn website3,8259090,000023
    metadescription: Vul hier de meta description in3,8259220,000013
    canonicalurl: 3,8259320,000010
    noindex: False3,8259430,000012
    nofollow: False3,8259570,000014
    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,8259810,000024
    Trying to add meta data, but no header with runat='server' was found3,8259880,000006
    Start replace dynamic content3,8260530,000066
    Replace dynamic content only once3,8261410,000088
    End replace dynamic content3,8261510,000011
    Filled translationcomponent from cache.3,8265960,000445
    Start replace dynamic content3,8284510,001855
    End replace dynamic content3,8285980,000148
    Filled translationcomponent from cache.3,8290070,000409
    End replace dynamic content3,8530300,024022
    Filled translationcomponent from cache.3,8536220,000593
    [RenderValues] set query and/or replacements3,8784510,024829
    [RenderValues] Execute query3,8787880,000336
    query cachinghours: 2003,8788630,000075
    query from cache 'JCLDC2a8ee254c5365604b0b2bdf7a6987f6c'3,8788920,000030
    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,8789210,000028
    [RenderValues] Do last replacements. Num items: 03,8789440,000023
    [RenderValues] replacements done3,8789500,000006
    RenderSubStep Kies een draairichting (binnen) connected to: draairichting - mainstepnumber: 2 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: draairichting3,8789610,000012
    No caching of lanuage 38. Because it is not changed within this session.3,8791850,000224
    Cache item 'ML_38' already exists, so language is not cached again3,8792010,000016
    Session 'MlJclLanguage' set to 383,8792110,000010
    Start replace dynamic content3,8792410,000030
    Replace dynamic content only once3,8793350,000094
    End replace dynamic content3,8793490,000014
    Filled translationcomponent from cache.3,8798900,000541
    RenderStep Bepaal de afmeting connected to: deurtype;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: deurtype;uitvoering;draairichting3,9060310,026142
    [RenderValues] set query and/or replacements3,9060950,000063
    [RenderValues] Execute query3,9067620,000667
    query cachinghours: 2003,9068470,000086
    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,9068680,000021
    Open connection with DB3,9069350,000067
    QUERY SYSCON END: SET @doorChoice = IF('{deurtype}' LIKE '{%}', '0,0,0', '{deurtype}');
    SET @doorCat = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 1), ',', -1) AS UNSIGNED);
    SET @doorGlass = CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@doorChoice, ',', 2), ',', -1) AS UNSIGNED);
    SET @turnType = '{draairichting}';
    SET @implementation = IF('{uitvoering}' IN('Buitendraaiend', 'Binnendraaiend', 'schuifdeur'), 'stomp', '{uitvoering}');
    SET @implementation = IF(@implementation='opdek', CONCAT(@implementation, ' ', @turnType) , @implementation);

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


    SELECT
    DISTINCT(door.height) AS hoogte, 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,9656400,058705
    [RenderValues] Do last replacements. Num items: 03,9656890,000049
    [RenderValues] replacements done3,9656960,000008
    RenderStep (values rendered) Bepaal de afmeting connected to: deurtype;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: deurtype;uitvoering;draairichting3,9657330,000037
    [RenderValues] set query and/or replacements3,9657950,000062
    [RenderValues] Execute query3,9662620,000467
    query cachinghours: 2003,9663450,000083
    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,9663640,000019
    Open connection with DB3,9664430,000078
    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,9879160,021473
    [RenderValues] Do last replacements. Num items: 03,9879630,000047
    [RenderValues] replacements done3,9879710,000009
    RenderSubStep Breedte connected to: hoogte;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: hoogte;uitvoering;draairichting3,9880060,000035
    No caching of lanuage 38. Because it is not changed within this session.3,9883370,000332
    Cache item 'ML_38' already exists, so language is not cached again3,9883600,000023
    Session 'MlJclLanguage' set to 383,9883740,000013
    Start replace dynamic content3,9884270,000053
    Replace dynamic content only once3,9885120,000085
    End replace dynamic content3,9885230,000011
    Filled translationcomponent from cache.3,9891470,000624
    No caching of lanuage 38. Because it is not changed within this session.4,0177420,028595
    Cache item 'ML_38' already exists, so language is not cached again4,0178130,000071
    Session 'MlJclLanguage' set to 384,0178480,000035
    Start replace dynamic content4,0178880,000041
    Replace dynamic content only once4,0179840,000096
    End replace dynamic content4,0179930,000009
    Filled translationcomponent from cache.4,0185100,000518
    [RenderValues] set query and/or replacements4,0472610,028751
    [RenderValues] Execute query4,0477210,000459
    query cachinghours: 2004,0477900,000070
    query from cache 'JCLDCc39abe028994805ccd6c94d8c410e1d9'4,0478040,000013
    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
    4,0478180,000014
    [RenderValues] Do last replacements. Num items: 04,0478250,000008
    [RenderValues] replacements done4,0478310,000006
    RenderSubStep Breedte connected to: hoogte;uitvoering;draairichting - mainstepnumber: 2 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: hoogte;uitvoering;draairichting4,0478470,000016
    No caching of lanuage 38. Because it is not changed within this session.4,0480520,000206
    Cache item 'ML_38' already exists, so language is not cached again4,0480650,000012
    Session 'MlJclLanguage' set to 384,0480730,000008
    Start replace dynamic content4,0480900,000018
    Replace dynamic content only once4,0481360,000046
    End replace dynamic content4,0481420,000006
    Filled translationcomponent from cache.4,0487230,000580
    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,0720300,023308
    Open connection with DB4,0721600,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,1136610,041501
    RenderStep Draairaamset connected to: deurtype;draairichting;draairichtingsub;hoogte;breedte - mainstepnumber: 3 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: deurtype;draairichting;draairichtingsub;hoogte;breedte4,1151730,001512
    [RenderValues] set query and/or replacements4,1152050,000031
    [RenderValues] Execute query4,1155620,000357
    query cachinghours: 2004,1156270,000066
    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
    4,1156430,000016
    Open connection with DB4,1156830,000040
    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
    4,1418700,026187
    [RenderValues] Do last replacements. Num items: 04,1419190,000049
    [RenderValues] replacements done4,1419360,000017
    RenderStep (values rendered) Draairaamset connected to: deurtype;draairichting;draairichtingsub;hoogte;breedte - mainstepnumber: 3 - stepnumber: 1 - dependentvalue: 1 - datasource connectedid: deurtype;draairichting;draairichtingsub;hoogte;breedte4,1419670,000031
    [RenderValues] set query and/or replacements4,1420220,000055
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,1420330,000011
    No caching of lanuage 38. Because it is not changed within this session.4,1422610,000228
    Cache item 'ML_38' already exists, so language is not cached again4,1422910,000029
    Session 'MlJclLanguage' set to 384,1422990,000008
    Start replace dynamic content4,1423210,000022
    Replace dynamic content only once4,1423790,000057
    End replace dynamic content4,1423850,000006
    Filled translationcomponent from cache.4,1428240,000439
    No caching of lanuage 38. Because it is not changed within this session.4,1665030,023680
    Cache item 'ML_38' already exists, so language is not cached again4,1665630,000060
    Session 'MlJclLanguage' set to 384,1665750,000012
    Start replace dynamic content4,1666050,000030
    Replace dynamic content only once4,1666810,000075
    End replace dynamic content4,1666900,000009
    Filled translationcomponent from cache.4,1671170,000427
    [RenderValues] set query and/or replacements4,1889710,021855
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 1 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,1890290,000058
    No caching of lanuage 38. Because it is not changed within this session.4,1892090,000180
    Cache item 'ML_38' already exists, so language is not cached again4,1892300,000021
    Session 'MlJclLanguage' set to 384,1892410,000011
    Start replace dynamic content4,1892570,000016
    Replace dynamic content only once4,1893230,000066
    End replace dynamic content4,1893290,000006
    Filled translationcomponent from cache.4,1897640,000435
    RenderStep Veiligheidspakket connected to: uitvoering;draairichting;hoogte;breedte;draairaamset - mainstepnumber: 3 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte;draairaamset4,2130800,023316
    [RenderValues] set query and/or replacements4,2131310,000051
    [RenderValues] Execute query4,2135800,000449
    query cachinghours: 2004,2136510,000071
    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
    4,2136680,000017
    Open connection with DB4,2137160,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
    4,2447270,031011
    [RenderValues] Do last replacements. Num items: 04,2447660,000039
    [RenderValues] replacements done4,2447720,000006
    RenderStep (values rendered) Veiligheidspakket connected to: uitvoering;draairichting;hoogte;breedte;draairaamset - mainstepnumber: 3 - stepnumber: 2 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte;draairaamset4,2448010,000029
    [RenderValues] set query and/or replacements4,2448610,000060
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,2448760,000015
    No caching of lanuage 38. Because it is not changed within this session.4,2450370,000160
    Cache item 'ML_38' already exists, so language is not cached again4,2450490,000012
    Session 'MlJclLanguage' set to 384,2450570,000008
    Start replace dynamic content4,2450730,000016
    Replace dynamic content only once4,2451270,000055
    End replace dynamic content4,2451340,000006
    Filled translationcomponent from cache.4,2455990,000465
    No caching of lanuage 38. Because it is not changed within this session.4,2682900,022692
    Cache item 'ML_38' already exists, so language is not cached again4,2683670,000077
    Session 'MlJclLanguage' set to 384,2683770,000010
    Start replace dynamic content4,2684250,000048
    Replace dynamic content only once4,2685130,000088
    End replace dynamic content4,2685200,000007
    Filled translationcomponent from cache.4,2690010,000481
    [RenderValues] set query and/or replacements4,2921720,023171
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 2 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,2922210,000050
    No caching of lanuage 38. Because it is not changed within this session.4,2924590,000238
    Cache item 'ML_38' already exists, so language is not cached again4,2924840,000025
    Session 'MlJclLanguage' set to 384,2924920,000008
    Start replace dynamic content4,2925130,000021
    Replace dynamic content only once4,2926020,000089
    End replace dynamic content4,2926120,000010
    Filled translationcomponent from cache.4,2930740,000462
    RenderStep Driepuntssluiting (alleen bij geen veiligheidspakket) connected to: veiligheidspakket;draairaamset - mainstepnumber: 3 - stepnumber: 3 - dependentvalue: 1 - datasource connectedid: veiligheidspakket;draairaamset4,3177280,024654
    [RenderValues] set query and/or replacements4,3177800,000053
    [RenderValues] Execute query4,3183190,000539
    query cachinghours: 2004,3184290,000110
    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
    4,3184610,000032
    Open connection with DB4,3185180,000057
    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
    4,3617300,043213
    [RenderValues] Do last replacements. Num items: 04,3617830,000053
    [RenderValues] replacements done4,3617890,000006
    RenderStep (values rendered) Driepuntssluiting (alleen bij geen veiligheidspakket) connected to: veiligheidspakket;draairaamset - mainstepnumber: 3 - stepnumber: 3 - dependentvalue: 1 - datasource connectedid: veiligheidspakket;draairaamset4,3618150,000026
    [RenderValues] set query and/or replacements4,3618840,000069
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 3 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,3618930,000009
    No caching of lanuage 38. Because it is not changed within this session.4,3620600,000168
    Cache item 'ML_38' already exists, so language is not cached again4,3620730,000012
    Session 'MlJclLanguage' set to 384,3620810,000008
    Start replace dynamic content4,3620970,000016
    Replace dynamic content only once4,3621520,000055
    End replace dynamic content4,3621580,000006
    Filled translationcomponent from cache.4,3626670,000509
    No caching of lanuage 38. Because it is not changed within this session.4,3877520,025085
    Cache item 'ML_38' already exists, so language is not cached again4,3878240,000072
    Session 'MlJclLanguage' set to 384,3878490,000025
    Start replace dynamic content4,3878900,000041
    Replace dynamic content only once4,3879850,000095
    End replace dynamic content4,3879910,000007
    Filled translationcomponent from cache.4,3885940,000602
    [RenderValues] set query and/or replacements4,4196920,031098
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 3 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,4197550,000064
    No caching of lanuage 38. Because it is not changed within this session.4,4200490,000294
    Cache item 'ML_38' already exists, so language is not cached again4,4200890,000040
    Session 'MlJclLanguage' set to 384,4201070,000018
    Start replace dynamic content4,4201320,000026
    Replace dynamic content only once4,4202270,000094
    End replace dynamic content4,4202380,000011
    Filled translationcomponent from cache.4,4207550,000517
    RenderStep Slotgatfrezing (bij geen driepuntsluiting) nieuw connected to: uitvoering;draairichting;driepuntsluiting;veiligheidspakket - mainstepnumber: 3 - stepnumber: 4 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;driepuntsluiting;veiligheidspakket4,4544460,033692
    [RenderValues] set query and/or replacements4,4544990,000053
    [RenderValues] Execute query4,4551420,000643
    query cachinghours: 2004,4552530,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
    4,4552860,000033
    Open connection with DB4,4553610,000075
    QUERY SYSCON END: SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

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

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

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

    SELECT
    @doorId,
    IF(p.suitable_for2 LIKE '%enkel%' AND p.suitable_for2 LIKE '%dubbel%', '2x ','') AS ammountPrefix,
    IFNULL(info.html, '') AS info,
    p.id AS product_id,
       CONCAT(IF(@isDouble, ' ', ''), p.description_short) AS product_description,
    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
    4,4777860,022425
    [RenderValues] Do last replacements. Num items: 04,4778300,000043
    [RenderValues] replacements done4,4778360,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;veiligheidspakket4,4778670,000032
    [RenderValues] set query and/or replacements4,4779220,000055
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 4 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,4779300,000008
    No caching of lanuage 38. Because it is not changed within this session.4,4780990,000169
    Cache item 'ML_38' already exists, so language is not cached again4,4781140,000015
    Session 'MlJclLanguage' set to 384,4781220,000008
    Start replace dynamic content4,4781430,000021
    Replace dynamic content only once4,4782010,000058
    End replace dynamic content4,4782130,000013
    Filled translationcomponent from cache.4,4787680,000555
    No caching of lanuage 38. Because it is not changed within this session.4,5031890,024422
    Cache item 'ML_38' already exists, so language is not cached again4,5032720,000082
    Session 'MlJclLanguage' set to 384,5032840,000012
    Start replace dynamic content4,5033140,000030
    Replace dynamic content only once4,5033980,000084
    End replace dynamic content4,5034080,000010
    Filled translationcomponent from cache.4,5038330,000425
    [RenderValues] set query and/or replacements4,5303060,026474
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 4 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,5303570,000051
    No caching of lanuage 38. Because it is not changed within this session.4,5305880,000231
    Cache item 'ML_38' already exists, so language is not cached again4,5306140,000026
    Session 'MlJclLanguage' set to 384,5306210,000008
    Start replace dynamic content4,5306390,000018
    Replace dynamic content only once4,5307080,000069
    End replace dynamic content4,5307150,000007
    Filled translationcomponent from cache.4,5311520,000437
    RenderStep Brievenbuspakket connected to: veiligheidspakket - mainstepnumber: 3 - stepnumber: 5 - dependentvalue: 1 - datasource connectedid: veiligheidspakket4,5560760,024924
    [RenderValues] set query and/or replacements4,5561400,000063
    [RenderValues] Execute query4,5566160,000477
    query cachinghours: 2004,5566990,000082
    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
    4,5567310,000032
    Open connection with DB4,5567980,000067
    QUERY SYSCON END:
    SET @_doorType = '{deurtype}';
    SET @_uitvoering = '{uitvoering}';
    SET @_draairichting = '{draairichting}';
    SET @_height = IF('{height}' LIKE '{%}', '', '{height}');
    SET @_width = IF('{width}' LIKE '{%}', '', '{width}');

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

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

    # Try to match exact, if fails try to match nearest
    SET @doorId = (
    SELECT * FROM (
    SELECT p.id FROM shop_pro_cat catLnk
            JOIN shop_category cat ON cat.id=@doorCat
            JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=cat.id AND p.height = @_height AND p.width = @_width
    AND FIND_IN_SET( @implementationDirect, p.producttype)
    UNION ALL
    SELECT p.id FROM shop_pro_cat catLnk JOIN shop_products p ON p.id=catLnk.product_id AND catLnk.cat_id=@doorCat AND p.height = @_height AND p.width = @_width
    AND p.producttype LIKE @implementationTestNearest
    ) d LIMIT 1
    );
    ### 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
    4,5963670,039569
    [RenderValues] Do last replacements. Num items: 04,5964910,000124
    [RenderValues] replacements done4,5964970,000006
    RenderStep (values rendered) Brievenbuspakket connected to: veiligheidspakket - mainstepnumber: 3 - stepnumber: 5 - dependentvalue: 1 - datasource connectedid: veiligheidspakket4,5965250,000028
    [RenderValues] set query and/or replacements4,5965880,000063
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 5 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,5965970,000010
    No caching of lanuage 38. Because it is not changed within this session.4,5968080,000211
    Cache item 'ML_38' already exists, so language is not cached again4,5968300,000022
    Session 'MlJclLanguage' set to 384,5968380,000008
    Start replace dynamic content4,5968630,000024
    Replace dynamic content only once4,5969210,000058
    End replace dynamic content4,5969270,000006
    Filled translationcomponent from cache.4,5973970,000471
    No caching of lanuage 38. Because it is not changed within this session.4,6275810,030183
    Cache item 'ML_38' already exists, so language is not cached again4,6276560,000075
    Session 'MlJclLanguage' set to 384,6276680,000013
    Start replace dynamic content4,6277070,000038
    Replace dynamic content only once4,6278010,000095
    End replace dynamic content4,6278120,000010
    Filled translationcomponent from cache.4,6284190,000608
    [RenderValues] set query and/or replacements4,6554710,027052
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 5 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,6555200,000049
    No caching of lanuage 38. Because it is not changed within this session.4,6557060,000186
    Cache item 'ML_38' already exists, so language is not cached again4,6557310,000025
    Session 'MlJclLanguage' set to 384,6557400,000008
    Start replace dynamic content4,6557560,000016
    Replace dynamic content only once4,6558270,000070
    End replace dynamic content4,6558330,000006
    Filled translationcomponent from cache.4,6562420,000409
    RenderStep Briefplaatfrezing connected to: brievenbuspakket - mainstepnumber: 3 - stepnumber: 6 - dependentvalue: 1 - datasource connectedid: brievenbuspakket4,6775570,021316
    [RenderValues] set query and/or replacements4,6776080,000051
    [RenderValues] Execute query4,6780920,000485
    query cachinghours: 2004,6781770,000085
    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
    4,6782060,000029
    Open connection with DB4,6782790,000073
    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,7087910,030512
    [RenderValues] Do last replacements. Num items: 04,7088320,000041
    [RenderValues] replacements done4,7088370,000006
    RenderStep (values rendered) Briefplaatfrezing connected to: brievenbuspakket - mainstepnumber: 3 - stepnumber: 6 - dependentvalue: 1 - datasource connectedid: brievenbuspakket4,7088740,000037
    [RenderValues] set query and/or replacements4,7089320,000058
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 6 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,7089430,000011
    No caching of lanuage 38. Because it is not changed within this session.4,7091250,000182
    Cache item 'ML_38' already exists, so language is not cached again4,7091400,000015
    Session 'MlJclLanguage' set to 384,7091470,000008
    Start replace dynamic content4,7091650,000018
    Replace dynamic content only once4,7092330,000068
    End replace dynamic content4,7092440,000011
    Filled translationcomponent from cache.4,7096830,000439
    No caching of lanuage 38. Because it is not changed within this session.4,7342220,024540
    Cache item 'ML_38' already exists, so language is not cached again4,7343140,000092
    Session 'MlJclLanguage' set to 384,7343270,000013
    Start replace dynamic content4,7343780,000051
    Replace dynamic content only once4,7344940,000116
    End replace dynamic content4,7345080,000013
    Filled translationcomponent from cache.4,7350930,000585
    [RenderValues] set query and/or replacements4,7683460,033253
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 6 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,7684050,000059
    No caching of lanuage 38. Because it is not changed within this session.4,7686090,000204
    Cache item 'ML_38' already exists, so language is not cached again4,7686360,000027
    Session 'MlJclLanguage' set to 384,7686440,000008
    Start replace dynamic content4,7686620,000018
    Replace dynamic content only once4,7687310,000069
    End replace dynamic content4,7687380,000006
    Filled translationcomponent from cache.4,7692510,000513
    RenderStep Scharnierkrozingen connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 7 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,7908750,021624
    [RenderValues] set query and/or replacements4,7909270,000052
    [RenderValues] Execute query4,7913200,000393
    query cachinghours: 2004,7914060,000086
    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,7914290,000023
    Open connection with DB4,7914680,000039
    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,8193160,027847
    [RenderValues] Do last replacements. Num items: 04,8193560,000040
    [RenderValues] replacements done4,8193620,000006
    RenderStep (values rendered) Scharnierkrozingen connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 7 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,8194400,000078
    [RenderValues] set query and/or replacements4,8195070,000067
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 7 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,8195150,000008
    No caching of lanuage 38. Because it is not changed within this session.4,8197150,000200
    Cache item 'ML_38' already exists, so language is not cached again4,8197330,000018
    Session 'MlJclLanguage' set to 384,8197460,000013
    Start replace dynamic content4,8197690,000023
    Replace dynamic content only once4,8198620,000093
    End replace dynamic content4,8198680,000007
    Filled translationcomponent from cache.4,8202690,000401
    No caching of lanuage 38. Because it is not changed within this session.4,8483130,028044
    Cache item 'ML_38' already exists, so language is not cached again4,8484040,000090
    Session 'MlJclLanguage' set to 384,8484170,000013
    Start replace dynamic content4,8484540,000037
    Replace dynamic content only once4,8485510,000097
    End replace dynamic content4,8485620,000011
    Filled translationcomponent from cache.4,8490860,000524
    [RenderValues] set query and/or replacements4,8758410,026754
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 7 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,8759040,000064
    No caching of lanuage 38. Because it is not changed within this session.4,8760920,000188
    Cache item 'ML_38' already exists, so language is not cached again4,8761160,000024
    Session 'MlJclLanguage' set to 384,8761240,000008
    Start replace dynamic content4,8761410,000017
    Replace dynamic content only once4,8762110,000070
    End replace dynamic content4,8762170,000006
    Filled translationcomponent from cache.4,8767670,000549
    RenderStep Accessoires connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 8 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,9050530,028287
    [RenderValues] set query and/or replacements4,9051090,000056
    [RenderValues] Execute query4,9056370,000528
    query cachinghours: 2004,9057130,000076
    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,9057320,000019
    Open connection with DB4,9058040,000072
    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,9672610,061456
    [RenderValues] Do last replacements. Num items: 04,9673130,000052
    [RenderValues] replacements done4,9673190,000006
    RenderStep (values rendered) Accessoires connected to: uitvoering;draairichting;hoogte;breedte - mainstepnumber: 3 - stepnumber: 8 - dependentvalue: 1 - datasource connectedid: uitvoering;draairichting;hoogte;breedte4,9673610,000043
    [RenderValues] set query and/or replacements4,9674520,000091
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 8 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 4,9674620,000009
    No caching of lanuage 38. Because it is not changed within this session.4,9676650,000204
    Cache item 'ML_38' already exists, so language is not cached again4,9676890,000024
    Session 'MlJclLanguage' set to 384,9677010,000012
    Start replace dynamic content4,9677240,000023
    Replace dynamic content only once4,9678040,000080
    End replace dynamic content4,9678170,000014
    Filled translationcomponent from cache.4,9683710,000554
    No caching of lanuage 38. Because it is not changed within this session.4,9952580,026887
    Cache item 'ML_38' already exists, so language is not cached again4,9953190,000062
    Session 'MlJclLanguage' set to 384,9953280,000009
    Start replace dynamic content4,9953590,000031
    Replace dynamic content only once4,9954540,000094
    End replace dynamic content4,9954610,000007
    Filled translationcomponent from cache.4,9959520,000492
    [RenderValues] set query and/or replacements5,0360150,040063
    RenderSubStep  connected to:  - mainstepnumber: 3 - stepnumber: 8 - substepnumber: 1 - dependentvalue: 1 - datasource connectedid: 5,0360930,000078
    No caching of lanuage 38. Because it is not changed within this session.5,0363670,000274
    Cache item 'ML_38' already exists, so language is not cached again5,0364120,000045
    Session 'MlJclLanguage' set to 385,0364340,000022
    Start replace dynamic content5,0364590,000025
    Replace dynamic content only once5,0365610,000101
    End replace dynamic content5,0365710,000010
    Filled translationcomponent from cache.5,0372640,000693
    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
                          
    5,0659730,028709
    Open connection with DB5,0661130,000140
    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
                          
    5,1054850,039372
    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
                          
    5,1067160,001231
    Open connection with DB5,1068760,000161
    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
                          
    5,1503230,043446
    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
                          
    5,1519670,001644
    Open connection with DB5,1521420,000176
    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
                          
    5,1943600,042218
    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
                          
    5,1974170,003057
    Open connection with DB5,1975600,000143
    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
                          
    5,2364590,038899
    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
                          
    5,2386590,002200
    Open connection with DB5,2387870,000127
    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
                          
    5,2805350,041748
    No caching of lanuage 38. Because it is not changed within this session.5,2817950,001260
    Cache item 'ML_38' already exists, so language is not cached again5,2818430,000048
    Session 'MlJclLanguage' set to 385,2818640,000022
    Start replace dynamic content5,2829060,001042
    Replace dynamic content only once5,2849080,002002
    End replace dynamic content5,2849190,000011
    Filled translationcomponent from cache.5,2853660,000447
    Start replacing system objects5,3183460,032980
    Start replacing translation5,3262210,007875
    Start replacing objects5,3268100,000589
    Start replacing request5,3275910,000781
    Start replacing session5,5214010,193810
    Start replacing standards5,5329540,011553
    Start replacing objecs again5,5340950,001141
    aspx.pageEnd Render5,5535890,019494

    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_SessionIde5wvybqhwu2attkojp20guoh42

    Response Cookies Collection

    NameValueSize
    CurrentDomainhubo.cando.eu27

    Headers Collection

    NameValue
    Connectionclose
    Content-Length0
    Accept*/*
    Accept-Encodinggzip, br, zstd, deflate
    CookieASP.NET_SessionId=e5wvybqhwu2attkojp20guoh
    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=e5wvybqhwu2attkojp20guoh 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=e5wvybqhwu2attkojp20guoh 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_PORT50830
    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=e5wvybqhwu2attkojp20guoh
    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