Esempio n. 1
0
    $reorder .= "<input type='submit' name='reorder' id='reorder' value='" . JText::_('COM_REDSHOP_REORDER') . "' onclick='return submitReorder();' />";
    $reorder .= "<input type='hidden' name='order_id' value='" . $oid . "'>";
    $reorder .= "<input type='hidden' name='option' value='com_redshop'>";
    $reorder .= "<input type='hidden' name='view' value='order_detail'>";
    $reorder .= "<input type='hidden' name='task' value='reorder'></form>";
}
$search[] = "{order_status}";
if (trim($OrdersDetail->order_payment_status) == 'Paid') {
    $orderPaymentStatus = JText::_('COM_REDSHOP_PAYMENT_STA_PAID');
} elseif (trim($OrdersDetail->order_payment_status) == 'Unpaid') {
    $orderPaymentStatus = JText::_('COM_REDSHOP_PAYMENT_STA_UNPAID');
} elseif (trim($OrdersDetail->order_payment_status) == 'Partial Paid') {
    $orderPaymentStatus = JText::_('COM_REDSHOP_PAYMENT_STA_PARTIAL_PAID');
} else {
    $orderPaymentStatus = $OrdersDetail->order_payment_status;
}
$replace[] = $statustext . " - " . $orderPaymentStatus . $split_amounttext . "    " . $payremaininglink . $frm;
if (strstr($orderslist_template, "{order_status_order_only}")) {
    $search[] = "{order_status_order_only}";
    $replace[] = $statustext;
}
if (strstr($orderslist_template, "{order_status_payment_only}")) {
    $search[] = "{order_status_payment_only}";
    $replace[] = $orderPaymentStatus;
}
$search[] = "{reorder_button}";
$replace[] = $reorder;
$message = str_replace($search, $replace, $orderslist_template);
$message = $redTemplate->parseredSHOPplugin($message);
$message = $carthelper->replaceOrderTemplate($OrdersDetail, $message);
echo eval("?>" . $message . "<?php ");
Esempio n. 2
0
if ($print) {
    $onclick = "onclick='window.print();'";
} else {
    $print_url = $url . "index.php?option=com_redshop&view=order_detail&layout=receipt&oid=" . $order_id . "&print=1&tmpl=component&Itemid=" . $Itemid;
    $onclick = "onclick='window.open(\"{$print_url}\",\"mywindow\",\"scrollbars=1\",\"location=1\")'";
}
$print_tag = "<a " . $onclick . " title='" . JText::_('COM_REDSHOP_PRINT_LBL') . "'>";
$print_tag .= "<img src='" . JSYSTEM_IMAGES_PATH . "printButton.png' alt='" . JText::_('COM_REDSHOP_PRINT_LBL') . "' title='" . JText::_('COM_REDSHOP_PRINT_LBL') . "' />";
$print_tag .= "</a>";
$ReceiptTemplate = str_replace("{print}", $print_tag, $ReceiptTemplate);
$ReceiptTemplate = str_replace("{product_name_lbl}", JText::_('COM_REDSHOP_PRODUCT_NAME_LBL'), $ReceiptTemplate);
$ReceiptTemplate = str_replace("{price_lbl}", JText::_('COM_REDSHOP_PRICE_LBL'), $ReceiptTemplate);
$ReceiptTemplate = str_replace("{quantity_lbl}", JText::_('COM_REDSHOP_QUANTITY_LBL'), $ReceiptTemplate);
$ReceiptTemplate = str_replace("{total_price_lbl}", JText::_('COM_REDSHOP_TOTAL_PRICE_LBL'), $ReceiptTemplate);
$ReceiptTemplate = str_replace("{barcode}", '', $ReceiptTemplate);
$ReceiptTemplate = $carthelper->replaceOrderTemplate($order, $ReceiptTemplate);
// Added new tag
/**
 * The Tag {txtextra_info} to display some extra information about payment method ( Only For display purpose ).
 *
 * Output is fatched from Payment Gateway Plugin Parameter 'txtextra_info'
 */
$order_payment = $order_functions->getOrderPaymentDetail($order_id);
$payment_method_class = $order_payment[0]->payment_method_class;
JLoader::import('joomla.plugin.helper');
$plugin = JPluginHelper::getPlugin('redshop_payment', $payment_method_class);
$params = new JRegistry($plugin->params);
$txtextra_info = $params->get('txtextra_info');
$ReceiptTemplate = str_replace("{txtextra_info}", $txtextra_info, $ReceiptTemplate);
// End
$ReceiptTemplate = $redTemplate->parseredSHOPplugin($ReceiptTemplate);
Esempio n. 3
0
 public function createShippedInvoicePdf($order_id)
 {
     $redconfig = new Redconfiguration();
     $producthelper = new producthelper();
     $extra_field = new extra_field();
     $config = JFactory::getConfig();
     $redTemplate = new Redtemplate();
     $carthelper = new rsCarthelper();
     $redshopMail = new redshopMail();
     $message = "";
     $subject = "";
     $cart = '';
     $arr_discount_type = array();
     $mailinfo = $redTemplate->getTemplate("shippment_invoice_template");
     if (count($mailinfo) > 0) {
         $message = $mailinfo[0]->template_desc;
     } else {
         return false;
     }
     $row = $this->getOrderDetails($order_id);
     $barcode_code = $row->barcode;
     $arr_discount = explode('@', $row->discount_type);
     $discount_type = '';
     for ($d = 0; $d < count($arr_discount); $d++) {
         if ($arr_discount[$d]) {
             $arr_discount_type = explode(':', $arr_discount[$d]);
             if ($arr_discount_type[0] == 'c') {
                 $discount_type .= JText::_('COM_REDSHOP_COUPON_CODE') . ' : ' . $arr_discount_type[1] . '<br>';
             }
             if ($arr_discount_type[0] == 'v') {
                 $discount_type .= JText::_('COM_REDSHOP_VOUCHER_CODE') . ' : ' . $arr_discount_type[1] . '<br>';
             }
         }
     }
     if (!$discount_type) {
         $discount_type = JText::_('COM_REDSHOP_NO_DISCOUNT_AVAILABLE');
     }
     $search[] = "{discount_type}";
     $replace[] = $discount_type;
     $message = str_replace($search, $replace, $message);
     $message = $redshopMail->imginmail($message);
     $user = JFactory::getUser();
     $billingaddresses = $this->getOrderBillingUserInfo($order_id);
     $email = $billingaddresses->user_email;
     $userfullname = $billingaddresses->firstname . " " . $billingaddresses->lastname;
     $message = $carthelper->replaceOrderTemplate($row, $message);
     echo "<div id='redshopcomponent' class='redshop'>";
     if (strstr($message, "{barcode}")) {
         $img_url = REDSHOP_FRONT_IMAGES_RELPATH . "barcode/" . $barcode_code . ".png";
         if (function_exists("curl_init")) {
             $bar_codeIMG = '<img src="' . $img_url . '" alt="Barcode"  border="0" />';
             $message = str_replace("{barcode}", $bar_codeIMG, $message);
         }
     }
     $body = $message;
     return $body;
 }