/** * Returns html string of popup * @param YousticeShopOrder $order class with attached data */ public function getOrderDetailHtml(YousticeShopOrder $order) { if (!trim($this->api_key)) { return ''; } if (!$this->is_properly_installed) { return ''; } $products = $order->getProducts(); $product_codes = array(); foreach ($products as $product) { $product_codes[] = $product->getCode(); } $report = $this->local->getOrderReport($order->getCode(), $product_codes); $order_detail = new YousticeWidgetsOrderDetail($order, $report, $this); return $order_detail->toString(); }