static function getOrderLinesHtml($basket) { // TODO make heading labels configurable $website = basket_plus::getBasketVar(WEBSITE); $website_url = "http://" . $website; // $max_thumb_size = 60; // WORKAROUND: the inline images (created by function prepareHtml) in the mail aren't displayed correctly. Size '1' makes them invisible in the table. $max_thumb_size = 1; $body_details = "\t\t\t\t\t<table width="100%">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th style="text-align:left;">" . t("Photo") . "</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th style="text-align:left;">" . t("Product") . "</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th style="text-align:right;">" . t("Quantity") . "</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th style="text-align:right;">" . t("Price") . "</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>"; // loop through all basket items // create a row for each item with thumbnail, product description, quantity and cost foreach ($basket->contents as $basket_item) { $item = $basket_item->getItem(); $prod = ORM::factory("bp_product", $basket_item->product); // get real item cost $prod_cost = $basket_item->product_cost; $body_details .= "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width="20%" style="text-align:left;">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id="basketThumb">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . basket_plus::thumb_img_abs(array("style" => "display:none;"), $max_thumb_size, false, $item, $website_url) . " " . $item->title . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width="55%" style="text-align:left;">" . $prod->description . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width="10%" style="text-align:right;">" . $basket_item->quantity . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style="text-align:right;">" . basket_plus::formatMoneyForWeb($prod_cost) . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>"; } // close the table $body_details .= "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>"; return $body_details; }