26 $sFields = $oOrderFile->getSelectFields();
27 $sShopId = $this->
getConfig()->getShopId();
29 $oOrderFile->addFieldName(
'oxorderfiles__oxarticletitle');
30 $oOrderFile->addFieldName(
'oxorderfiles__oxarticleartnum');
31 $oOrderFile->addFieldName(
'oxorderfiles__oxordernr');
32 $oOrderFile->addFieldName(
'oxorderfiles__oxorderdate');
34 $sSql =
"SELECT " . $sFields .
" ,
35 `oxorderarticles`.`oxtitle` AS `oxorderfiles__oxarticletitle`,
36 `oxorderarticles`.`oxartnum` AS `oxorderfiles__oxarticleartnum`,
37 `oxfiles`.`oxpurchasedonly` AS `oxorderfiles__oxpurchasedonly`,
38 `oxorder`.`oxordernr` AS `oxorderfiles__oxordernr`,
39 `oxorder`.`oxorderdate` AS `oxorderfiles__oxorderdate`,
40 IF( `oxorder`.`oxpaid` != '0000-00-00 00:00:00', 1, 0 ) AS `oxorderfiles__oxispaid`
42 LEFT JOIN `oxorderarticles` ON `oxorderarticles`.`oxid` = `oxorderfiles`.`oxorderarticleid`
43 LEFT JOIN `oxfiles` ON `oxfiles`.`oxid` = `oxorderfiles`.`oxfileid`
44 LEFT JOIN `oxorder` ON `oxorder`.`oxid` = `oxorderfiles`.`oxorderid`
45 WHERE `oxorder`.`oxuserid` = '". $sUserId .
"'
46 AND `oxorderfiles`.`oxshopid` = '". $sShopId .
"'
47 AND `oxorder`.`oxstorno` = 0
48 AND `oxorderarticles`.`oxstorno` = 0
49 ORDER BY `oxorder`.`oxordernr`";
64 $sFields = $oOrderFile->getSelectFields();
65 $sShopId = $this->
getConfig()->getShopId();
67 $oOrderFile->addFieldName(
'oxorderfiles__oxarticletitle');
68 $oOrderFile->addFieldName(
'oxorderfiles__oxarticleartnum');
70 $sSql =
"SELECT " . $sFields .
" ,
71 `oxorderarticles`.`oxtitle` AS `oxorderfiles__oxarticletitle`,
72 `oxorderarticles`.`oxartnum` AS `oxorderfiles__oxarticleartnum`,
73 `oxfiles`.`oxpurchasedonly` AS `oxorderfiles__oxpurchasedonly`
75 LEFT JOIN `oxorderarticles` ON `oxorderarticles`.`oxid` = `oxorderfiles`.`oxorderarticleid`
76 LEFT JOIN `oxfiles` ON `oxfiles`.`oxid` = `oxorderfiles`.`oxfileid`
77 WHERE `oxorderfiles`.`oxorderid` = '". $sOrderId .
"' AND `oxorderfiles`.`oxshopid` = '". $sShopId .
"'
78 AND `oxorderarticles`.`oxstorno` = 0";