FUNCTION 10366835_compl.ss12_pl_calculateProductPriceForUser does not exist
SELECT SQL_CALC_FOUND_ROWS `products`.*, `promoted`.`iPromotedMin`, `producers`.`sName` AS `prodsName`, `producers`.`sLogoUrl` AS `prodsLogoUrl`, `products`.`TiAvailable` AS `iAvailable`, `products`.`fPrice` AS `fCatalogPrice`, `vat`.`fVatValue`, ss12_pl_calculateProductPriceForUser( NULL, `products`.`iProduct`, 1 ) AS `fPrice`, LEAST( `products`.`TiCanBuy`, ss12_pl_getProductCanBuyForUser ( NULL, `products`.`iProduct` ) ) AS `iCanBuy`, `products`.`TiVariantsCount` AS `iVariantCount`, ss12_pl_getProductVisiblePriceForUser ( NULL, `products`.`iProduct` ) AS `iVisiblePrice`, `files`.`sFileName`, `files`.`sDescription`, `files_pol`.`sFileName` `sFileNamePol`, `files_pol`.`sDescription` `sDescriptionPol`, `files_mie`.`sFileName` `sFileNameMie`, `files_mie`.`sDescription` `sDescriptionMie` FROM `ss12_pl_products` AS `products` INNER JOIN ( SELECT DISTINCT `iProduct` FROM `ss12_pl_products_pages` WHERE `iPage` IN ( 111 ) ) AS `pp` USING( `iProduct` ) LEFT JOIN ( SELECT MIN( `iPromoted` ) `iPromotedMin`, `iProduct` FROM `ss12_pl_products_promoted` GROUP BY `iProduct` ) `promoted` USING( `iProduct` ) INNER JOIN `ss12_vat` AS `vat` USING( `iVat` ) LEFT JOIN `ss12_pl_producers` AS `producers` USING( `iProducer` ) LEFT JOIN ( SELECT DISTINCT `iProduct`, MIN( `iFile` ) AS `iFile` FROM `ss12_pl_products_files` WHERE `sFileName` LIKE '%.pdf' GROUP BY `iProduct` ) AS `pf` ON( `pf`.`iProduct` = `products`.`iProduct` ) LEFT JOIN `ss12_pl_products_files` AS `files` ON( `files`.`iFile` = `pf`.`iFile` ) LEFT JOIN ( SELECT DISTINCT `iProduct`, MIN( `iFile` ) AS `iFile` FROM `ss12_pl_products_files` WHERE `sFileName` LIKE '%_polozenie.jpg' OR `sFileName` LIKE '%_polozenie.png' GROUP BY `iProduct` ) AS `pf_pol` ON( `pf_pol`.`iProduct` = `products`.`iProduct` ) LEFT JOIN `ss12_pl_products_files` AS `files_pol` ON( `files_pol`.`iFile` = `pf_pol`.`iFile` ) LEFT JOIN ( SELECT DISTINCT `iProduct`, MIN( `iFile` ) AS `iFile` FROM `ss12_pl_products_files` WHERE `sFileName` LIKE '%_mieszkanie.jpg' OR `sFileName` LIKE '%_mieszkanie.png' GROUP BY `iProduct` ) AS `pf_mie` ON( `pf_mie`.`iProduct` = `products`.`iProduct` ) LEFT JOIN `ss12_pl_products_files` AS `files_mie` ON( `files_mie`.`iFile` = `pf_mie`.`iFile` ) WHERE 1 AND ss12_pl_getProductVisibleForUser ( NULL, `products`.`iProduct` ) >= 1 AND `products`.`iStatus` >= 1 ORDER BY `products`.`iPosition` ASC, `products`.`sName` ASC, `products`.`iTime` ASC LIMIT 0,60