Files
crm.twinpol.com/modules/EcmProducts/generateProductCards.php
2025-05-12 15:44:39 +00:00

12 lines
852 B
PHP
Executable File

<?php
include_once("modules/EcmProducts/productCardNew.php");
include_once("include/html2fpdf/html2fpdf.php");
$p=new HTML2FPDF("L");
$p->SetAutoPageBreak(10);
$w=$GLOBALS['db']->query("select p.id as id from ecmproducts as p inner join ecmpricebooks_ecmproducts as c on c.ecmproduct_id=p.id where p.product_active=1 and c.ecmpricebook_id='5a7c1379-a50b-3ce6-f96b-4ce4e7a9496a' and (p.product_category_name like '".$_GET['cat']."%') and p.deleted='0' and c.deleted='0' order by p.product_category_name asc,p.code asc,p.name asc");
//$w=$GLOBALS['db']->query("select id from ecmproducts where product_category_name like '".$_GET['cat']."%' and deleted='0' and product_active='1'");
while($r=$GLOBALS['db']->fetchByAssoc($w)){
$p=productCardNew($p,$r['id'],$_GET['lang']);
}
$p->Output(str_replace(" ","_",$_GET['cat'])."-".$_GET['lang'].".pdf","D");
?>