function Header()
 {
     //Logo
     $logo = toC_Logo_Upload::getOriginalLogo();
     //verify whether the default logo is existed when the template logo isn't uploded yet
     if ($logo === false) {
         if (file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.jpg')) {
             $logo = DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.jpg';
         } else {
             if (file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.png')) {
                 $logo = DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.png';
             }
         }
     }
     $this->Image($logo, TOC_PDF_LOGO_UPPER_LEFT_CORNER_X, TOC_PDF_LOGO_UPPER_LEFT_CORNER_Y, TOC_PDF_LOGO_WIDTH, TOC_PDF_LOGO_HEIGHT);
     //Line
     $this->line(10, 45, 98, 45);
     //Customer Information
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_HEADER_BILLING_INFO_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y);
     $this->MultiCell(100, 4, $this->_customer_info['name'] . "\n" . $this->_customer_info['street_address'] . " " . $this->_customer_info['suburb'] . "\n" . $this->_customer_info['postcode'] . " " . $this->_customer_info['city'] . "\n" . $this->_customer_info['country_title'] . "\n" . $this->_customer_info['email_address'], 0, 'L');
     //Store Information
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_HEADER_STORE_ADDRESS_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_STORE_ADDRESS_Y);
     $this->Cell(100);
     $this->MultiCell(80, 4, STORE_NAME_ADDRESS, 0, 'R');
 }
示例#2
0
 function Header()
 {
     //Logo
     $logo = toC_Logo_Upload::getOriginalLogo();
     //verify whether the default logo is existed when the template logo isn't uploded yet
     if ($logo === false) {
         if (file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.jpg')) {
             $logo = DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.jpg';
         } else {
             if (file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.png')) {
                 $logo = DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.png';
             }
         }
     }
     $this->Image($logo, TOC_PDF_LOGO_UPPER_LEFT_CORNER_X, TOC_PDF_LOGO_UPPER_LEFT_CORNER_Y, TOC_PDF_LOGO_WIDTH, TOC_PDF_LOGO_HEIGHT);
     //Line $x1, $y1, $x2, $y2
     $this->line(10, 35, 200, 35, array('dash' => 1));
     $this->line(10, 43, 200, 43, array('dash' => 1));
     $this->line(10, 68, 200, 68, array('dash' => 1));
     //Store Address
     $this->SetFont(TOC_PDF_FONT_B, 'B', TOC_PDF_HEADER_BILLING_INFO_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_STORE_ADDRESS_Y);
     $this->Cell(8, 6, 'مشخصات فروشنده', 0, 0, 'R', 0);
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_HEADER_STORE_ADDRESS_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_STORE_ADDRESS_Y + 8);
     $this->MultiCell(80, 4, STORE_NAME_ADDRESS, 0, 'R');
     //Customer Information
     $this->SetFont(TOC_PDF_FONT_B, 'B', TOC_PDF_HEADER_BILLING_INFO_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y);
     $this->Cell(8, 6, 'مشخصات خریدار', 0, 0, 'R', 0);
     $this->SetFont(TOC_PDF_FONT_B, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y + 7);
     $this->Cell(10, 6, 'نام :', 0, 0, 'R', 0);
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(30, 6, $this->_customer_info['name'], 0, 0, 'R', 0);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y + 7);
     $this->SetX(150);
     $this->SetFont(TOC_PDF_FONT_B, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(20, 6, 'شماره تماس :', 0, 0, 'R', 0);
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(20, 6, $this->_customer_info['telephone_number'], 0, 0, 'R', 0);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y + 13);
     $this->SetFont(TOC_PDF_FONT_B, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(10, 6, 'آدرس :', 0, 0, 'R', 0);
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(100, 6, "استان : " . $this->_customer_info['state'] . " - شهر : " . $this->_customer_info['city'] . " - " . $this->_customer_info['street_address'], 0, 0, 'R', 0);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y + 13);
     $this->SetX(150);
     $this->SetFont(TOC_PDF_FONT_B, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(20, 6, 'کد پستی :', 0, 0, 'R', 0);
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_SHIP_TO_ADDRESS_FONT_SIZE);
     $this->Cell(20, 6, $this->_customer_info['postcode'], 0, 0, 'R', 0);
 }
示例#3
0
 function getLogo()
 {
     global $toC_Json;
     $image = toC_Logo_Upload::getOriginalLogo();
     if (!empty($image)) {
         list($orig_width, $orig_height) = getimagesize($image);
         $width = intval(120 * $orig_width / $orig_height);
         $image = '<img src="' . $image . '" width="' . $width . '" height="120" style="padding: 10px" />';
         $response = array('success' => true, 'image' => $image);
     } else {
         $response = array('success' => false);
     }
     echo $toC_Json->encode($response);
 }
示例#4
0
 function Header()
 {
     //Logo
     $logo = toC_Logo_Upload::getOriginalLogo();
     $logo = $logo === false ? DIR_FS_CATALOG . DIR_WS_IMAGES . 'store_logo.jpg' : $logo;
     $this->Image($logo, TOC_PDF_LOGO_UPPER_LEFT_CORNER_X, TOC_PDF_LOGO_UPPER_LEFT_CORNER_Y, TOC_PDF_LOGO_WIDTH, TOC_PDF_LOGO_HEIGHT);
     //Line
     $this->line(10, 45, 98, 45);
     //Customer Information
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_HEADER_BILLING_INFO_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y);
     $this->MultiCell(100, 4, $this->_customer_info['name'] . "\n" . $this->_customer_info['street_address'] . " " . $this->_customer_info['suburb'] . "\n" . $this->_customer_info['postcode'] . " " . $this->_customer_info['city'] . "\n" . $this->_customer_info['country_title'] . "\n" . $this->_customer_info['email_address'], 0, 'L');
     //Store Information
     $this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_HEADER_STORE_ADDRESS_FONT_SIZE);
     $this->SetY(TOC_PDF_POS_STORE_ADDRESS_Y);
     $this->Cell(100);
     $this->MultiCell(80, 4, STORE_NAME_ADDRESS, 0, 'R');
 }