static function getOrderDetailsText($basket) { $text = "\n" . t("Photo") . ";" . t("Quantity") . ";" . t("Product") . ";" . t("Cost") . "\n"; foreach ($basket->contents as $basket_item) { $item = $basket_item->getItem(); $prod = ORM::factory("bp_product", $basket_item->product); $text .= $item->title . "; " . $basket_item->quantity . "; " . $prod->description . "; " . basket_plus::formatMoneyForMail($basket_item->quantity * $prod->cost) . "\n"; return $text; } }