本文整理汇总了PHP中shipping::decryptShipping方法的典型用法代码示例。如果您正苦于以下问题:PHP shipping::decryptShipping方法的具体用法?PHP shipping::decryptShipping怎么用?PHP shipping::decryptShipping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shipping
的用法示例。
在下文中一共展示了shipping::decryptShipping方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: business_gls_export
public function business_gls_export($cid)
{
$app = JFactory::getApplication();
$oids = implode(',', $cid);
$where = "";
$redhelper = new redhelper();
$order_helper = new order_functions();
$shipping = new shipping();
$exportfilename = 'redshop_gls_order_export.csv';
/* Start output to the browser */
if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT'])) {
$UserBrowser = "Opera";
} elseif (ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT'])) {
$UserBrowser = "IE";
} else {
$UserBrowser = '';
}
$mime_type = $UserBrowser == 'IE' || $UserBrowser == 'Opera' ? 'application/octetstream' : 'application/octet-stream';
/* Clean the buffer */
while (@ob_end_clean()) {
}
header('Content-Type: ' . $mime_type);
header('Content-Encoding: UTF-8');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
if ($UserBrowser == 'IE') {
header('Content-Disposition: inline; filename="' . $exportfilename . '"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
} else {
header('Content-Disposition: attachment; filename="' . $exportfilename . '"');
header('Pragma: no-cache');
}
if ($cid[0] != 0) {
$where = " WHERE order_id IN (" . $oids . ")";
}
$db = JFactory::getDbo();
$q = "SELECT * FROM #__redshop_orders " . $where . " ORDER BY order_id asc";
$db->setQuery($q);
$gls_arr = $db->loadObjectList();
echo "Order_number,Quantity,Create_date,total_weight,reciever_firstName,reciever_lastname,Customer_note";
echo "\r\n";
for ($i = 0; $i < count($gls_arr); $i++) {
$details = explode("|", $shipping->decryptShipping(str_replace(" ", "+", $gls_arr[$i]->ship_method_id)));
if ($details[0] == 'shipper') {
$orderproducts = $order_helper->getOrderItemDetail($gls_arr[$i]->order_id);
$shippingDetails = $order_helper->getOrderShippingUserInfo($gls_arr[$i]->order_id);
$billingDetails = $order_helper->getOrderBillingUserInfo($gls_arr[$i]->order_id);
$totalWeight = "";
$qty = "";
for ($c = 0; $c < count($orderproducts); $c++) {
$product_id[] = $orderproducts[$c]->product_id;
$qty += $orderproducts[$c]->product_quantity;
$content_products[] = $orderproducts[$c]->order_item_name;
$sql = "SELECT weight FROM #__redshop_product WHERE product_id ='" . $orderproducts[$c]->product_id . "'";
$db->setQuery($sql);
$weight = $db->loadResult();
$totalWeight += $weight * $orderproducts[$c]->product_quantity;
}
$userDetail = ',"' . $shippingDetails->firstname . ' ' . $shippingDetails->lastname . '","' . $gls_arr[$i]->customer_note;
echo '"' . $gls_arr[$i]->order_number . '","' . $qty . '","' . date("d-m-Y", $gls_arr[$i]->cdate) . '","' . $totalWeight . '","' . $userDetail . '"';
echo "\r\n";
}
}
exit;
}
示例2: store
public function store($postdata)
{
$redshopMail = new redshopMail();
$order_functions = new order_functions();
$helper = new redhelper();
$producthelper = new producthelper();
$rsCarthelper = new rsCarthelper();
$shippinghelper = new shipping();
$adminproducthelper = new adminproducthelper();
$stockroomhelper = new rsstockroomhelper();
// For barcode generation
$barcode_code = $order_functions->barcode_randon_number(12, 0);
$postdata['barcode'] = $barcode_code;
$row = $this->getTable('order_detail');
if (!$row->bind($postdata)) {
$this->setError($this->_db->getErrorMsg());
return false;
}
if (!$row->store()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
$iscrm = $helper->isredCRM();
if ($iscrm) {
$postdata['order_id'] = $row->order_id;
$postdata['debitor_id'] = $postdata['user_info_id'];
JTable::addIncludePath(REDCRM_ADMIN . '/tables');
$crmorder =& $this->getTable('crm_order');
if (!$crmorder->bind($postdata)) {
$this->setError($this->_db->getErrorMsg());
return false;
}
if (!$crmorder->store()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
// Update rma table entry
if (ENABLE_RMA && isset($postdata['rmanotes'])) {
$rmaInfo = $this->getTable('rma_orders');
$rmaInfo->rma_number = $postdata['rma_number'];
$rmaInfo->original_order_id = $postdata['main_order_id'];
$rmaInfo->credit_note_order_id = $row->order_id;
$rmaInfo->rma_note = $postdata['rmanotes'];
$rmaInfo->store();
}
JTable::addIncludePath(REDSHOP_ADMIN . '/tables');
}
$order_shipping = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $row->ship_method_id)));
$rowOrderStatus =& $this->getTable('order_status_log');
$rowOrderStatus->order_id = $row->order_id;
$rowOrderStatus->order_status = $row->order_status;
$rowOrderStatus->date_changed = time();
$rowOrderStatus->customer_note = $row->customer_note;
$rowOrderStatus->store();
$billingaddresses = $order_functions->getBillingAddress($row->user_id);
if (isset($postdata['billisship']) && $postdata['billisship'] == 1) {
$shippingaddresses = $billingaddresses;
} else {
$key = 0;
$shippingaddresses = $order_functions->getShippingAddress($row->user_id);
$shipp_users_info_id = isset($postdata['shipp_users_info_id']) && $postdata['shipp_users_info_id'] != 0 ? $postdata['shipp_users_info_id'] : 0;
if ($shipp_users_info_id != 0) {
for ($o = 0; $o < count($shippingaddresses); $o++) {
if ($shippingaddresses[$o]->users_info_id == $shipp_users_info_id) {
$key = $o;
break;
}
}
}
$shippingaddresses = $shippingaddresses[$key];
}
// ORDER DELIVERY TIME IS REMAINING
$user_id = $row->user_id;
$item = $postdata['order_item'];
for ($i = 0; $i < count($item); $i++) {
$product_id = $item[$i]->product_id;
$quantity = $item[$i]->quantity;
$product_excl_price = $item[$i]->prdexclprice;
$product_price = $item[$i]->productprice;
// Attribute price added
$generateAttributeCart = $rsCarthelper->generateAttributeArray((array) $item[$i], $user_id);
$retAttArr = $producthelper->makeAttributeCart($generateAttributeCart, $product_id, $user_id, 0, $quantity);
$product_attribute = $retAttArr[0];
// Accessory price
$generateAccessoryCart = $rsCarthelper->generateAccessoryArray((array) $item[$i], $user_id);
$retAccArr = $producthelper->makeAccessoryCart($generateAccessoryCart, $product_id, $user_id);
$product_accessory = $retAccArr[0];
$accessory_total_price = $retAccArr[1];
$accessory_vat_price = $retAccArr[2];
$wrapper_price = 0;
$wrapper_vat = 0;
if ($item[$i]->wrapper_data != 0 && $item[$i]->wrapper_data != '') {
$wrapper = $producthelper->getWrapper($product_id, $item[$i]->wrapper_data);
if (count($wrapper) > 0) {
if ($wrapper[0]->wrapper_price > 0) {
$wrapper_vat = $producthelper->getProducttax($product_id, $wrapper[0]->wrapper_price, $user_id);
}
$wrapper_price = $wrapper[0]->wrapper_price + $wrapper_vat;
}
}
//.........这里部分代码省略.........
示例3: explode
?>
"><?php
echo $row->order_id;
?>
</a>
</td>
<td align="center"><?php
echo $row->order_number;
?>
</td>
<td align="center"><?php
echo $row->cdate;
?>
</td>
<td align="center"><?php
$details = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $row->ship_method_id)));
if (strstr($details[0], 'default_shipping')) {
if (file_exists(JPATH_SITE . '/administrator/components/com_redshop/assets/lables/label_' . $row->order_id . '.pdf')) {
?>
<a href="<?php
echo $dlink;
?>
"><?php
echo JText::_('COM_REDSHOP_DOWNLOAD');
?>
</a>
<a href="<?php
echo $plink;
?>
"
target="_blank"><?php
示例4: getShippingRate
public function getShippingRate()
{
$shippinghelper = new shipping();
$get = JRequest::get('get');
$shipping = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $get['shipping_rate_id'])));
$order_shipping = 0;
$order_shipping_class = '';
if (count($shipping) > 4) {
$order_shipping = $shipping[3] - $shipping[6];
$order_shipping_tax = $shipping[6];
$order_shipping_class = $shipping[0];
}
echo "<div id='resultShippingClass'>" . $order_shipping_class . "</div>";
echo "<div id='resultShipping'>" . $order_shipping . "</div>";
echo "<div id='resultShippingVat'>" . $order_shipping_tax . "</div>";
die;
}
示例5: display
public function display($tpl = null)
{
$app = JFactory::getApplication();
$shippinghelper = new shipping();
$order_functions = new order_functions();
$params = $app->getParams('com_redshop');
$option = JRequest::getVar('option');
$Itemid = JRequest::getInt('Itemid');
$issplit = JRequest::getBool('issplit');
$ccinfo = JRequest::getInt('ccinfo');
$task = JRequest::getCmd('task');
$model = $this->getModel('checkout');
$session = JFactory::getSession();
if ($issplit != '') {
$session->set('issplit', $issplit);
}
$payment_method_id = JRequest::getCmd('payment_method_id');
$users_info_id = JRequest::getInt('users_info_id');
$auth = $session->get('auth');
if (empty($users_info_id)) {
$users_info_id = $auth['users_info_id'];
}
$shipping_rate_id = JRequest::getString('shipping_rate_id');
$shippingdetail = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $shipping_rate_id)));
if (count($shippingdetail) < 4) {
$shipping_rate_id = "";
}
$cart = $session->get('cart');
if ($cart['idx'] < 1) {
$msg = JText::_('COM_REDSHOP_EMPTY_CART');
$app->Redirect('index.php?option=' . $option . '&Itemid=' . $Itemid, $msg);
}
if (SHIPPING_METHOD_ENABLE) {
if ($users_info_id < 1) {
$msg = JText::_('COM_REDSHOP_SELECT_SHIP_ADDRESS');
$link = 'index.php?option=' . $option . '&view=checkout&Itemid=' . $Itemid . '&users_info_id=' . $users_info_id . '&shipping_rate_id=' . $shipping_rate_id . '&payment_method_id=' . $payment_method_id;
$app->Redirect($link, $msg);
}
if ($shipping_rate_id == '' && $cart['free_shipping'] != 1) {
$msg = JText::_('COM_REDSHOP_SELECT_SHIP_METHOD');
$link = 'index.php?option=' . $option . '&view=checkout&Itemid=' . $Itemid . '&users_info_id=' . $users_info_id . '&shipping_rate_id=' . $shipping_rate_id . '&payment_method_id=' . $payment_method_id;
$app->Redirect($link, $msg);
}
}
if ($payment_method_id == '') {
$msg = JText::_('COM_REDSHOP_SELECT_PAYMENT_METHOD');
$link = 'index.php?option=' . $option . '&view=checkout&Itemid=' . $Itemid . '&users_info_id=' . $users_info_id . '&shipping_rate_id=' . $shipping_rate_id . '&payment_method_id=' . $payment_method_id;
$app->Redirect($link, $msg);
}
$paymentinfo = $order_functions->getPaymentMethodInfo($payment_method_id);
$paymentinfo = $paymentinfo[0];
$paymentpath = JPATH_SITE . '/plugins/redshop_payment/' . $paymentinfo->element . '/' . $paymentinfo->element . '.xml';
$paymentparams = new JRegistry($paymentinfo->params);
$is_creditcard = $paymentparams->get('is_creditcard', '');
$is_subscription = $paymentparams->get('is_subscription', 0);
if (@$is_creditcard == 1) {
$document = JFactory::getDocument();
JHTML::Script('credit_card.js', 'components/com_redshop/assets/js/', false);
}
if ($is_subscription) {
$subscription_id = $session->set('subscription_id', $subscription_id);
}
$this->cart = $cart;
$this->users_info_id = $users_info_id;
$this->shipping_rate_id = $shipping_rate_id;
$this->payment_method_id = $payment_method_id;
$this->is_creditcard = $is_creditcard;
if ($task != '') {
$tpl = $task;
}
parent::display($tpl);
}
示例6: update_shippingrates
public function update_shippingrates($data)
{
$redhelper = new redhelper();
$shippinghelper = new shipping();
// Get Order Info
$orderdata = $this->getTable('order_detail');
$orderdata->load($this->_id);
if ($data['shipping_rate_id'] != "") {
// Get Shipping rate info Info
$decry = $shippinghelper->decryptShipping(str_replace(" ", "+", $data['shipping_rate_id']));
$neworder_shipping = explode("|", $decry);
if ($data['shipping_rate_id'] != $orderdata->ship_method_id || $neworder_shipping[0] == 'plgredshop_shippingdefault_shipping_GLS') {
if (count($neworder_shipping) > 4) {
// Shipping_rate_value
$orderdata->order_total = $orderdata->order_total - $orderdata->order_shipping + $neworder_shipping[3];
$orderdata->order_shipping = $neworder_shipping[3];
$orderdata->ship_method_id = $data['shipping_rate_id'];
$orderdata->order_shipping_tax = isset($neworder_shipping[6]) && $neworder_shipping[6] ? $neworder_shipping[6] : 0;
$orderdata->mdate = time();
$orderdata->shop_id = $data['shop_id'] . "###" . $data['gls_mobile'];
if (!$orderdata->store()) {
return false;
}
// Economic Integration start for invoice generate
if (ECONOMIC_INTEGRATION == 1) {
$economic = new economic();
$invoiceHandle = $economic->renewInvoiceInEconomic($orderdata);
}
}
}
}
return true;
}
示例7: replaceMessage
public function replaceMessage($message, $orderData, $paymentName)
{
$shippinghelper = new shipping();
$shipping_method = '';
$details = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $orderData->ship_method_id)));
if (count($details) > 1) {
$ext = "";
if (array_key_exists(2, $details)) {
$ext = " (" . $details[2] . ")";
}
$shipping_method = $details[1] . $ext;
}
$producthelper = new producthelper();
$userData = $producthelper->getUserInformation($orderData->user_id);
$message = str_replace('{order_id}', $orderData->order_id, $message);
$message = str_replace('{order_status}', $orderData->order_status, $message);
$message = str_replace('{customer_name}', $userData->firstname, $message);
$message = str_replace('{payment_status}', $orderData->order_payment_status, $message);
$message = str_replace('{order_comment}', $orderData->customer_note, $message);
$message = str_replace('{shipping_method}', $shipping_method, $message);
$message = str_replace('{payment_method}', $paymentName, $message);
return $message;
}
示例8: orderplace
public function orderplace()
{
$app = JFactory::getApplication();
$redconfig = new Redconfiguration();
$quotationHelper = new quotationHelper();
$stockroomhelper = new rsstockroomhelper();
$helper = new redhelper();
$shippinghelper = new shipping();
$order_functions = new order_functions();
$post = JRequest::get('post');
$option = JRequest::getVar('option', 'com_redshop');
$Itemid = JRequest::getVar('Itemid');
$shop_id = JRequest::getVar('shop_id');
$gls_mobile = JRequest::getVar('gls_mobile');
$customer_message = JRequest::getVar('rs_customer_message_ta');
$referral_code = JRequest::getVar('txt_referral_code');
if ($gls_mobile) {
$shop_id = $shop_id . '###' . $gls_mobile;
}
$user = JFactory::getUser();
$session = JFactory::getSession();
$auth = $session->get('auth');
if (!$user->id && $auth['users_info_id']) {
$user->id = -$auth['users_info_id'];
}
$db = JFactory::getDbo();
$issplit = $session->get('issplit');
$url = JURI::root();
// If user subscribe for the newsletter
if (isset($post['newsletter_signup']) && $post['newsletter_signup'] == 1) {
$this->_userhelper->newsletterSubscribe();
}
// If user unsubscribe for the newsletter
if (isset($post['newsletter_signoff']) && $post['newsletter_signoff'] == 1) {
$this->_userhelper->newsletterUnsubscribe();
}
$order_paymentstatus = 'Unpaid';
$objshipping = new shipping();
$users_info_id = JRequest::getInt('users_info_id');
$thirdparty_email = JRequest::getVar('thirdparty_email');
$shippingaddresses = $this->shipaddress($users_info_id);
$billingaddresses = $this->billingaddresses();
if (isset($shippingaddresses)) {
$d["shippingaddress"] = $shippingaddresses;
$d["shippingaddress"]->country_2_code = $redconfig->getCountryCode2($d["shippingaddress"]->country_code);
$d["shippingaddress"]->state_2_code = $redconfig->getStateCode2($d["shippingaddress"]->state_code);
$shippingaddresses->country_2_code = $d["shippingaddress"]->country_2_code;
$shippingaddresses->state_2_code = $d["shippingaddress"]->state_2_code;
}
if (isset($billingaddresses)) {
$d["billingaddress"] = $billingaddresses;
if (isset($billingaddresses->country_code)) {
$d["billingaddress"]->country_2_code = $redconfig->getCountryCode2($billingaddresses->country_code);
$billingaddresses->country_2_code = $d["billingaddress"]->country_2_code;
}
if (isset($billingaddresses->state_code)) {
$d["billingaddress"]->state_2_code = $redconfig->getStateCode2($billingaddresses->state_code);
$billingaddresses->state_2_code = $d["billingaddress"]->state_2_code;
}
}
$cart = $session->get('cart');
if ($cart['idx'] < 1) {
$msg = JText::_('COM_REDSHOP_EMPTY_CART');
$app->Redirect('index.php?option=' . $option . '&Itemid=' . $Itemid, $msg);
}
$ccdata = $session->get('ccdata');
$shipping_rate_id = '';
if ($cart['free_shipping'] != 1) {
$shipping_rate_id = JRequest::getVar('shipping_rate_id');
}
$payment_method_id = JRequest::getVar('payment_method_id');
$ccinfo = JRequest::getVar('ccinfo');
if ($shipping_rate_id && $cart['free_shipping'] != 1) {
$shipArr = $this->calculateShipping($shipping_rate_id);
$cart['shipping'] = $shipArr['order_shipping_rate'];
$cart['shipping_vat'] = $shipArr['shipping_vat'];
}
$cart = $this->_carthelper->modifyDiscount($cart);
$paymentinfo = $this->_order_functions->getPaymentMethodInfo($payment_method_id);
$paymentinfo = $paymentinfo[0];
$paymentparams = new JRegistry($paymentinfo->params);
$paymentinfo = new stdclass();
$paymentinfo->payment_price = $paymentparams->get('payment_price', '');
$paymentinfo->payment_oprand = $paymentparams->get('payment_oprand', '');
$paymentinfo->payment_discount_is_percent = $paymentparams->get('payment_discount_is_percent', '');
if (PAYMENT_CALCULATION_ON == 'subtotal') {
$paymentAmount = $cart['product_subtotal'];
} else {
$paymentAmount = $cart['total'];
}
$paymentArray = $this->_carthelper->calculatePayment($paymentAmount, $paymentinfo, $cart['total']);
$cart['total'] = $paymentArray[0];
$cart = $session->set('cart', $cart);
$cart = $session->get('cart');
$order_shipping = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $shipping_rate_id)));
$order_status = 'P';
$order_status_full = $this->_order_functions->getOrderStatusTitle('P');
// Start code to track duplicate order number checking by parth
$order_number = $this->getOrdernumber();
// End code to track duplicate order number checking by parth
//.........这里部分代码省略.........
示例9: export_fullorder_data
public function export_fullorder_data()
{
$extrafile = JPATH_SITE . '/administrator/components/com_redshop/extras/order_export.php';
if (file_exists($extrafile)) {
require_once JPATH_COMPONENT_ADMINISTRATOR . '/extras/order_export.php';
$orderExport = new orderExport();
$orderExport->createOrderExport();
exit;
}
$producthelper = new producthelper();
$order_function = new order_functions();
$model = $this->getModel('order');
$data = $model->export_data();
$product_count = array();
$db = JFactory::getDbo();
$cid = JRequest::getVar('cid', array(0), 'method', 'array');
$order_id = implode(',', $cid);
$where = "";
$sql = "SELECT order_id,count(order_item_id) as noproduct FROM `#__redshop_order_item` " . $where . " GROUP BY order_id";
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-type: text/x-csv");
header("Content-type: text/csv");
header("Content-type: application/csv");
header('Content-Disposition: attachment; filename=Order.csv');
$db->setQuery($sql);
$no_products = $db->loadObjectList();
for ($i = 0; $i < count($data); $i++) {
$product_count[] = $no_products[$i]->noproduct;
}
$no_products = max($product_count);
$shipping_helper = new shipping();
ob_clean();
echo "Order number, Order status, Order date , Shipping method , Shipping user, Shipping address, Shipping postalcode,\n\t\tShipping city, Shipping country, Company name, Email ,Billing address, Billing postalcode, Billing city, Billing country,\n\t\tBilling User ,";
for ($i = 1; $i <= $no_products; $i++) {
echo JText::_('COM_REDSHOP_PRODUCT_NAME') . $i . ' ,';
echo JText::_('COM_REDSHOP_PRODUCT') . ' ' . JText::_('COM_REDSHOP_PRODUCT_PRICE') . $i . ' ,';
echo JText::_('COM_REDSHOP_PRODUCT_ATTRIBUTE') . $i . ' ,';
}
echo "Order Total\n";
for ($i = 0; $i < count($data); $i++) {
$billing_info = $order_function->getOrderBillingUserInfo($data[$i]->order_id);
$details = explode("|", $shipping_helper->decryptShipping(str_replace(" ", "+", $data[$i]->ship_method_id)));
echo $data[$i]->order_id . ",";
echo utf8_decode($order_function->getOrderStatusTitle($data[$i]->order_status)) . " ,";
echo date('d-m-Y H:i', $data[$i]->cdate) . " ,";
echo str_replace(",", " ", $details[1]) . "(" . str_replace(",", " ", $details[2]) . ") ,";
$shipping_info = $order_function->getOrderShippingUserInfo($data[$i]->order_id);
echo str_replace(",", " ", $shipping_info->firstname) . " " . str_replace(",", " ", $shipping_info->lastname) . " ,";
echo str_replace(",", " ", utf8_decode($shipping_info->address)) . " ,";
echo $shipping_info->zipcode . " ,";
echo str_replace(",", " ", utf8_decode($shipping_info->city)) . " ,";
echo $shipping_info->country_code . " ,";
echo str_replace(",", " ", $shipping_info->company_name) . " ,";
echo $shipping_info->user_email . " ,";
echo str_replace(",", " ", utf8_decode($billing_info->address)) . " ,";
echo $billing_info->zipcode . " ,";
echo str_replace(",", " ", utf8_decode($billing_info->city)) . " ,";
echo $billing_info->country_code . " ,";
echo str_replace(",", " ", $billing_info->firstname) . " " . str_replace(",", " ", $billing_info->lastname) . " ,";
$no_items = $order_function->getOrderItemDetail($data[$i]->order_id);
for ($it = 0; $it < count($no_items); $it++) {
echo str_replace(",", " ", utf8_decode($no_items[$it]->order_item_name)) . " ,";
echo "\"" . REDCURRENCY_SYMBOL . "\"" . $no_items[$it]->product_final_price;
$product_attribute = $producthelper->makeAttributeOrder($no_items[$it]->order_item_id, 0, $no_items[$it]->product_id, 0, 1);
$product_attribute = strip_tags(str_replace(",", " ", $product_attribute->product_attribute));
echo trim(utf8_decode($product_attribute)) . " ,";
}
$temp = $no_products - count($no_items);
if ($temp >= 0) {
echo str_repeat(' ,', $temp * 3);
}
echo "\"" . REDCURRENCY_SYMBOL . "\"" . $data[$i]->order_total . "\n";
}
exit;
}
示例10: createMultiprintInvoicePdf
//.........这里部分代码省略.........
$search[] = "{customer_note}";
$replace[] = $OrdersDetail[0]->customer_note;
// Set order paymethod name
$search[] = "{payment_lbl}";
$replace[] = JText::_('COM_REDSHOP_ORDER_PAYMENT_METHOD');
$search[] = "{payment_method}";
$replace[] = $paymentmethod->order_payment_name;
$statustext = $order_functions->getOrderStatusTitle($OrdersDetail[0]->order_status);
$issplit = $OrdersDetail[0]->split_payment;
$search[] = "{order_status}";
if (trim($OrdersDetail[0]->order_payment_status) == 'Paid') {
$orderPaymentStatus = JText::_('COM_REDSHOP_PAYMENT_STA_PAID');
} elseif (trim($OrdersDetail[0]->order_payment_status) == 'Unpaid') {
$orderPaymentStatus = JText::_('COM_REDSHOP_PAYMENT_STA_UNPAID');
} elseif (trim($OrdersDetail[0]->order_payment_status) == 'Partial Paid') {
$orderPaymentStatus = JText::_('COM_REDSHOP_PAYMENT_STA_PARTIAL_PAID');
} else {
$orderPaymentStatus = $OrdersDetail[0]->order_payment_status;
}
$replace[] = $statustext . " - " . $orderPaymentStatus;
$search[] = "{order_status_order_only}";
$replace[] = $statustext;
$search[] = "{order_status_payment_only}";
$replace[] = $orderPaymentStatus;
$search[] = "{customer_note_lbl}";
$replace[] = JText::_('COM_REDSHOP_COMMENT');
$search[] = "{customer_note}";
$replace[] = $OrdersDetail->customer_note;
$search[] = "{shipping_method_lbl}";
$replace[] = JText::_('COM_REDSHOP_SHIPPING_METHOD_LBL');
$shipping_method = '';
$shipping_rate_name = '';
if ($OrdersDetail[0]->ship_method_id != '') {
$ship_method = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $OrdersDetail[0]->ship_method_id)));
if (count($ship_method) <= 1) {
$ship_method = explode("|", $OrdersDetail[0]->ship_method_id);
}
$shipping_method = "";
$shipping_rate_name = "";
if (count($ship_method) > 0) {
if (array_key_exists(1, $ship_method)) {
$shipping_method = $ship_method[1];
}
if (array_key_exists(2, $ship_method)) {
$shipping_rate_name = $ship_method[2];
}
}
}
$search[] = "{shipping_method}";
$replace[] = $shipping_method;
$search[] = "{shipping}";
$replace[] = $producthelper->getProductFormattedPrice($OrdersDetail[0]->order_shipping);
$search[] = "{shipping_rate_name}";
$replace[] = $shipping_rate_name;
$ordersprint_template = $carthelper->replaceBillingAddress($ordersprint_template, $billing);
$ordersprint_template = $carthelper->replaceShippingAddress($ordersprint_template, $shipping);
$product_name = "";
$product_note = "";
$product_price = "";
$product_quantity = "";
$product_total_price = "";
$template_start = "";
$template_middle = "";
$template_end = "";
if (strstr($ordersprint_template, "{product_loop_start}")) {
$template_sdata = explode('{product_loop_start}', $ordersprint_template);
示例11: createWebPacklabel
public function createWebPacklabel($order_id, $specifiedSendDate, $order_status, $paymentstatus)
{
if (POSTDK_INTEGRATION && ($order_status == "S" && $paymentstatus == "Paid")) {
$shippinghelper = new shipping();
$order_details = $this->getOrderDetails($order_id);
$details = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $order_details->ship_method_id)));
if ($details[0] === 'plgredshop_shippingdefault_shipping' && !$order_details->order_label_create) {
$generate_label = $this->generateParcel($order_id, $specifiedSendDate);
if ($generate_label != "success") {
JError::raiseWarning(21, $generate_label);
}
}
}
}