?>
 / <?php 
    print $product->basic_price_info['name'];
    ?>
</span></div>
        <?php 
}
?>
        <?php 
if ($this->config->product_list_show_weight && $product->product_weight > 0) {
    ?>
            <div class="productweight"><?php 
    print _JSHOP_WEIGHT;
    ?>
: <span><?php 
    print formatweight($product->product_weight);
    ?>
</span></div>
        <?php 
}
?>
        <?php 
if ($product->delivery_time != '') {
    ?>
            <div class="deliverytime"><?php 
    print _JSHOP_DELIVERY_TIME;
    ?>
: <span><?php 
    print $product->delivery_time;
    ?>
</span></div>
Example #2
0
                                    <tr>
                                        <td class="weight">
                                            <?php 
            if ($price->shipping_weight_to != 0) {
                ?>
                                                <?php 
                print formatweight($price->shipping_weight_from);
                ?>
 - <?php 
                print formatweight($price->shipping_weight_to);
                ?>
                                            <?php 
            } else {
                ?>
                                                <?php 
                print _JSHOP_FROM . " " . formatweight($price->shipping_weight_from);
                ?>
                                            <?php 
            }
            ?>
                                        </td>
                                        <td class="price">
                                            <?php 
            print formatprice($price->shipping_price);
            ?>
                                        </td>
                                    </tr>
                                <?php 
        }
        ?>
                            </table>
Example #3
0
    </tr>
    <?php 
        $i++;
    }
    ?>
    </table>

    <?php 
    if ($this->config->show_weight_order) {
        ?>
        <div class = "weightorder">
            <?php 
        print _JSHOP_WEIGHT_PRODUCTS;
        ?>
: <span><?php 
        print formatweight($this->weight);
        ?>
</span>
        </div>
    <?php 
    }
    ?>
      
    <?php 
    if ($this->config->summ_null_shipping > 0) {
        ?>
        <div class = "shippingfree">
            <?php 
        printf(_JSHOP_FROM_PRICE_SHIPPING_FREE, formatprice($this->config->summ_null_shipping, null, 1));
        ?>
        </div>
Example #4
0
    }
    ?>
         <tr><td colspan="5" style="vertical-align:top;padding-bottom:10px;font-size:1px;"><div style="height:1px;border-top:1px solid #999;"></div></td></tr>
         <?php 
}
?>
         <?php 
if ($this->show_weight_order && $this->config->show_weight_order) {
    ?>
         <tr>
            <td colspan="5" style="text-align:right;font-size:11px;">            
                <?php 
    print _JSHOP_WEIGHT_PRODUCTS;
    ?>
: <span><?php 
    print formatweight($this->order->weight);
    ?>
</span>
            </td>
         </tr>   
         <?php 
}
?>
      <?php 
