예제 #1
0
    public function multiprint_order()
    {
        $mypost = JRequest::getVar('cid');
        $order_function = new order_functions();
        $invoicePdf = $order_function->createMultiprintInvoicePdf($mypost);
        ?>
    <script type="text/javascript">
			<?php 
        if ($invoicePdf != "") {
            if (file_exists(REDSHOP_FRONT_DOCUMENT_RELPATH . "invoice/" . $invoicePdf . ".pdf")) {
                ?>
            window.open("<?php 
                echo REDSHOP_FRONT_DOCUMENT_ABSPATH;
                ?>
invoice/<?php 
                echo $invoicePdf;
                ?>
.pdf");

				<?php 
            }
        }
        for ($i = 0; $i < count($mypost); $i++) {
            if (file_exists(JPATH_COMPONENT_SITE . "/assets/labels/label_" . $mypost[$i] . ".pdf")) {
                ?>
            window.open("<?php 
                echo JURI::root();
                ?>
/components/com_redshop/assets/labels/label_<?php 
                echo $mypost[$i];
                ?>
.pdf");

				<?php 
            }
        }
        ?>

        window.parent.location = 'index.php?option=com_redshop&view=order';
    </script>
	<?php 
    }