本文整理汇总了PHP中producthelper::getUserInformation方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getUserInformation方法的具体用法?PHP producthelper::getUserInformation怎么用?PHP producthelper::getUserInformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::getUserInformation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: producthelper
public function &getuserdata()
{
$producthelper = new producthelper();
if ($this->_data->user_id) {
$userdata = $producthelper->getUserInformation($this->_data->user_id);
$this->_data->user_email = $userdata->user_email;
} else {
$detail = new stdClass();
$detail->users_info_id = 0;
$detail->user_id = 0;
$detail->id = 0;
$detail->gid = null;
$detail->name = null;
$detail->username = null;
$detail->email = null;
$detail->password = null;
$detail->usertype = null;
$detail->block = null;
$detail->sendEmail = null;
$detail->registerDate = null;
$detail->lastvisitDate = null;
$detail->activation = null;
$detail->is_company = null;
$detail->firstname = null;
$detail->lastname = null;
$detail->contact_info = null;
$detail->address_type = null;
$detail->company_name = null;
$detail->vat_number = null;
$detail->tax_exempt = 0;
$detail->country_code = null;
$detail->state_code = null;
$detail->shopper_group_id = null;
$detail->published = 1;
$detail->address = null;
$detail->city = null;
$detail->zipcode = null;
$detail->phone = null;
$detail->requesting_tax_exempt = 0;
$detail->tax_exempt_approved = 0;
$detail->approved = 1;
$userdata = $detail;
}
return $userdata;
}
示例2: 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;
}
示例3: producthelper
* @copyright Copyright (C) 2005 - 2013 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die;
JHTML::_('behavior.tooltip');
require_once JPATH_COMPONENT_SITE . '/helpers/product.php';
$producthelper = new producthelper();
$session = JFactory::getSession();
$post = JRequest::get('get');
$ordertotal = $post['ordertotal'];
$ordersubtotal = $post['ordersubtotal'];
$productarr = $post['productarr'];
$qntarr = $post['qntarr'];
$user_id = $post['order_user_id'];
$shipp_users_info_id = $post['shipp_users_info_id'];
$userinfo = $producthelper->getUserInformation($user_id, "BT");
if ($shipp_users_info_id == 0 && count($userinfo) > 0) {
$shipp_users_info_id = $userinfo->users_info_id;
}
$productItem = explode(",", $productarr);
$qntItem = explode(",", $qntarr);
$cart = array();
for ($pi = 0; $pi < count($productItem); $pi++) {
$cart[$pi]['product_id'] = $productItem[$pi];
$cart[$pi]['quantity'] = $qntItem[$pi];
}
$cart['idx'] = count($cart);
$this->billing = $userinfo;
$session->set('order_user_id', $user_id);
$session->set('shipp_users_info_id', $shipp_users_info_id);
$session->set('ordertotal', $ordertotal);
示例4: usercreate
//.........这里部分代码省略.........
JLoader::import('joomla.user.helper');
$user->set('block', '0');
}
if ($data['is_company'] == 1) {
$tmp = @explode(" ", $data['contact_person']);
$name = @$tmp[0] . ' ' . $tmp[1];
$name = JRequest::getVar('username');
} else {
$name = JRequest::getVar('firstname') . ' ' . JRequest::getVar('lastname');
}
$email = JRequest::getVar('email');
$password = $order_functions->random_gen_enc_key(12);
// Disallow control chars in the email
$password = preg_replace('/[\\x00-\\x1F\\x7F]/', '', $password);
$user->password = md5($password);
$user->set('name', $name);
$user->name = $name;
// If there was an error with registration, set the message and display form
if (!$user->save()) {
JError::raiseWarning('', JText::_($user->getError()));
return false;
}
$user_id = $user->id;
$user->set('id', 0);
if ($useractivation == 1) {
$message = JText::_('COM_REDSHOP_REG_COMPLETE_ACTIVATE');
} else {
$message = JText::_('COM_REDSHOP_REG_COMPLETE');
}
// Creating Joomla user end
$row = $this->getTable('user_detail');
$row->user_id = $user_id;
if (!$row->bind($data)) {
$this->setError($this->_db->getErrorMsg());
return false;
}
if ($data['is_company'] == 1) {
if (SHOPPER_GROUP_DEFAULT_COMPANY != 0) {
$row->shopper_group_id = SHOPPER_GROUP_DEFAULT_COMPANY;
} else {
$row->shopper_group_id = 2;
}
} else {
if (SHOPPER_GROUP_DEFAULT_PRIVATE != 0) {
$row->shopper_group_id = SHOPPER_GROUP_DEFAULT_PRIVATE;
} else {
$row->shopper_group_id = 1;
}
}
if ($data['is_company'] == 1) {
$tmp = explode(" ", $data['contact_person']);
$row->firstname = $tmp[0];
$row->lastname = $tmp[1];
}
$row->user_email = $user->email;
$row->address_type = 'BT';
if (!$row->store()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
$email = $user->email;
$quotation_id = $quotationDetail->quotation_id;
$quotationdetailurl = JURI::root() . 'index.php?option=com_redshop&view=quotation_detail&quoid=' . $quotation_id . '&encr=' . $quotationDetail->quotation_encrkey;
$mailbody = '<table>';
$mailbody .= '<tr><td>' . JText::_('COM_REDSHOP_USERNAME') . '</td><td> : </td><td>' . $data['username'] . '</td></tr>';
$mailbody .= '<tr><td>' . JText::_('COM_REDSHOP_PASSWORD') . '</td><td> : </td><td>' . $password . '</td></tr>';
$mailbody .= '<tr><td>' . JText::_('COM_REDSHOP_QUOTATION_DETAILS') . '</td><td> : </td><td><a href="' . $quotationdetailurl . '">' . JText::_("COM_REDSHOP_QUOTATION_DETAILS") . '</a></td></tr>';
$mailbody .= '</table>';
$mailsubject = 'Register';
$mailbcc = null;
$mailinfo = $redshopMail->getMailtemplate(0, "quotation_user_register");
if (count($mailinfo) > 0) {
$mailbody = $mailinfo[0]->mail_body;
$mailsubject = $mailinfo[0]->mail_subject;
if (trim($mailinfo[0]->mail_bcc) != "") {
$mailbcc = explode(",", $mailinfo[0]->mail_bcc);
}
}
$producthelper = new producthelper();
$session = JFactory::getSession();
$cart = $session->get('cart');
$user = JFactory::getUser();
$cart['user_id'] = $user_id;
$user_data = $producthelper->getUserInformation($user_id);
$cart['user_info_id'] = $user_data->users_info_id;
$quotationDetail = $this->store($cart);
$this->sendQuotationMail($quotationDetail->quotation_id);
$link = "<a href='" . $quotationdetailurl . "'>" . JText::_("COM_REDSHOP_QUOTATION_DETAILS") . "</a>";
$mailbody = str_replace('{link}', $link, $mailbody);
$mailbody = str_replace('{username}', $name, $mailbody);
$mailbody = str_replace('{password}', $name, $mailbody);
JFactory::getMailer()->sendMail($MailFrom, $FromName, $email, $mailsubject, $mailbody, 1, null, $mailbcc);
$session = JFactory::getSession();
$session->set('cart', null);
$session->set('ccdata', null);
$session->set('issplit', null);
$session->set('userfiled', null);
unset($_SESSION['ccdata']);
return;
}
示例5:
</th>
<th width="10%" nowrap="nowrap">
<?php
echo JHTML::_('grid.sort', 'COM_REDSHOP_QUOTATION_DATE', 'quotation_cdate', $this->lists['order_Dir'], $this->lists['order']);
?>
</th>
</tr>
</thead>
<?php
$k = 0;
for ($i = 0, $n = count($this->quotation); $i < $n; $i++) {
$row =& $this->quotation[$i];
$row->id = $row->quotation_id;
$display = $row->user_email;
if ($row->user_id) {
$userarr = $producthelper->getUserInformation($row->user_id);
if (count($userarr) > 0) {
$display = $userarr->firstname . ' ' . $userarr->lastname;
$display .= $userarr->is_company && $userarr->company_name != "" ? "<br>" . $userarr->company_name : "";
}
}
$link = JRoute::_('index.php?option=' . $option . '&view=quotation_detail&task=edit&cid[]=' . $row->quotation_id);
$status = $quotationHelper->getQuotationStatusName($row->quotation_status);
if ($row->quotation_status == 5) {
// $orderlink = JRoute::_( 'index.php?option='.$option.'&view=order_detail&task=edit&cid[]='.$row->order_id );
// $status .= " <a href='".$orderlink."'>(".JText::_('COM_REDSHOP_ORDER_ID')."-".$row->order_id." )</a>";
$status .= " (" . JText::_('COM_REDSHOP_ORDER_ID') . "-" . $row->order_id . " )";
}
?>
<tr class="<?php
echo "row{$k}";