예제 #1
0
 public function init()
 {
     parent::init();
     $this->_smarty->template_dir = realpath(MOBILE_TEMPLATE_REALDIR);
     $this->_smarty->compile_dir = realpath(MOBILE_COMPILE_REALDIR);
     $this->assignTemplatePath(DEVICE_TYPE_MOBILE);
 }
예제 #2
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 public function process()
 {
     parent::process();
     $objView = new SiteView();
     $objSess = new Session();
     Utils::sfIsSuccess($objSess);
     if (isset($_SESSION['preview']) && $_SESSION['preview'] === 'ON') {
         // プレビュー用のレイアウトデザインを取得
         /* @var $objLayout PageLayoutHelper */
         $objLayout = Application::alias('eccube.helper.page_layout');
         $objLayout->sfGetPageLayout($this, true);
         // 画面の表示
         $objView->assignobj($this);
         $objView->display(SITE_FRAME);
         return;
     }
     Utils::sfDispSiteError(PAGE_ERROR);
 }
예제 #3
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 public function process()
 {
     $objView = new SiteView(false);
     //新着情報を取得
     $arrNews = $this->lfGetNews();
     //キャッシュしない(念のため)
     header('pragma: no-cache');
     //XMLテキスト(これがないと正常にRSSとして認識してくれないツールがあるため)
     header('Content-type: application/xml');
     //新着情報をセット
     $this->arrNews = $arrNews;
     //店名をセット
     $this->site_title = $arrNews[0]['shop_name'];
     //代表Emailアドレスをセット
     $this->email = $arrNews[0]['email'];
     //セットしたデータをテンプレートファイルに出力
     $objView->assignobj($this);
     //画面表示
     $objView->display($this->tpl_mainpage, true);
 }
예제 #4
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     $objView = new SiteView();
     //店舗情報をセット
     $this->arrSiteInfo = Application::alias('eccube.helper.db')->getBasisData();
     //商品IDを取得
     if (isset($_GET['product_id']) && $_GET['product_id'] != '' && is_numeric($_GET['product_id'])) {
         $product_id = $_GET['product_id'];
     } else {
         $product_id = '';
     }
     // モードによって分岐
     $mode = $this->getMode();
     switch ($mode) {
         case 'all':
             $arrProducts = $this->lfGetProductsDetailData($mode, $product_id);
             break;
         case 'list':
             if ($product_id != '' && is_numeric($product_id)) {
                 $arrProducts = $this->lfGetProductsDetailData($mode, $product_id);
             } else {
                 $arrProducts = $this->lfGetProductsListData();
             }
             break;
         default:
             if ($product_id != '' && is_numeric($product_id)) {
                 $arrProducts = $this->lfGetProductsDetailData($mode, $product_id);
             } else {
                 $arrProducts = $this->lfGetProductsAllData();
             }
             break;
     }
     // 商品情報をセット
     $this->arrProducts = $arrProducts;
     // 従来互換 (for 2.11)
     $this->arrProduct =& $this->arrProducts;
     //セットしたデータをテンプレートファイルに出力
     $objView->assignobj($this);
     //キャッシュしない(念のため)
     header('Pragma: no-cache');
     //XMLテキスト(これがないと正常にRSSとして認識してくれないツールがあるため)
     header('Content-type: application/xml');
     P_DETAIL_URLPATH;
     //画面表示
     $objView->display($this->tpl_mainpage, true);
 }
예제 #5
0
 /**
  * パスワード変更お知らせメールを送信する.
  *
  * @param  array  $CONF          店舗基本情報の配列
  * @param  string $email         送信先メールアドレス
  * @param  string $customer_name 送信先氏名
  * @param  string $new_password  変更後の新パスワード
  * @return void
  *
  * FIXME: メールテンプレート編集の方に足すのが望ましい
  */
 public function lfSendMail(&$CONF, $email, $customer_name, $new_password)
 {
     // パスワード変更お知らせメール送信
     $objMailText = new SiteView(false);
     $objMailText->setPage($this);
     $objMailText->assign('customer_name', $customer_name);
     $objMailText->assign('new_password', $new_password);
     $toCustomerMail = $objMailText->fetch('mail_templates/forgot_mail.tpl');
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     // メール送信オブジェクトによる送信処理
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $objHelperMail->sfMakeSubject('パスワードを変更いたしました。'), $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']);
     $objMail->setTo($email, $customer_name . ' 様');
     $objMail->sendMail();
     return;
 }