if ($this->show_total_info) {
    ?>
         <tr>
           <td colspan="5">&nbsp;</td>
         </tr>
         <?php 
    if (!$this->hide_subtotal) {
function generatePDF($order)
{
    $jshopConfig = JSFactory::getConfig();
    $vendorinfo = $order->getVendorInfo();
    $pdf = new JorderPDF();
    JPluginHelper::importPlugin('jshoppingorder');
    $dispatcher = JDispatcher::getInstance();
    $dispatcher->trigger('onBeforeCreatePdfOrder', array(&$order, &$vendorinfo, &$pdf));
    $pdf->_vendorinfo = $vendorinfo;
    $pdf->SetFont('freesans', '', 8);
    $pdf->setPrintHeader(false);
    $pdf->setPrintFooter(false);
    $pdf->SetMargins(0, 0, 0);
    $pdf->addNewPage();
    $pdf->SetXY(20, 55);
    $pdf->setfontsize(6);
    $pdf->SetTextColor($pdf->pdfcolors[0][0], $pdf->pdfcolors[0][1], $pdf->pdfcolors[0][2]);
    $pdf->MultiCell(80, 3, $vendorinfo->company_name . ", " . $vendorinfo->adress . ", " . $vendorinfo->zip . " " . $vendorinfo->city, 0, 'L');
    $pdf->SetXY(110, 55);
    $pdf->SetFont('freesansb', '', 11);
    $pdf->SetTextColor($pdf->pdfcolors[0][0], $pdf->pdfcolors[0][1], $pdf->pdfcolors[0][2]);
    $pdf->MultiCell(80, 3, _JSHOP_EMAIL_BILL, 0, 'R');
    $pdf->SetFont('freesans', '', 11);
    $pdf->SetXY(20, 60);
    $pdf->MultiCell(80, 4.5, $order->firma_name . "\n" . $order->f_name . " " . $order->l_name . " " . $order->m_name . "\n" . $order->street . " " . $order->home . " " . $order->apartment . "\n" . $order->zip . " " . $order->city . "\n" . $order->country, 0, 'L');
    $pdf->SetFont('freesansi', '', 11);
    $pdf->SetXY(110, 65);
    $pdf->MultiCell(80, 4.5, _JSHOP_ORDER_SHORT_NR . " " . $order->order_number . "\n" . _JSHOP_ORDER_FROM . " " . $order->order_date, 0, 'R');
    if ($jshopConfig->date_invoice_in_invoice) {
        $pdf->SetXY(110, 77);
        $pdf->MultiCell(80, 4.5, _JSHOP_INVOICE_DATE . " " . strftime($jshopConfig->store_date_format, strtotime($order->invoice_date)), 0, 'R');
    }
    $pdf->SetDrawColor($pdf->pdfcolors[0][0], $pdf->pdfcolors[0][1], $pdf->pdfcolors[0][2]);
    $pdf->SetFont('freesans', '', 7);
    if ($vendorinfo->identification_number) {
        $pdf->SetXY(115, 102);
        $pdf->MultiCell(35, 4, _JSHOP_IDENTIFICATION_NUMBER, 1, 'L');
        $pdf->SetXY(150, 102);
        $pdf->MultiCell(40, 4, $vendorinfo->identification_number, 1, 'R');
    }
    if ($vendorinfo->tax_number) {
        $pdf->SetXY(115, 106);
        $pdf->MultiCell(35, 4, _JSHOP_TAX_NUMBER, 1, 'L');
        $pdf->SetXY(150, 106);
        $pdf->MultiCell(40, 4, $vendorinfo->tax_number, 1, 'R');
    }
    $width_filename = 65;
    if (!$jshopConfig->show_product_code_in_order) {
        $width_filename = 87;
    }
    $pdf->setfillcolor($pdf->pdfcolors[1][0], $pdf->pdfcolors[1][1], $pdf->pdfcolors[1][2]);
    $pdf->Rect(20, 116, 170, 4, 'F');
    $pdf->SetFont('freesansb', '', 7.5);
    $pdf->SetXY(20, 116);
    $pdf->MultiCell($width_filename, 4, _JSHOP_NAME_PRODUCT, 1, 'L');
    if ($jshopConfig->show_product_code_in_order) {
        $pdf->SetXY(85, 116);
        $pdf->MultiCell(22, 4, _JSHOP_EAN_PRODUCT, 1, 'L');
    }
    $pdf->SetXY(107, 116);
    $pdf->MultiCell(18, 4, _JSHOP_QUANTITY, 1, 'L');
    $pdf->SetXY(125, 116);
    $pdf->MultiCell(25, 4, _JSHOP_SINGLEPRICE, 1, 'L');
    $pdf->SetXY(150, 116);
    $pdf->MultiCell(40, 4, _JSHOP_TOTAL, 1, 'R');
    $y = 120;
    foreach ($order->products as $prod) {
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y + 2);
        $pdf->MultiCell($width_filename, 4, $prod->product_name, 0, 'L');
        if ($prod->manufacturer != '') {
            $pdf->SetXY(20, $pdf->getY());
            $pdf->MultiCell($width_filename, 4, _JSHOP_MANUFACTURER . ": " . $prod->manufacturer, 0, 'L');
        }
        if ($prod->product_attributes != "" || $prod->product_freeattributes != "" || $prod->delivery_time || $prod->extra_fields != '') {
            if ($prod->delivery_time) {
                $pdt = _JSHOP_DELIVERY_TIME . ": " . $prod->delivery_time;
            } else {
                $pdt = "";
            }
            $pdf->SetXY(23, $pdf->getY());
            $pdf->SetFont('freesans', '', 6);
            $attribute = sprintAtributeInOrder($prod->product_attributes, "pdf");
            $attribute .= sprintFreeAtributeInOrder($prod->product_freeattributes, "pdf");
            $attribute .= sprintExtraFiledsInOrder($prod->extra_fields, "pdf");
            $attribute .= $prod->_ext_attribute;
            $attribute .= $pdt;
            $pdf->MultiCell(62, 4, $attribute, 0, 'L');
            $pdf->SetFont('freesans', '', 7);
        }
        $y2 = $pdf->getY() + 2;
        if ($jshopConfig->show_product_code_in_order) {
            $pdf->SetXY(85, $y + 2);
            $pdf->MultiCell(22, 4, $prod->product_ean, 0, 'L');
            $y3 = $pdf->getY() + 2;
        } else {
            $y3 = $pdf->getY();
        }
        $pdf->SetXY(107, $y + 2);
        $pdf->MultiCell(18, 4, formatqty($prod->product_quantity) . $prod->_qty_unit, 0, 'L');
        $y4 = $pdf->getY() + 2;
        $pdf->SetXY(125, $y + 2);
        $pdf->MultiCell(25, 4, formatprice($prod->product_item_price, $order->currency_code), 0, 'L');
        if ($prod->_ext_price) {
            $pdf->SetXY(125, $pdf->getY());
            $pdf->MultiCell(25, 4, $prod->_ext_price, 0, 'R');
        }
        if ($jshopConfig->show_tax_product_in_cart && $prod->product_tax > 0) {
            $pdf->SetXY(125, $pdf->getY());
            $pdf->SetFont('freesans', '', 6);
            $text = productTaxInfo($prod->product_tax, $order->display_price);
            $pdf->MultiCell(25, 4, $text, 0, 'L');
        }
        if ($jshopConfig->cart_basic_price_show && $prod->basicprice > 0) {
            $pdf->SetXY(125, $pdf->getY());
            $pdf->SetFont('freesans', '', 6);
            $text = _JSHOP_BASIC_PRICE . ": " . sprintBasicPrice($prod);
            $pdf->MultiCell(25, 4, $text, 0, 'L');
        }
        $y5 = $pdf->getY() + 2;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(150, $y + 2);
        $pdf->MultiCell(40, 4, formatprice($prod->product_quantity * $prod->product_item_price, $order->currency_code), 0, 'R');
        if ($prod->_ext_price_total) {
            $pdf->SetXY(150, $pdf->getY());
            $pdf->MultiCell(40, 4, $prod->_ext_price_total, 0, 'R');
        }
        if ($jshopConfig->show_tax_product_in_cart && $prod->product_tax > 0) {
            $pdf->SetXY(150, $pdf->getY());
            $pdf->SetFont('freesans', '', 6);
            $text = productTaxInfo($prod->product_tax, $order->display_price);
            $pdf->MultiCell(40, 4, $text, 0, 'R');
        }
        $y6 = $pdf->getY() + 2;
        $yn = max($y2, $y3, $y4, $y5, $y6);
        $pdf->Rect(20, $y, 170, $yn - $y);
        $pdf->Rect(20, $y, 130, $yn - $y);
        if ($jshopConfig->show_product_code_in_order) {
            $pdf->line(85, $y, 85, $yn);
        }
        $pdf->line(107, $y, 107, $yn);
        $pdf->line(125, $y, 125, $yn);
        $y = $yn;
        if ($y > 260) {
            $pdf->addNewPage();
            $y = 60;
        }
    }
    if ($y > 240) {
        $pdf->addNewPage();
        $y = 60;
    }
    $pdf->SetFont('freesans', '', 10);
    if (($jshopConfig->hide_tax || count($order->order_tax_list) == 0) && $order->order_discount == 0 && $order->order_payment == 0 && $jshopConfig->without_shipping) {
        $hide_subtotal = 1;
    } else {
        $hide_subtotal = 0;
    }
    if (!$hide_subtotal) {
        $pdf->SetXY(20, $y);
        $pdf->Rect(20, $y, 170, 5, 'F');
        $pdf->MultiCell(130, 5, _JSHOP_SUBTOTAL, '1', 'R');
        $pdf->SetXY(150, $y);
        $pdf->MultiCell(40, 5, formatprice($order->order_subtotal, $order->currency_code) . $order->_pdf_ext_subtotal, '1', 'R');
    } else {
        $y = $y - 5;
    }
    if ($order->order_discount > 0) {
        $y = $y + 5;
        $pdf->SetXY(20, $y);
        $pdf->Rect(20, $y, 170, 5, 'F');
        $pdf->MultiCell(130, 5, _JSHOP_RABATT_VALUE, '1', 'R');
        $pdf->SetXY(150, $y);
        $pdf->MultiCell(40, 5, "-" . formatprice($order->order_discount, $order->currency_code) . $order->_pdf_ext_discount, '1', 'R');
    }
    if (!$jshopConfig->without_shipping) {
        $pdf->SetXY(20, $y + 5);
        $pdf->Rect(20, $y + 5, 170, 5, 'F');
        $pdf->MultiCell(130, 5, _JSHOP_SHIPPING_PRICE, '1', 'R');
        $pdf->SetXY(150, $y + 5);
        $pdf->MultiCell(40, 5, formatprice($order->order_shipping, $order->currency_code) . $order->_pdf_ext_shipping, '1', 'R');
        if ($order->order_package > 0 || $jshopConfig->display_null_package_price) {
            $y = $y + 5;
            $pdf->SetXY(20, $y + 5);
            $pdf->Rect(20, $y + 5, 170, 5, 'F');
            $pdf->MultiCell(130, 5, _JSHOP_PACKAGE_PRICE, '1', 'R');
            $pdf->SetXY(150, $y + 5);
            $pdf->MultiCell(40, 5, formatprice($order->order_package, $order->currency_code) . $order->_pdf_ext_shipping_package, '1', 'R');
        }
    } else {
        $y = $y - 5;
    }
    if ($order->order_payment != 0) {
        $y = $y + 5;
        $pdf->SetXY(20, $y + 5);
        $pdf->Rect(20, $y + 5, 170, 5, 'F');
        $pdf->MultiCell(130, 5, $order->payment_name, '1', 'R');
        $pdf->SetXY(150, $y + 5);
        $pdf->MultiCell(40, 5, formatprice($order->order_payment, $order->currency_code) . $order->_pdf_ext_payment, '1', 'R');
    }
    $show_percent_tax = 0;
    if (count($order->order_tax_list) > 1 || $jshopConfig->show_tax_in_product) {
        $show_percent_tax = 1;
    }
    if ($jshopConfig->hide_tax) {
        $show_percent_tax = 0;
    }
    $dispatcher->trigger('onBeforeCreatePdfOrderBeforeEndTotal', array(&$order, &$pdf, &$y));
    if (!$jshopConfig->hide_tax) {
        foreach ($order->order_tax_list as $percent => $value) {
            $pdf->SetXY(20, $y + 10);
            $pdf->Rect(20, $y + 10, 170, 5, 'F');
            $text = displayTotalCartTaxName($order->display_price);
            if ($show_percent_tax) {
                $text = $text . " " . formattax($percent) . "%";
            }
            $pdf->MultiCell(130, 5, $text, '1', 'R');
            $pdf->SetXY(150, $y + 10);
            $pdf->MultiCell(40, 5, formatprice($value, $order->currency_code) . $order->_pdf_ext_tax[$percent], '1', 'R');
            $y = $y + 5;
        }
    }
    $text_total = _JSHOP_ENDTOTAL;
    if (($jshopConfig->show_tax_in_product || $jshopConfig->show_tax_product_in_cart) && count($order->order_tax_list) > 0) {
        $text_total = _JSHOP_ENDTOTAL_INKL_TAX;
    }
    $pdf->SetFont('freesansb', '', 10);
    $pdf->SetXY(20, $y + 10);
    $pdf->Rect(20, $y + 10, 170, 5.1, 'F');
    $pdf->MultiCell(130, 5, $text_total, '1', 'R');
    $pdf->SetXY(150, $y + 10);
    $pdf->MultiCell(40, 5, formatprice($order->order_total, $order->currency_code) . $order->_pdf_ext_total, '1', 'R');
    if ($jshopConfig->display_tax_id_in_pdf && $order->tax_number) {
        $y = $y + 5.2;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y + 10);
        $pdf->MultiCell(170, 4, _JSHOP_TAX_NUMBER . ": " . $order->tax_number, '1', 'L');
    }
    $dispatcher->trigger('onBeforeCreatePdfOrderAfterEndTotal', array(&$order, &$pdf, &$y));
    $y = $y + 10;
    if ($jshopConfig->show_delivery_time_checkout && ($order->delivery_times_id || $order->delivery_time)) {
        if ($y > 250) {
            $pdf->addNewPage();
            $y = 60;
        }
        $deliverytimes = JSFactory::getAllDeliveryTime();
        $delivery = $deliverytimes[$order->delivery_times_id];
        if ($delivery == "") {
            $delivery = $order->delivery_time;
        }
        $y = $y + 8;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, _JSHOP_ORDER_DELIVERY_TIME . ": " . $delivery, '0', 'L');
    }
    if ($jshopConfig->show_delivery_date && !datenull($order->delivery_date)) {
        if ($y > 250) {
            $pdf->addNewPage();
            $y = 60;
        }
        $delivery_date_f = formatdate($order->delivery_date);
        $y = $y + 6;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, _JSHOP_DELIVERY_DATE . ": " . $delivery_date_f, '0', 'L');
    }
    if ($jshopConfig->weight_in_invoice) {
        if ($y > 250) {
            $pdf->addNewPage();
            $y = 60;
        }
        $y = $y + 6;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, _JSHOP_WEIGHT_PRODUCTS . ": " . formatweight($order->weight), '0', 'L');
    }
    if (!$jshopConfig->without_payment && $jshopConfig->payment_in_invoice) {
        if ($y > 240) {
            $pdf->addNewPage();
            $y = 60;
        }
        $y = $y + 6;
        $pdf->SetFont('freesansb', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, _JSHOP_PAYMENT_INFORMATION, '0', 'L');
        $y = $y + 4;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, $order->payment_name, '0', 'L');
        $payment_descr = trim(trim($order->payment_information) . "\n" . $order->payment_description);
        if ($payment_descr != '') {
            $y = $y + 4;
            $pdf->SetXY(20, $y);
            $pdf->MultiCell(170, 4, strip_tags($payment_descr), '0', 'L');
            $y = $pdf->getY() - 4;
        }
    }
    if (!$jshopConfig->without_shipping && $jshopConfig->shipping_in_invoice) {
        if ($y > 250) {
            $pdf->addNewPage();
            $y = 60;
        }
        $y = $y + 6;
        $pdf->SetFont('freesansb', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, _JSHOP_SHIPPING_INFORMATION, '0', 'L');
        $y = $y + 4;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y);
        $pdf->MultiCell(170, 4, $order->shipping_information, '0', 'L');
    }
    $y = $y + 20;
    if ($y > 240) {
        $pdf->addNewPage();
        $y = 60;
    }
    $pdf->SetFont('freesans', '', 7);
    $y2 = 0;
    if ($vendorinfo->benef_bank_info || $vendorinfo->benef_bic || $vendorinfo->benef_conto || $vendorinfo->benef_payee || $vendorinfo->benef_iban || $vendorinfo->benef_swift) {
        $pdf->SetXY(115, $y);
        $pdf->Rect(115, $y, 75, 4, 'F');
        $pdf->MultiCell(75, 4, _JSHOP_BANK, '1', 'L');
    }
    if ($vendorinfo->benef_bank_info) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_BENEF_BANK_NAME, '1', 'L');
    }
    if ($vendorinfo->benef_bic) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_BENEF_BIC, '1', 'L');
    }
    if ($vendorinfo->benef_conto) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_BENEF_CONTO, '1', 'L');
    }
    if ($vendorinfo->benef_payee) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_BENEF_PAYEE, '1', 'L');
    }
    if ($vendorinfo->benef_iban) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_BENEF_IBAN, '1', 'L');
    }
    if ($vendorinfo->benef_swift) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_BENEF_SWIFT, '1', 'L');
    }
    if ($vendorinfo->interm_name || $vendorinfo->interm_swift) {
        $y2 += 4;
        $pdf->Rect(115, $y2 + $y, 75, 4, 'F');
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_INTERM_BANK, '1', 'L');
    }
    if ($vendorinfo->interm_name) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_INTERM_NAME, '1', 'L');
    }
    if ($vendorinfo->interm_swift) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, _JSHOP_INTERM_SWIFT, '1', 'L');
    }
    $y2 = 0;
    if ($vendorinfo->benef_bank_info) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->benef_bank_info, '0', 'R');
    }
    if ($vendorinfo->benef_bic) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->benef_bic, '0', 'R');
    }
    if ($vendorinfo->benef_conto) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->benef_conto, '0', 'R');
    }
    if ($vendorinfo->benef_payee) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->benef_payee, '0', 'R');
    }
    if ($vendorinfo->benef_iban) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->benef_iban, '0', 'R');
    }
    if ($vendorinfo->benef_swift) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->benef_swift, '0', 'R');
    }
    $y2 += 4;
    if ($vendorinfo->interm_name) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->interm_name, '0', 'R');
    }
    if ($vendorinfo->interm_swift) {
        $y2 += 4;
        $pdf->SetXY(115, $y2 + $y);
        $pdf->MultiCell(75, 4, $vendorinfo->interm_swift, '0', 'R');
    }
    if ($vendorinfo->additional_information) {
        if ($y2 + $y > 240) {
            $pdf->addNewPage();
            $y = 50;
            $y2 = 0;
        }
        $y2 += 6;
        $pdf->SetXY(20, $y2 + $y);
        $pdf->MultiCell(170, 4, $vendorinfo->additional_information, '0', 'L');
    }
    $name_pdf = $order->order_id . "_" . md5(uniqid(rand(0, 100))) . ".pdf";
    $dispatcher->trigger('onBeforeCreatePdfOrderEnd', array(&$order, &$pdf, &$name_pdf));
    $pdf->Output($jshopConfig->pdf_orders_path . "/" . $name_pdf, 'F');
    return $name_pdf;
}
    ?>
 / <?php 
    echo $product->basic_price_info['name'];
    ?>
