mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
45 lines
1.7 KiB
HTML
45 lines
1.7 KiB
HTML
<h1 style="margin-left:120px;">__LIST_PRODUCTS___</h1>
|
|
<h2 style="margin-left:120px;">Lorem, ipsum dolor sit amet consectetur adipisicing elitsit amet consectetur adipisicing </h2>
|
|
|
|
<div style="font-family: Arial, sans-serif; background-color: #f7f7f7; padding: 16px; max-width: 600px; margin: 0 auto; box-sizing: border-box;">
|
|
|
|
<!-- PHP_START -->
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
|
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
|
|
|
$user = new User($db);
|
|
$product = new Product($db);
|
|
$products = $product->getProductsToPreviewInEmail(4);
|
|
|
|
|
|
if (empty($products)){
|
|
print '<p>No Products</p>';
|
|
}else {
|
|
foreach($products as $product){
|
|
if ($i % 2 == 0) {
|
|
print '<div style="display: flex; justify-content: space-between; margin-bottom: 20px;">';
|
|
}
|
|
|
|
print '<div style="flex: 1; padding-right: 10px;">
|
|
|
|
<div>
|
|
<img alt="Gray rectangle" style="margin-left: 120px; margin-top: 30px;" width="350px" height="100px" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=produit&file='.$product['ref'].'/'.$product['filename'].'" />
|
|
</div>
|
|
<div style="margin-left: 120px; background-color: #e0e0e0; padding: 8px; margin-bottom: 8px; text-indent: 50px;">
|
|
<h3>'.$product["ref"].'</h3>
|
|
<p>'.$product["description"].'</p>
|
|
</div>
|
|
</div>';
|
|
|
|
if ($i % 2 == 1 || $i == $num - 1) {
|
|
print '</div>';
|
|
}
|
|
|
|
$i++;
|
|
}
|
|
}
|
|
<!-- PHP_END -->
|
|
</div>
|
|
</div>
|