예제 #6
0
 /**
  * 登録メールを送信する。
  *
  * @param  string  $secret_key  会員固有キー
  * @param  integer $customer_id 会員ID
  * @param  boolean $is_mobile   false(default):PCアドレスにメールを送る true:携帯アドレスにメールを送る
  * @param $resend_flg true  仮登録メール再送
  * @return boolean true:成功 false:失敗
  *  
  */
 public function sfSendRegistMail($secret_key, $customer_id = '', $is_mobile = false, $resend_flg = false)
 {
     // 会員データの取得
     if (Utils::sfIsInt($customer_id)) {
         $arrCustomerData = Application::alias('eccube.helper.customer')->sfGetCustomerDataFromId($customer_id);
     } else {
         $arrCustomerData = Application::alias('eccube.helper.customer')->sfGetCustomerDataFromId('', 'secret_key = ?', array($secret_key));
     }
     if (Utils::isBlank($arrCustomerData)) {
         return false;
     }
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     $objMailText = new SiteView();
     $objMailText->setPage($this->getPage());
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $arrCustomerData['name01']);
     $objMailText->assign('name02', $arrCustomerData['name02']);
     $objMailText->assign('uniqid', $arrCustomerData['secret_key']);
     $objMailText->assignobj($arrCustomerData);
     $objMailText->assignobj($this);
     $objHelperMail = new static();
     // 仮会員が有効の場合
     if (CUSTOMER_CONFIRM_MAIL == true and $arrCustomerData['status'] == 1 or $arrCustomerData['status'] == 1 and $resend_flg == true) {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご確認', $objMailText);
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_mail.tpl');
     } else {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご完了', $objMailText);
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
     }
     /* @var $objSendMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
     // 宛先の設定
     if ($is_mobile) {
         $to_addr = $arrCustomerData['email_mobile'];
     } else {
         $to_addr = $arrCustomerData['email'];
     }
     $objMail->setTo($to_addr, $arrCustomerData['name01'] . $arrCustomerData['name02'] . ' 様');
     $objMail->sendMail();
     return true;
 }
예제 #7
0
 /**
  * 会員登録完了メール送信する
  *
  * @access private
  * @return void
  */
 public function lfSendMail($uniqid, $arrForm)
 {
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     $objMailText = new SiteView();
     $objMailText->setPage($this);
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $arrForm['name01']);
     $objMailText->assign('name02', $arrForm['name02']);
     $objMailText->assign('uniqid', $uniqid);
     $objMailText->assignobj($this);
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     // 仮会員が有効の場合
     if (CUSTOMER_CONFIRM_MAIL == true) {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご確認');
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_mail.tpl');
     } else {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご完了');
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
     }
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
     // 宛先の設定
     $objMail->setTo($arrForm['email'], $arrForm['name01'] . $arrForm['name02'] . ' 様');
     $objMail->sendMail();
 }
예제 #8
0
 /**
  * 退会手続き完了メール送信する
  *
  * @access private
  * @param integer $customer_id 会員ID
  * @return void
  */
 public function lfSendRefusalMail($customer_id)
 {
     // 会員データの取得
     if (Utils::sfIsInt($customer_id)) {
         $arrCustomerData = Application::alias('eccube.helper.customer')->sfGetCustomerDataFromId($customer_id);
     }
     if (Utils::isBlank($arrCustomerData)) {
         return false;
     }
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     $objMailText = new SiteView();
     $objMailText->setPage($this);
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $arrCustomerData['name01']);
     $objMailText->assign('name02', $arrCustomerData['name02']);
     $objMailText->assignobj($this);
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     $subject = $objHelperMail->sfMakeSubject('退会手続きのご完了', $objMailText);
     $toCustomerMail = $objMailText->fetch('mail_templates/customer_refusal_mail.tpl');
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
     $objMail->setTo($arrCustomerData['email'], $arrCustomerData['name01'] . $arrCustomerData['name02'] . ' 様');
     $objMail->sendMail();
 }
예제 #9
0
 /**
  * 正会員登録完了メール送信
  *
  * @param string $registSecretKey
  * @access private
  * @return void
  */
 public function lfSendRegistMail($registSecretKey)
 {
     $objQuery = Application::alias('eccube.query');
     /* @var $objCustomer Customer */
     $objCustomer = Application::alias('eccube.customer');
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     //-- 会員データを取得
     $arrCustomer = $objQuery->select('*', 'dtb_customer', 'secret_key = ?', array($registSecretKey));
     $data = $arrCustomer[0];
     $objCustomer->setLogin($data['email']);
     //-- メール送信
     $objMailText = new SiteView();
     $objMailText->setPage($this);
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $data['name01']);
     $objMailText->assign('name02', $data['name02']);
     $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
     $subject = $objHelperMail->sfMakesubject('会員登録が完了しました。');
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']);
     // 宛先の設定
     $name = $data['name01'] . $data['name02'] . ' 様';
     $objMail->setTo($data['email'], $name);
     $objMail->sendMail();
 }