</span></div>
        <?php 
}
?>
        <?php 
if ($this->config->product_list_show_weight && $product->product_weight > 0) {
    ?>
            <div class="productweight"><?php 
    echo _JSHOP_WEIGHT;
    ?>
.: <span><?php 
    echo formatweight($product->product_weight);
    ?>
</span></div>
        <?php 
}
?>
        <?php 
if ($product->delivery_time != '') {
    ?>
            <div class="deliverytime"><?php 
    echo _JSHOP_DELIVERY_TIME;
    ?>
: <span><?php 
    echo $product->delivery_time;
    ?>
</span></div>
Example #7
0
: <?php 
    print $this->product->delivery_time;
    ?>
</div>
        <?php 
}
?>
        
        <?php 
if ($this->config->product_show_weight && $this->product->product_weight > 0) {
    ?>
            <div class="productweight"><?php 
    print _JSHOP_WEIGHT;
    ?>
: <span id="block_weight"><?php 
    print formatweight($this->product->getWeight());
    ?>
</span></div>
        <?php 
}
?>

        <?php 
if ($this->product->product_basic_price_show) {
    ?>
            <div class="prod_base_price"><?php 
    print _JSHOP_BASIC_PRICE;
    ?>
: <span id="block_basic_price"><?php 
    print formatprice($this->product->product_basic_price_calculate);
    ?>
 public function getLoadProductData()
 {
     $jshopConfig = JSFactory::getConfig();
     $dispatcher = JDispatcher::getInstance();
     $product = $this->product;
     $product->load($this->product_id);
     $dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib2', array(&$product));
     $attributes = $product->getInitLoadAttribute($this->attribs);
     $product->setFreeAttributeActive($this->freeattr);
     $rows = array();
     foreach ($attributes as $k => $v) {
         $rows['id_' . $k] = $v->selects;
     }
     $pricefloat = $product->getPrice($this->qty, 1, 1, 1);
     $price = formatprice($pricefloat);
     $available = intval($product->getQty() > 0);
     $displaybuttons = intval(intval($product->getQty() > 0) || $jshopConfig->hide_buy_not_avaible_stock == 0);
     $ean = $product->getEan();
     $weight = formatweight($product->getWeight());
     $basicprice = formatprice($product->getBasicPrice());
     $rows['price'] = $price;
     $rows['pricefloat'] = $pricefloat;
     $rows['available'] = $available;
     $rows['ean'] = $ean;
     if ($jshopConfig->admin_show_product_basic_price) {
         $rows['basicprice'] = $basicprice;
     }
     if ($jshopConfig->product_show_weight) {
         $rows['weight'] = $weight;
     }
     if ($jshopConfig->product_list_show_price_default && $product->product_price_default > 0) {
         $rows['pricedefault'] = formatprice($product->product_price_default);
     }
     if ($jshopConfig->product_show_qty_stock) {
         $qty_in_stock = getDataProductQtyInStock($product);
         $rows['qty'] = sprintQtyInStock($qty_in_stock);
     }
     $product->updateOtherPricesIncludeAllFactors();
     if (is_array($product->product_add_prices)) {
         foreach ($product->product_add_prices as $k => $v) {
             $rows['pq_' . $v->product_quantity_start] = formatprice($v->price);
         }
     }
     if ($product->product_old_price) {
         $old_price = formatprice($product->product_old_price);
         $rows['oldprice'] = $old_price;
     }
     $rows['displaybuttons'] = $displaybuttons;
     if ($jshopConfig->hide_delivery_time_out_of_stock) {
         $rows['showdeliverytime'] = $product->getDeliveryTimeId();
     }
     if ($jshopConfig->use_extend_attribute_data) {
         $template_path = $jshopConfig->template_path . $jshopConfig->template . "/product";
         $images = $product->getImages();
         $videos = $product->getVideos();
         $demofiles = $product->getDemoFiles();
         if (!file_exists($template_path . "/block_image_thumb.php")) {
             $tmp = array();
             foreach ($images as $img) {
                 $tmp[] = $img->image_name;
             }
             $displayimgthumb = intval(count($images) > 1 || count($videos) && count($images));
             $rows['images'] = $tmp;
             $rows['displayimgthumb'] = $displayimgthumb;
         }
         $view = $this->getView("product");
         $view->setLayout("demofiles");
         $view->assign('config', $jshopConfig);
         $view->assign('demofiles', $demofiles);
         $demofiles = $view->loadTemplate();
         $rows['demofiles'] = $demofiles;
         if (file_exists($template_path . "/block_image_thumb.php")) {
             $product->getDescription();
             $view = $this->getView("product");
             $view->setLayout("block_image_thumb");
             $view->assign('config', $jshopConfig);
             $view->assign('images', $images);
             $view->assign('videos', $videos);
             $view->assign('image_product_path', $jshopConfig->image_product_live_path);
             $dispatcher->trigger('onBeforeDisplayProductViewBlockImageThumb', array(&$view));
             $block_image_thumb = $view->loadTemplate();
             $view = $this->getView("product");
             $view->setLayout("block_image_middle");
             $view->assign('config', $jshopConfig);
             $view->assign('images', $images);
             $view->assign('videos', $videos);
             $view->assign('product', $product);
             $view->assign('noimage', $jshopConfig->noimage);
             $view->assign('image_product_path', $jshopConfig->image_product_live_path);
             $view->assign('path_to_image', $jshopConfig->live_path . 'images/');
             $dispatcher->trigger('onBeforeDisplayProductViewBlockImageMiddle', array(&$view));
             $block_image_middle = $view->loadTemplate();
             $rows['block_image_thumb'] = $block_image_thumb;
             $rows['block_image_middle'] = $block_image_middle;
         }
     }
     $dispatcher->trigger('onBeforeDisplayAjaxAttribRows', array(&$rows, &$this));
     return $rows;
 }
 /**
  * get attributes html selects, price for select attribute 
  */
 function ajax_attrib_select_and_price()
 {
     $db = JFactory::getDBO();
     $jshopConfig = JSFactory::getConfig();
     $product_id = JRequest::getInt('product_id');
     $change_attr = JRequest::getInt('change_attr');
     if ($jshopConfig->use_decimal_qty) {
         $qty = floatval(str_replace(",", ".", JRequest::getVar('qty', 1)));
     } else {
         $qty = JRequest::getInt('qty', 1);
     }
     if ($qty < 0) {
         $qty = 0;
     }
     $attribs = JRequest::getVar('attr');
     if (!is_array($attribs)) {
         $attribs = array();
     }
     $freeattr = JRequest::getVar('freeattr');
     if (!is_array($freeattr)) {
         $freeattr = array();
     }
     JPluginHelper::importPlugin('jshoppingproducts');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib', array(&$product_id, &$change_attr, &$qty, &$attribs, &$freeattr));
     $product = JTable::getInstance('product', 'jshop');
     $product->load($product_id);
     $dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib2', array(&$product));
     $attributesDatas = $product->getAttributesDatas($attribs);
     $product->setAttributeActive($attributesDatas['attributeActive']);
     $attributeValues = $attributesDatas['attributeValues'];
     $product->setFreeAttributeActive($freeattr);
     $attributes = $product->getBuildSelectAttributes($attributeValues, $attributesDatas['attributeSelected']);
     $rows = array();
     foreach ($attributes as $k => $v) {
         $v->selects = str_replace(array("\n", "\r", "\t"), "", $v->selects);
         $rows[] = '"id_' . $k . '":"' . str_replace('"', '\\"', $v->selects) . '"';
     }
     $pricefloat = $product->getPrice($qty, 1, 1, 1);
     $price = formatprice($pricefloat);
     $available = intval($product->getQty() > 0);
     $displaybuttons = intval(intval($product->getQty() > 0) || $jshopConfig->hide_buy_not_avaible_stock == 0);
     $ean = $product->getEan();
     $weight = formatweight($product->getWeight());
     $basicprice = formatprice($product->getBasicPrice());
     $rows[] = '"price":"' . $price . '"';
     $rows[] = '"pricefloat":"' . $pricefloat . '"';
     $rows[] = '"available":"' . $available . '"';
     $rows[] = '"ean":"' . $ean . '"';
     if ($jshopConfig->admin_show_product_basic_price) {
         $rows[] = '"basicprice":"' . $basicprice . '"';
     }
     if ($jshopConfig->product_show_weight) {
         $rows[] = '"weight":"' . $weight . '"';
     }
     if ($jshopConfig->product_list_show_price_default && $product->product_price_default > 0) {
         $rows[] = '"pricedefault":"' . formatprice($product->product_price_default) . '"';
     }
     if ($jshopConfig->product_show_qty_stock) {
         $qty_in_stock = getDataProductQtyInStock($product);
         $rows[] = '"qty":"' . sprintQtyInStock($qty_in_stock) . '"';
     }
     $product->updateOtherPricesIncludeAllFactors();
     if (is_array($product->product_add_prices)) {
         foreach ($product->product_add_prices as $k => $v) {
             $rows[] = '"pq_' . $v->product_quantity_start . '":"' . str_replace('"', '\\"', formatprice($v->price)) . '"';
         }
     }
     if ($product->product_old_price) {
         $old_price = formatprice($product->product_old_price);
         $rows[] = '"oldprice":"' . $old_price . '"';
     }
     $rows[] = '"displaybuttons":"' . $displaybuttons . '"';
     if ($jshopConfig->use_extend_attribute_data) {
         $images = $product->getImages();
         $videos = $product->getVideos();
         $demofiles = $product->getDemoFiles();
         $tmp = array();
         foreach ($images as $img) {
             $tmp[] = '"' . $img->image_name . '"';
         }
         $displayimgthumb = intval(count($images) > 1 || count($videos) && count($images));
         $rows[] = '"images":[' . implode(",", $tmp) . '],"displayimgthumb":"' . $displayimgthumb . '"';
         $view_name = "product";
         $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
         $view = $this->getView($view_name, getDocumentType(), '', $view_config);
         $view->setLayout("demofiles");
         $view->assign('config', $jshopConfig);
         $view->assign('demofiles', $demofiles);
         $demofiles = $view->loadTemplate();
         $demofiles = str_replace(array("\n", "\r", "\t"), "", $demofiles);
         $rows[] = '"demofiles":"' . str_replace('"', '\\"', $demofiles) . '"';
     }
     $dispatcher->trigger('onBeforeDisplayAjaxAttrib', array(&$rows, &$product));
     print '{' . implode(",", $rows) . '}';
     die;
 }
Example #10
0
 /**
  * get attributes html selects, price for select attribute 
  */
 function ajax_attrib_select_and_price()
 {
     $db = JFactory::getDBO();
     $jshopConfig = JSFactory::getConfig();
     $product_id = JRequest::getInt('product_id');
     $change_attr = JRequest::getInt('change_attr');
     if ($jshopConfig->use_decimal_qty) {
         $qty = floatval(str_replace(",", ".", JRequest::getVar('qty', 1)));
     } else {
         $qty = JRequest::getInt('qty', 1);
     }
     if ($qty < 0) {
         $qty = 0;
     }
     $attribs = JRequest::getVar('attr');
     if (!is_array($attribs)) {
         $attribs = array();
     }
     $freeattr = JRequest::getVar('freeattr');
     if (!is_array($freeattr)) {
         $freeattr = array();
     }
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib', array(&$product_id, &$change_attr, &$qty, &$attribs, &$freeattr));
     $product = JSFactory::getTable('product', 'jshop');
     $product->load($product_id);
     $dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib2', array(&$product));
     $attributesDatas = $product->getAttributesDatas($attribs);
     $product->setAttributeActive($attributesDatas['attributeActive']);
     $attributeValues = $attributesDatas['attributeValues'];
     $product->setFreeAttributeActive($freeattr);
     $attributes = $product->getBuildSelectAttributes($attributeValues, $attributesDatas['attributeSelected']);
     $rows = array();
     foreach ($attributes as $k => $v) {
         $rows[] = '"id_' . $k . '":"' . json_value_encode($v->selects, 1) . '"';
     }
     $pricefloat = $product->getPrice($qty, 1, 1, 1);
     $price = formatprice($pricefloat);
     $available = intval($product->getQty() > 0);
     $displaybuttons = intval(intval($product->getQty() > 0) || $jshopConfig->hide_buy_not_avaible_stock == 0);
     $ean = $product->getEan();
     $weight = formatweight($product->getWeight());
     $basicprice = formatprice($product->getBasicPrice());
     $min_kolichestvo = $product->min_kolichestvo;
     $rows[] = '"price":"' . json_value_encode($price) . '"';
     $rows[] = '"pricefloat":"' . $pricefloat . '"';
     $rows[] = '"available":"' . $available . '"';
     $rows[] = '"min_kolichestvo":"' . $min_kolichestvo . '"';
     $rows[] = '"ean":"' . json_value_encode($ean) . '"';
     if ($jshopConfig->admin_show_product_basic_price) {
         $rows[] = '"basicprice":"' . json_value_encode($basicprice) . '"';
     }
     if ($jshopConfig->product_show_weight) {
         $rows[] = '"weight":"' . json_value_encode($weight) . '"';
     }
     if ($jshopConfig->product_list_show_price_default && $product->product_price_default > 0) {
         $rows[] = '"pricedefault":"' . json_value_encode(formatprice($product->product_price_default)) . '"';
     }
     if ($jshopConfig->product_show_qty_stock) {
         $qty_in_stock = getDataProductQtyInStock($product);
         $rows[] = '"qty":"' . json_value_encode(sprintQtyInStock($qty_in_stock)) . '"';
     }
     $product->updateOtherPricesIncludeAllFactors();
     if (is_array($product->product_add_prices)) {
         foreach ($product->product_add_prices as $k => $v) {
             $rows[] = '"pq_' . $v->product_quantity_start . '":"' . json_value_encode(formatprice($v->price)) . '"';
         }
     }
     if ($product->product_old_price) {
         $old_price = formatprice($product->product_old_price);
         $rows[] = '"oldprice":"' . json_value_encode($old_price) . '"';
     }
     $rows[] = '"displaybuttons":"' . $displaybuttons . '"';
     if ($jshopConfig->hide_delivery_time_out_of_stock) {
         $rows[] = '"showdeliverytime":"' . $product->getDeliveryTimeId() . '"';
     }
     if ($jshopConfig->use_extend_attribute_data) {
         $template_path = $jshopConfig->template_path . $jshopConfig->template . "/product";
         $images = $product->getImages();
         $videos = $product->getVideos();
         $demofiles = $product->getDemoFiles();
         $tmp = array();
         foreach ($images as $img) {
             $tmp[] = '"' . $img->image_name . '"';
         }
         if (!file_exists($template_path . "/block_image_thumb.php")) {
             $displayimgthumb = intval(count($images) > 1 || count($videos) && count($images));
             $rows[] = '"images":[' . implode(",", $tmp) . '],"displayimgthumb":"' . $displayimgthumb . '"';
         }
         $view_name = "product";
         $view_config = array("template_path" => $template_path);
         $view = $this->getView($view_name, getDocumentType(), '', $view_config);
         $view->setLayout("demofiles");
         $view->assign('config', $jshopConfig);
         $view->assign('demofiles', $demofiles);
         $demofiles = $view->loadTemplate();
         $rows[] = '"demofiles":"' . json_value_encode($demofiles, 1) . '"';
         if (file_exists($template_path . "/block_image_thumb.php")) {
             $product->getDescription();
             $view_name = "product";
             $view_config = array("template_path" => $template_path);
             $view = $this->getView($view_name, getDocumentType(), '', $view_config);
             $view->setLayout("block_image_thumb");
             $view->assign('config', $jshopConfig);
             $view->assign('images', $images);
             $view->assign('videos', $videos);
             $view->assign('image_product_path', $jshopConfig->image_product_live_path);
             $dispatcher->trigger('onBeforeDisplayProductViewBlockImageThumb', array(&$view));
             $block_image_thumb = $view->loadTemplate();
             $view_name = "product";
             $view_config = array("template_path" => $template_path);
             $view = $this->getView($view_name, getDocumentType(), '', $view_config);
             $view->setLayout("block_image_middle");
             $view->assign('config', $jshopConfig);
             $view->assign('images', $images);
             $view->assign('videos', $videos);
             $view->assign('product', $product);
             $view->assign('noimage', $jshopConfig->noimage);
             $view->assign('image_product_path', $jshopConfig->image_product_live_path);
             $view->assign('path_to_image', $jshopConfig->live_path . 'images/');
             $dispatcher->trigger('onBeforeDisplayProductViewBlockImageMiddle', array(&$view));
             $block_image_middle = $view->loadTemplate();
             $rows[] = '"block_image_thumb":"' . json_value_encode($block_image_thumb, 1) . '"';
             $rows[] = '"block_image_middle":"' . json_value_encode($block_image_middle, 1) . '"';
         }
     }
     $dispatcher->trigger('onBeforeDisplayAjaxAttrib', array(&$rows, &$product));
     print '{' . implode(",", $rows) . '}';
     die;
 }
Example #11
0
}
?>
	</tbody>  
</table>


<?php 
if ($this->config->show_weight_order) {
    ?>
  
<div class="weightorder">
	<?php 
    echo _JSHOP_WEIGHT_PRODUCTS;
    ?>
: <span><?php 
    echo formatweight($this->order->weight);
    ?>
</span>
</div>
<?php 
}
?>

  
<table class="jshop jshop_subtotal">
<?php 
if (!$this->hide_subtotal) {
    ?>
	<tr>    
    	<td class="name">
      		<?php 
    $i++;
}
?>
	</tbody>
</table>

<?php 
if ($this->config->show_weight_order) {
    ?>
  
   	<div class="weightorder">
       	<?php 
    echo _JSHOP_WEIGHT_PRODUCTS;
    ?>
: <span><?php 
    echo formatweight($this->weight);
    ?>
</span>
   	</div>
<?php 
}
?>
  
<table class="jshop jshop_subtotal">
	<?php 
if (!$this->hide_subtotal) {
    ?>
  	<tr class="subtotal">    
    	<td class="name">
      		<?php 
    echo _JSHOP_SUBTOTAL;