*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2015 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
* @version SVN: $Id$
* @link http://www.magic3.org
if (!isset(self::$_mainDb)) self::$_mainDb = new ec_mainDb();
// Eコマース定義を読み込む
- if (!isset(self::$_configArray)) self::$_configArray = photo_shopCommonDef::loadConfig(self::$_mainDb);
+ if (!isset(self::$_configArray)) self::$_configArray = ec_mainCommonDef::loadConfig(self::$_mainDb);
}
/**
* テンプレートに前処理
$menuText .= '<li ' . $current . '><a href="'. $this->getUrl($link, true) .'"><span>商品カテゴリー</span></a></li>' . M3_NL;
// フォト商品
- if (self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_PHOTO)){ // フォト商品販売を行う場合
+ if (self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_PHOTO)){ // フォト商品販売を行う場合
$current = '';
$link = $this->_baseUrl . '&task=photoproduct';
if ($task == 'photoproduct' || $task == 'photoproduct_detail') $current = 'id="current"';
if ($this->getMsgCount() == 0){ // エラーのないとき
// アイキャッチ画像を非公開ディレクトリに保存
- $privateThumbDir = $this->gInstance->getImageManager()->getSystemPrivateThumbPath(M3_VIEW_TYPE_PRODUCT, photo_shopCommonDef::$_deviceType);
+ $privateThumbDir = $this->gInstance->getImageManager()->getSystemPrivateThumbPath(M3_VIEW_TYPE_PRODUCT, ec_mainCommonDef::$_deviceType);
$ret = mvFileToDir($tmpDir, $filenames, $privateThumbDir);
// 画像を公開ディレクトリにコピー
- $publicThumbDir = $this->gInstance->getImageManager()->getSystemThumbPath(M3_VIEW_TYPE_PRODUCT, photo_shopCommonDef::$_deviceType);
+ $publicThumbDir = $this->gInstance->getImageManager()->getSystemThumbPath(M3_VIEW_TYPE_PRODUCT, ec_mainCommonDef::$_deviceType);
if ($ret) $ret = cpFileToDir($privateThumbDir, $filenames, $publicThumbDir);
// サムネール作成元画像のパスをresourceディレクトリからの相対パスに変換
if ($this->getMsgCount() == 0){ // エラーのないとき
// 公開ディレクトリ、非公開ディレクトリの画像を削除
- $publicThumbDir = $this->gInstance->getImageManager()->getSystemThumbPath(M3_VIEW_TYPE_PRODUCT, photo_shopCommonDef::$_deviceType);
- $privateThumbDir = $this->gInstance->getImageManager()->getSystemPrivateThumbPath(M3_VIEW_TYPE_PRODUCT, photo_shopCommonDef::$_deviceType);
+ $publicThumbDir = $this->gInstance->getImageManager()->getSystemThumbPath(M3_VIEW_TYPE_PRODUCT, ec_mainCommonDef::$_deviceType);
+ $privateThumbDir = $this->gInstance->getImageManager()->getSystemPrivateThumbPath(M3_VIEW_TYPE_PRODUCT, ec_mainCommonDef::$_deviceType);
for ($i = 0; $i < count($filenames); $i++){
$publicThumbPath = $publicThumbDir . DIRECTORY_SEPARATOR . $filenames[$i];
$privateThumbPath = $privateThumbDir . DIRECTORY_SEPARATOR . $filenames[$i];
// ### 現在設定されているアイキャッチ画像 ###
// 最大サイズのアイキャッチ画像を取得。公開ディレクトリになければデフォルト画像を表示。
- $eyecatchUrl = photo_shopCommonDef::getEyecatchImageUrl($row['pt_thumb_filename'], self::$_configArray[photo_shopCommonDef::CF_E_PRODUCT_DEFAULT_IMAGE]);
+ $eyecatchUrl = ec_mainCommonDef::getEyecatchImageUrl($row['pt_thumb_filename'], self::$_configArray[ec_mainCommonDef::CF_E_PRODUCT_DEFAULT_IMAGE]);
// ### 置き換え用アイキャッチ画像 ###
// 画像ファイル名、フォーマット取得
// 記事内でアイキャッチ画像に使用した画像を取得
/* $originalEyecatchUrl = '';
- $privateThumbDir = $this->gInstance->getImageManager()->getSystemPrivateThumbPath(M3_VIEW_TYPE_PRODUCT, photo_shopCommonDef::$_deviceType);
+ $privateThumbDir = $this->gInstance->getImageManager()->getSystemPrivateThumbPath(M3_VIEW_TYPE_PRODUCT, ec_mainCommonDef::$_deviceType);
$imagePath = $privateThumbDir . '/' . $filename;
if (!empty($row['pt_thumb_filename']) && !file_exists($imagePath)){// 画像が作成されていて、非公開ディレクトリに画像がない場合
// アイキャッチを作成したソース画像を取得
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: admin_ec_mainMemberWidgetContainer.php 5572 2013-01-23 08:43:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_ec_mainBaseWidgetContainer.php');
$fax = $request->trimValueOf('fax'); // FAX
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->gender = $request->trimValueOf('gender'); // 性別
$birthday = $request->trimValueOf('birthday');
if (!empty($birthday)) $birthday = $this->convertToProperDate($birthday); // 生年月日
$this->checkMailAddress($email, 'Eメール');
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->checkDate($birthday, '生年月日', true);
}
// 個人情報登録
$personOptions = array();
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$personOptions[self::PERSON_INFO_OPT_SPORTS] = $sports;
if (empty($birthday)) $birthday = $this->gEnv->getInitValueOfDate();
} else {
// 個人情報登録
$personOptions = array();
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$personOptions[self::PERSON_INFO_OPT_SPORTS] = $sports;
if (empty($birthday)) $birthday = $this->gEnv->getInitValueOfDate();
} else {
$ret = $this->_db->updateLoginUserPassword($loginUserId, $password);
if ($ret){
//$fromAddress = self::$_mainDb->getConfig(self::AUTO_EMAIL_SENDER); // 自動送信送信元
- $fromAddress = $this->_getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
+ $fromAddress = $this->_getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
if (empty($fromAddress)) $fromAddress = $this->gEnv->getSiteEmail();// 送信元が取得できないときは、システムのデフォルトメールアドレスを使用
$toAddress = $this->convertToDispString($row['pi_email']); // eメール(ログインアカウント)
//$loginParam = 'task=login&act=ec_maillogin&account=' . urlencode($toAddress) . '&pwd=' . urlencode($password);// ログイン用パラメータ
//$url = $this->gPage->createWidgetCmdUrl(self::TARGET_WIDGET, ''/*送信元ウィジェット指定なし*/, $loginParam, $this->gEnv->getDefaultPageId());
- //$url = $this->gEnv->createCurrentPageUrl() . sprintf(photo_shopCommonDef::EMAIL_LOGIN_URL, urlencode($toAddress), urlencode($password)); // ログイン用URL
+ //$url = $this->gEnv->createCurrentPageUrl() . sprintf(ec_mainCommonDef::EMAIL_LOGIN_URL, urlencode($toAddress), urlencode($password)); // ログイン用URL
//$url = $this->gPage->getDefaultPageUrlByWidget($this->gEnv->getCurrentWidgetId(),
- // sprintf(photo_shopCommonDef::EMAIL_LOGIN_URL, urlencode($toAddress), urlencode($password))); // ログイン用URL
- $url = photo_shopCommonDef::createLoginUrl($toAddress, $password); // ログイン用URL
+ // sprintf(ec_mainCommonDef::EMAIL_LOGIN_URL, urlencode($toAddress), urlencode($password))); // ログイン用URL
+ $url = ec_mainCommonDef::createLoginUrl($toAddress, $password); // ログイン用URL
$mailParam = array();
$mailParam['PASSWORD'] = $password;
$mailParam['URL'] = $this->getUrl($url, true); // ログイン用URL
- $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
+ $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
$ret = $this->gInstance->getMailManager()->sendFormMail(2/*手動送信*/, $this->gEnv->getCurrentWidgetId(), $toAddress, $fromAddress, '', '',
- photo_shopCommonDef::MAIL_FORM_SEND_PASSWORD, $mailParam);// 手動送信
+ ec_mainCommonDef::MAIL_FORM_SEND_PASSWORD, $mailParam);// 手動送信
// パスワード変更のメッセージ
$this->tmpl->addVar("_widget", "pwd_message", '新規パスワード: ' . $password);
$phone = $row['ad_phone']; // 電話番号
$fax = $row['ad_fax']; // FAX
$updateUser = $row['lu_name']; // 更新者
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->gender = $row['pi_gender']; // 性別
$birthday = $row['pi_birthday']; // 生年月日
}
$ret = $this->db->getPersonInfo($personId, $row, $personOptions);
if ($ret){
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$sports = $personOptions[self::PERSON_INFO_OPT_SPORTS]; // 現在やってるスポーツ
}
}
}
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->setAttribute('script_member_info_option', 'visibility', 'visible'); // スクリプト表示
$this->tmpl->setAttribute('show_member_info_option', 'visibility', 'visible');
}
$this->tmpl->addVar("_widget", "update_dt", $this->convertToDispDateTime($updateDt)); // 更新日時
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
// 性別
if ($this->gender == 0){ // 未設定のとき
$this->tmpl->addVar("show_member_info_option", "gender_none", 'selected');
$this->tmpl->addVar("_widget", "fax_disabled", 'disabled'); // FAX
$this->tmpl->addVar("_widget", "state_disabled", 'disabled'); // 都道府県
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->addVar("show_member_info_option", "birthday_disabled", 'disabled'); // 生年月日
$this->tmpl->addVar("show_member_info_option", "calender_disabled", 'disabled'); // カレンダー
$this->tmpl->addVar("show_member_info_option", "gender_disabled", 'disabled'); // 性別
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2015 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
* @version SVN: $Id$
* @link http://www.magic3.org
$enableUpdate = true; // データ更新可能かどうか
// 入金日付がない場合は一旦入金済みを実行した後終了可能
- if ($this->orderStatus == photo_shopCommonDef::ORDER_STATUS_CLOSE && $row['or_pay_dt'] == $this->gEnv->getInitValueOfTimestamp()){
+ if ($this->orderStatus == ec_mainCommonDef::ORDER_STATUS_CLOSE && $row['or_pay_dt'] == $this->gEnv->getInitValueOfTimestamp()){
$this->setAppErrorMsg('入金日時が設定されていません。一旦「受注ステータス」を「入金済み」に更新してから「終了」に変更してください。');
$enableUpdate = false; // データ更新不可
}
if ($enableUpdate){
$payUpdate = false; // 入金状況を更新するかどうか
- if ($row['or_order_status'] != photo_shopCommonDef::ORDER_STATUS_PAYMENT_COMPLETED &&
- $this->orderStatus == photo_shopCommonDef::ORDER_STATUS_PAYMENT_COMPLETED) $payUpdate = true;
+ if ($row['or_order_status'] != ec_mainCommonDef::ORDER_STATUS_PAYMENT_COMPLETED &&
+ $this->orderStatus == ec_mainCommonDef::ORDER_STATUS_PAYMENT_COMPLETED) $payUpdate = true;
// 受注状態が「入金済み」に設定のときは支払い日時を更新
$payDt = $row['or_pay_dt'];
$this->_userId, $this->now, $newOrderId, $newSerial, $row['or_discount_desc'], $payDt);
// キャンセルの場合は在庫を戻す
- if ($this->_getConfig(photo_shopCommonDef::CF_E_AUTO_STOCK) && $this->orderStatus == photo_shopCommonDef::ORDER_STATUS_CANCEL){
+ if ($this->_getConfig(ec_mainCommonDef::CF_E_AUTO_STOCK) && $this->orderStatus == ec_mainCommonDef::ORDER_STATUS_CANCEL){
$this->cancelStock = true; // 在庫キャンセル処理を行うかどうか
$this->db->getOrderDetailList($row['or_id'], $this->_langId, array($this, '_defaultOrderItemLoop'));
$this->cancelStock = false;
$postPrice = $this->convertToDispString($fetchedRow['cu_post_symbol']); // 価格表示用
switch ($productClass){
- case photo_shopCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
$photoId = $fetchedRow['ht_public_id']; // 公開画像ID
$title = $fetchedRow['ht_name']; // サムネール画像タイトル
$checkValue = $photoId; // 項目チェック値
if (!$fetchedRow['ht_visible']) $priceAvailable = false; // 商品が表示不可のときは価格を無効とする
// 画像価格情報を取得
- $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, photo_shopCommonDef::STANDARD_PRICE, $this->_langId, $row);
+ $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, ec_mainCommonDef::STANDARD_PRICE, $this->_langId, $row);
// 画像詳細へのリンク
$url = $this->gEnv->getDefaultUrl() . '?' . M3_REQUEST_PARAM_PHOTO_ID . '=' . $photoId;
// 画像URL
- $imageUrl = $this->gEnv->getResourceUrl() . photo_shopCommonDef::THUMBNAIL_DIR . '/' . $photoId . '_' . photo_shopCommonDef::DEFAULT_THUMBNAIL_SIZE . '.' . photo_shopCommonDef::DEFAULT_IMAGE_EXT;
+ $imageUrl = $this->gEnv->getResourceUrl() . ec_mainCommonDef::THUMBNAIL_DIR . '/' . $photoId . '_' . ec_mainCommonDef::DEFAULT_THUMBNAIL_SIZE . '.' . ec_mainCommonDef::DEFAULT_IMAGE_EXT;
break;
- case photo_shopCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
$title = $fetchedRow['pt_name']; // サムネール画像タイトル
$checkValue = $productId; // 項目チェック値
$url = $this->gEnv->getDefaultUrl() . '?' . M3_REQUEST_PARAM_PRODUCT_ID . '=' . $productId;
// 画像URL
- $imageArray = $this->_getImage($imageRows, photo_shopCommonDef::PRODUCT_IMAGE_SMALL);// 商品画像小
+ $imageArray = $this->_getImage($imageRows, ec_mainCommonDef::PRODUCT_IMAGE_SMALL);// 商品画像小
$imageUrl = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $imageArray['im_url']);
// 在庫キャンセル処理
// 価格を取得
$price = $row['pp_price']; // 価格
$currency = $row['pp_currency_id']; // 通貨
- $taxType = photo_shopCommonDef::TAX_TYPE; // 税種別
+ $taxType = ec_mainCommonDef::TAX_TYPE; // 税種別
// 価格作成
$this->ecObj->setCurrencyType($currency, $this->_langId); // 通貨設定
$nameLink = '<a href="' . $urlLink . '">' . $this->convertToDispString($productName) . '</a>';
// サムネール
- $photoImage = '<a href="' . $urlLink . '"><img src="' . $this->getUrl($imageUrl) . '" width="' . photo_shopCommonDef::CART_ICON_SIZE . '" height="' . photo_shopCommonDef::CART_ICON_SIZE .
+ $photoImage = '<a href="' . $urlLink . '"><img src="' . $this->getUrl($imageUrl) . '" width="' . ec_mainCommonDef::CART_ICON_SIZE . '" height="' . ec_mainCommonDef::CART_ICON_SIZE .
'" title="' . $this->convertToDispString($title) . '" alt="' . $this->convertToDispString($title) . '" style="border:none;" /></a>';
if (!$this->cancelStock && empty($this->updateContentAccess)){ // コンテンツアクセス権の設定でないとき
$selected = 'selected';
}
$optionStr = '';
- if ($fetchedRow['os_id'] == photo_shopCommonDef::ORDER_STATUS_CANCEL ||
- $fetchedRow['os_id'] == photo_shopCommonDef::ORDER_STATUS_PAYMENT_COMPLETED){
+ if ($fetchedRow['os_id'] == ec_mainCommonDef::ORDER_STATUS_CANCEL ||
+ $fetchedRow['os_id'] == ec_mainCommonDef::ORDER_STATUS_PAYMENT_COMPLETED){
$optionStr = '*';
}
$row = array(
{
// ダウンロードコンテンツのIDを取得
$this->updateContentAccess = true; // コンテンツアクセス権の設定かどうか
- $this->productClass = photo_shopCommonDef::PRODUCT_CLASS_PHOTO; // 商品クラス(フォトギャラリー画像)
- $this->productType = photo_shopCommonDef::PRODUCT_TYPE_DOWNLOAD; // 商品タイプ(ダウンロード画像)
+ $this->productClass = ec_mainCommonDef::PRODUCT_CLASS_PHOTO; // 商品クラス(フォトギャラリー画像)
+ $this->productType = ec_mainCommonDef::PRODUCT_TYPE_DOWNLOAD; // 商品タイプ(ダウンロード画像)
$this->contentIdArray = array(); // コンテンツID
$this->db->getOrderDetailList($orderId, $this->gEnv->getCurrentLanguage(), array($this, '_defaultOrderItemLoop'));
$this->updateContentAccess = false; // コンテンツアクセス権の設定かどうか
$tmpl->addVar('_tmpl', 'deliv_address', $delivAddress);
// 送信元
- $shopName = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_NAME); // ショップ名
- $shopOwner = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_OWNER); // ショップオーナー名
- $shopZipcode = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_ZIPCODE); // ショップ郵便番号
- $shopAddress = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_ADDRESS); // ショップ住所
- $shopPhone = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_PHONE); // ショップ電話番号
+ $shopName = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_NAME); // ショップ名
+ $shopOwner = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_OWNER); // ショップオーナー名
+ $shopZipcode = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_ZIPCODE); // ショップ郵便番号
+ $shopAddress = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_ADDRESS); // ショップ住所
+ $shopPhone = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_PHONE); // ショップ電話番号
$fromAddress = '';
if (!empty($shopName)) $fromAddress .= $this->convertToDispString($shopName) . '<br />';
$isErr = false;
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_ACCEPT_ORDER, $acceptOrder)) $isErr = true;
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_ACCEPT_ORDER, $acceptOrder)) $isErr = true;
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER, $nonMemberOrder)) $isErr = true;// 非会員からの注文受付
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER, $nonMemberOrder)) $isErr = true;// 非会員からの注文受付
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_AUTO_STOCK, $autoStock)) $isErr = true;
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_AUTO_STOCK, $autoStock)) $isErr = true;
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_USE_EMAIL, $useEmail)) $isErr = true;
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_USE_EMAIL, $useEmail)) $isErr = true;
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER, $autoEmailSender)) $isErr = true;
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER, $autoEmailSender)) $isErr = true;
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_PHOTO, $sellProductPhoto)) $isErr = true;// フォト商品販売
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_PHOTO, $sellProductPhoto)) $isErr = true;// フォト商品販売
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_DOWNLOAD, $sellProductDownload)) $isErr = true;// ダウンロード商品販売
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_DOWNLOAD, $sellProductDownload)) $isErr = true;// ダウンロード商品販売
}
/* if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_CONTENT_NO_STOCK, $contentNoStock)) $isErr = true; // 在庫なし時コンテンツ
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_CONTENT_NO_STOCK, $contentNoStock)) $isErr = true; // 在庫なし時コンテンツ
}*/
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_MEMBER_NOTICE, $memberNotice)) $isErr = true; // 会員向けお知らせ
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_MEMBER_NOTICE, $memberNotice)) $isErr = true; // 会員向けお知らせ
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT, $emailToOrderProduct)) $isErr = true; // 商品受注時送信先メールアドレス
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT, $emailToOrderProduct)) $isErr = true; // 商品受注時送信先メールアドレス
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_CATEGORY_SELECT_COUNT, $categorySelectCount)) $isErr = true; // 商品カテゴリー選択可能数
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_CATEGORY_SELECT_COUNT, $categorySelectCount)) $isErr = true; // 商品カテゴリー選択可能数
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SHOP_NAME, $shopName)) $isErr = true; // ショップ名
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SHOP_NAME, $shopName)) $isErr = true; // ショップ名
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SHOP_OWNER, $shopOwner)) $isErr = true; // ショップオーナー名
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SHOP_OWNER, $shopOwner)) $isErr = true; // ショップオーナー名
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SHOP_ZIPCODE, $shopZipcode)) $isErr = true; // ショップ郵便番号
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SHOP_ZIPCODE, $shopZipcode)) $isErr = true; // ショップ郵便番号
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SHOP_ADDRESS, $shopAddress)) $isErr = true; // ショップ住所
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SHOP_ADDRESS, $shopAddress)) $isErr = true; // ショップ住所
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SHOP_PHONE, $shopPhone)) $isErr = true; // ショップ電話番号
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SHOP_PHONE, $shopPhone)) $isErr = true; // ショップ電話番号
}
if (!$isErr){
- if (!self::$_mainDb->updateConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE, $shopSignature)) $isErr = true; // ショップ署名
+ if (!self::$_mainDb->updateConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE, $shopSignature)) $isErr = true; // ショップ署名
}
if (!$isErr){
- if (!$this->updateMailForm(photo_shopCommonDef::MAIL_FORM_SEND_PASSWORD, $mailFormSendPwd)) $isErr = true;// メールフォーム(パスワード送信)
+ if (!$this->updateMailForm(ec_mainCommonDef::MAIL_FORM_SEND_PASSWORD, $mailFormSendPwd)) $isErr = true;// メールフォーム(パスワード送信)
}
if (!$isErr){
- if (!$this->updateMailForm(photo_shopCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER, $mailFormOrderProduct)) $isErr = true;// メールフォーム(注文受付)
+ if (!$this->updateMailForm(ec_mainCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER, $mailFormOrderProduct)) $isErr = true;// メールフォーム(注文受付)
}
if ($isErr){
$this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
$this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
}
// 値を再取得
- $acceptOrder = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_ACCEPT_ORDER);
- $nonMemberOrder = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER); // 非会員からの注文受付
- $autoStock = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_AUTO_STOCK);// 在庫自動処理を行うかどうか
- $useEmail = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_USE_EMAIL);
- $autoEmailSender = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER);
- $sellProductPhoto = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_PHOTO); // フォト商品販売
- $sellProductDownload = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_DOWNLOAD); // ダウンロード商品販売
-// $contentNoStock = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_CONTENT_NO_STOCK); // 在庫なし時コンテンツ
- $memberNotice = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_MEMBER_NOTICE); // 会員向けお知らせ
- $emailToOrderProduct = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT); // 商品受注時送信先メールアドレス
- $categorySelectCount = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_CATEGORY_SELECT_COUNT); // 商品カテゴリー選択可能数
- $shopName = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_NAME); // ショップ名
- $shopOwner = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_OWNER); // ショップオーナー名
- $shopZipcode = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_ZIPCODE); // ショップ郵便番号
- $shopAddress = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_ADDRESS); // ショップ住所
- $shopPhone = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_PHONE); // ショップ電話番号
- $shopSignature = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE); // ショップ署名
- $mailFormSendPwd = $this->getMailForm(photo_shopCommonDef::MAIL_FORM_SEND_PASSWORD); // メールフォーム(パスワード送信)
- $mailFormOrderProduct = $this->getMailForm(photo_shopCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER); // メールフォーム(注文受付)
+ $acceptOrder = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_ACCEPT_ORDER);
+ $nonMemberOrder = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER); // 非会員からの注文受付
+ $autoStock = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_AUTO_STOCK);// 在庫自動処理を行うかどうか
+ $useEmail = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_USE_EMAIL);
+ $autoEmailSender = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER);
+ $sellProductPhoto = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_PHOTO); // フォト商品販売
+ $sellProductDownload = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_DOWNLOAD); // ダウンロード商品販売
+// $contentNoStock = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_CONTENT_NO_STOCK); // 在庫なし時コンテンツ
+ $memberNotice = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_MEMBER_NOTICE); // 会員向けお知らせ
+ $emailToOrderProduct = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT); // 商品受注時送信先メールアドレス
+ $categorySelectCount = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_CATEGORY_SELECT_COUNT); // 商品カテゴリー選択可能数
+ $shopName = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_NAME); // ショップ名
+ $shopOwner = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_OWNER); // ショップオーナー名
+ $shopZipcode = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_ZIPCODE); // ショップ郵便番号
+ $shopAddress = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_ADDRESS); // ショップ住所
+ $shopPhone = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_PHONE); // ショップ電話番号
+ $shopSignature = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE); // ショップ署名
+ $mailFormSendPwd = $this->getMailForm(ec_mainCommonDef::MAIL_FORM_SEND_PASSWORD); // メールフォーム(パスワード送信)
+ $mailFormOrderProduct = $this->getMailForm(ec_mainCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER); // メールフォーム(注文受付)
}
} else { // 初期表示の場合
- $acceptOrder = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_ACCEPT_ORDER);
- $nonMemberOrder = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER); // 非会員からの注文受付
- $autoStock = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_AUTO_STOCK);// 在庫自動処理を行うかどうか
- $useEmail = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_USE_EMAIL);
- $autoEmailSender = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER);
- $sellProductPhoto = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_PHOTO); // フォト商品販売
- $sellProductDownload = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SELL_PRODUCT_DOWNLOAD); // ダウンロード商品販売
-// $contentNoStock = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_CONTENT_NO_STOCK); // 在庫なし時コンテンツ
- $memberNotice = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_MEMBER_NOTICE); // 会員向けお知らせ
- $emailToOrderProduct = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT); // 商品受注時送信先メールアドレス
- $categorySelectCount = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_CATEGORY_SELECT_COUNT); // 商品カテゴリー選択可能数
- $shopName = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_NAME); // ショップ名
- $shopOwner = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_OWNER); // ショップオーナー名
- $shopZipcode = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_ZIPCODE); // ショップ郵便番号
- $shopAddress = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_ADDRESS); // ショップ住所
- $shopPhone = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_PHONE); // ショップ電話番号
- $shopSignature = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE); // ショップ署名
- $mailFormSendPwd = $this->getMailForm(photo_shopCommonDef::MAIL_FORM_SEND_PASSWORD); // メールフォーム(パスワード送信)
- $mailFormOrderProduct = $this->getMailForm(photo_shopCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER); // メールフォーム(注文受付)
+ $acceptOrder = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_ACCEPT_ORDER);
+ $nonMemberOrder = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER); // 非会員からの注文受付
+ $autoStock = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_AUTO_STOCK);// 在庫自動処理を行うかどうか
+ $useEmail = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_USE_EMAIL);
+ $autoEmailSender = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER);
+ $sellProductPhoto = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_PHOTO); // フォト商品販売
+ $sellProductDownload = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SELL_PRODUCT_DOWNLOAD); // ダウンロード商品販売
+// $contentNoStock = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_CONTENT_NO_STOCK); // 在庫なし時コンテンツ
+ $memberNotice = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_MEMBER_NOTICE); // 会員向けお知らせ
+ $emailToOrderProduct = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT); // 商品受注時送信先メールアドレス
+ $categorySelectCount = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_CATEGORY_SELECT_COUNT); // 商品カテゴリー選択可能数
+ $shopName = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_NAME); // ショップ名
+ $shopOwner = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_OWNER); // ショップオーナー名
+ $shopZipcode = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_ZIPCODE); // ショップ郵便番号
+ $shopAddress = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_ADDRESS); // ショップ住所
+ $shopPhone = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_PHONE); // ショップ電話番号
+ $shopSignature = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE); // ショップ署名
+ $mailFormSendPwd = $this->getMailForm(ec_mainCommonDef::MAIL_FORM_SEND_PASSWORD); // メールフォーム(パスワード送信)
+ $mailFormOrderProduct = $this->getMailForm(ec_mainCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER); // メールフォーム(注文受付)
}
// 画面に書き戻す
$checked = '';
$this->sortKeyType = array('index'/*表示順*/, 'stock'/*在庫数*/, 'id'/*商品ID*/, 'date'/*更新日時*/, 'name'/*商品名*/, 'code'/*商品コード*/, 'price'/*商品価格*/, 'visible'/*公開状態*/);
$this->imageTypes = array('s', 'm', 'l'); // 画像タイプ
- $this->categoryCount = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_CATEGORY_SELECT_COUNT); // カテゴリー選択可能数
+ $this->categoryCount = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_CATEGORY_SELECT_COUNT); // カテゴリー選択可能数
if ($this->categoryCount <= 0) $this->categoryCount = self::DEFAULT_CATEGORY_COUNT;
}
/**
$defaultImageLHeight = $row['is_height'];
}
// 作成画像フォーマット
- $imageFormat_s = $defaultImageSWidth . 'x' . $defaultImageSHeight . photo_shopCommonDef::DEFAULT_PRODUCT_IMAGE_TYPE;
- $imageFormat_m = $defaultImageMWidth . 'x' . $defaultImageMHeight . photo_shopCommonDef::DEFAULT_PRODUCT_IMAGE_TYPE;
- $imageFormat_l = $defaultImageLWidth . 'x' . $defaultImageLHeight . photo_shopCommonDef::DEFAULT_PRODUCT_IMAGE_TYPE;
+ $imageFormat_s = $defaultImageSWidth . 'x' . $defaultImageSHeight . ec_mainCommonDef::DEFAULT_PRODUCT_IMAGE_TYPE;
+ $imageFormat_m = $defaultImageMWidth . 'x' . $defaultImageMHeight . ec_mainCommonDef::DEFAULT_PRODUCT_IMAGE_TYPE;
+ $imageFormat_l = $defaultImageLWidth . 'x' . $defaultImageLHeight . ec_mainCommonDef::DEFAULT_PRODUCT_IMAGE_TYPE;
$imageFormat = $imageFormat_s . ';' . $imageFormat_m . ';' . $imageFormat_l;
// 商品一覧へ戻す値
$this->categoryArray = $this->getCategory($row5);
// アイキャッチ画像
- $iconUrl = photo_shopCommonDef::getEyecatchImageUrl($row['pt_thumb_filename'], self::$_configArray[photo_shopCommonDef::CF_E_PRODUCT_DEFAULT_IMAGE], self::$_configArray[photo_shopCommonDef::CF_E_THUMB_TYPE], 's'/*sサイズ画像*/) . '?' . date('YmdHis');
+ $iconUrl = ec_mainCommonDef::getEyecatchImageUrl($row['pt_thumb_filename'], self::$_configArray[ec_mainCommonDef::CF_E_PRODUCT_DEFAULT_IMAGE], self::$_configArray[ec_mainCommonDef::CF_E_THUMB_TYPE], 's'/*sサイズ画像*/) . '?' . date('YmdHis');
if (empty($row['pt_thumb_filename'])){
$iconTitle = 'アイキャッチ画像未設定';
} else {
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainAgreememberWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
$act = $request->trimValueOf('act');
if ($act == 'agree'){ // 会員規約に同意のとき
// セッションの会員規約同意状態を更新
- $this->setWidgetSession(photo_shopCommonDef::SK_AGREE_MEMBER, 1);
+ $this->setWidgetSession(ec_mainCommonDef::SK_AGREE_MEMBER, 1);
// 会員登録画面へ遷移
$regmemberPage = $this->gEnv->createCurrentPageUrl() . '&task=regmember';
}
// 会員規約を取得
$content = '';
- if (self::$_mainDb->getContentByKey(photo_shopCommonDef::AGREE_MEMBER_TEXT_KEY, $this->_langId, $row)){
+ if (self::$_mainDb->getContentByKey(ec_mainCommonDef::AGREE_MEMBER_TEXT_KEY, $this->_langId, $row)){
$content = $row['cn_html'];
}
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainBaseWidgetContainer.php 5453 2012-12-09 12:27:50Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainCommonDef.php');
if (!isset(self::$_ecObj)) self::$_ecObj = $this->gInstance->getObject(self::PRICE_OBJ_ID);
// Eコマース定義を読み込む
- if (!isset(self::$_configArray)) self::$_configArray = photo_shopCommonDef::loadConfig(self::$_mainDb);
+ if (!isset(self::$_configArray)) self::$_configArray = ec_mainCommonDef::loadConfig(self::$_mainDb);
$this->_langId = $this->gEnv->getCurrentLanguage();
$this->_userId = $this->gEnv->getCurrentUserId();
$this->_now = date("Y/m/d H:i:s"); // 現在日時
// 商品クラス表示順
- $productClassOrder = array( photo_shopCommonDef::PRODUCT_CLASS_PHOTO, // フォトギャラリー画像
- photo_shopCommonDef::PRODUCT_CLASS_DEFAULT); // 一般商品
+ $productClassOrder = array( ec_mainCommonDef::PRODUCT_CLASS_PHOTO, // フォトギャラリー画像
+ ec_mainCommonDef::PRODUCT_CLASS_DEFAULT); // 一般商品
// 注文処理プロセス
//if (!isset(self::$_orderProcessTasks)){
}
}
/*
- if (in_array(photo_shopCommonDef::PRODUCT_CLASS_DEFAULT, self::$_productClass)){ // 一般商品を含むとき
+ if (in_array(ec_mainCommonDef::PRODUCT_CLASS_DEFAULT, self::$_productClass)){ // 一般商品を含むとき
self::$_orderProcessTasks = array( 'delivery', // 配送先入力
'delivmethod', // 配送方法選択
'payment', // 支払い
$appoint_dt = $this->gEnv->getInitValueOfTimestamp(); // 予定納期
// 金額を初期化
- $currency_id = photo_shopCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
+ $currency_id = ec_mainCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
$subtotal = 0; // 商品合計
$deliv_fee = 0; // 配送料
$charge = 0; // 手数料
$titleArray = array();
$descArray = array(); // 説明
- $ret = self::$_orderDb->getAllIWidgetMethod(photo_shopCommonDef::IWIDGET_METHOD_CALC_ORDER, $this->_langId, $rows);
+ $ret = self::$_orderDb->getAllIWidgetMethod(ec_mainCommonDef::IWIDGET_METHOD_CALC_ORDER, $this->_langId, $rows);
for ($i = 0; $i < count($rows); $i++){
$iWidgetId = $rows[$i]['id_iwidget_id']; // インナーウィジェットID
if (!empty($iWidgetId)){
$postPrice = $this->convertToDispString($fetchedRow['cu_post_symbol']); // 価格表示用
switch ($productClass){
- case photo_shopCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
$photoId = $fetchedRow['ht_public_id']; // 公開画像ID
$title = $fetchedRow['ht_name']; // サムネール画像タイトル
//$productTypeName = $fetchedRow['py_name']; // 商品タイプ名
//$productTypeCode = $fetchedRow['py_code']; // 商品タイプコード
- if ($productType == photo_shopCommonDef::PRODUCT_TYPE_DOWNLOAD){ // ダウンロード商品の場合
+ if ($productType == ec_mainCommonDef::PRODUCT_TYPE_DOWNLOAD){ // ダウンロード商品の場合
$productTypeName = $fetchedRow['py_name']; // 商品タイプ名
$productTypeCode = $fetchedRow['py_code']; // 商品タイプコード
} else { // フォト関連商品の場合
}
// 表示用の商品名、商品コード作成
- $productName = sprintf(photo_shopCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
- $productCode = sprintf(photo_shopCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
+ $productName = sprintf(ec_mainCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
+ $productCode = sprintf(ec_mainCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
// 商品の状態
if (!$fetchedRow['ht_visible']) $priceAvailable = false; // 商品が表示不可のときは価格を無効とする
// 画像価格情報を取得
- $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, photo_shopCommonDef::STANDARD_PRICE, $this->_langId, $row);
+ $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, ec_mainCommonDef::STANDARD_PRICE, $this->_langId, $row);
break;
- case photo_shopCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
// 商品内容
$this->_isExistsDefaultProduct = true; // 一般商品が含まれているかどうか
// 価格を取得
$price = $row['pp_price']; // 価格
$currency = $row['pp_currency_id']; // 通貨
- $taxType = photo_shopCommonDef::TAX_TYPE; // 税種別
+ $taxType = ec_mainCommonDef::TAX_TYPE; // 税種別
// 価格作成
self::$_ecObj->setCurrencyType($currency, $this->_langId); // 通貨設定
$productName, $productCode, $price, $quantity, $tax, $subtotal, $this->_userId, $this->_now);
// ##### 在庫数を更新 #####
- if ($productClass == photo_shopCommonDef::PRODUCT_CLASS_DEFAULT){ // 一般商品のとき
- if ($this->_getConfig(photo_shopCommonDef::CF_E_AUTO_STOCK)){
+ if ($productClass == ec_mainCommonDef::PRODUCT_CLASS_DEFAULT){ // 一般商品のとき
+ if ($this->_getConfig(ec_mainCommonDef::CF_E_AUTO_STOCK)){
$newStockCount = intval($row['pe_stock_count']) - $quantity;
if ($newStockCount < 0) $newStockCount = 0;
$updateParam = array('pe_stock_count' => $newStockCount);
$postPrice = $this->convertToDispString($fetchedRow['cu_post_symbol']); // 価格表示用
switch ($productClass){
- case photo_shopCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
$photoId = $fetchedRow['ht_public_id']; // 公開画像ID
$title = $fetchedRow['ht_name']; // サムネール画像タイトル
$checkValue = $photoId; // 項目チェック値
- if ($productType == photo_shopCommonDef::PRODUCT_TYPE_DOWNLOAD){ // ダウンロード商品の場合
+ if ($productType == ec_mainCommonDef::PRODUCT_TYPE_DOWNLOAD){ // ダウンロード商品の場合
$productTypeName = $fetchedRow['py_name']; // 商品タイプ名
$productTypeCode = $fetchedRow['py_code']; // 商品タイプコード
} else { // フォト関連商品の場合
$productName = $fetchedRow['od_product_name']; // 商品名
$productCode = $fetchedRow['od_product_code']; // 商品コード
} else {
- $productName = sprintf(photo_shopCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
- $productCode = sprintf(photo_shopCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
+ $productName = sprintf(ec_mainCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
+ $productCode = sprintf(ec_mainCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
}
// 商品の状態
if (!$fetchedRow['ht_visible']) $priceAvailable = false; // 商品が表示不可のときは価格を無効とする
// 画像価格情報を取得
- $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, photo_shopCommonDef::STANDARD_PRICE, $this->_langId, $row);
+ $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, ec_mainCommonDef::STANDARD_PRICE, $this->_langId, $row);
// 画像詳細へのリンク
$url = $this->gEnv->getDefaultUrl() . '?' . M3_REQUEST_PARAM_PHOTO_ID . '=' . $photoId;
// 画像URL
- $imageUrl = $this->gEnv->getResourceUrl() . photo_shopCommonDef::THUMBNAIL_DIR . '/' . $photoId . '_' . photo_shopCommonDef::DEFAULT_THUMBNAIL_SIZE . '.' . photo_shopCommonDef::DEFAULT_IMAGE_EXT;
- $imageWidth = photo_shopCommonDef::CART_ICON_SIZE;
- $imageHeight = photo_shopCommonDef::CART_ICON_SIZE;
+ $imageUrl = $this->gEnv->getResourceUrl() . ec_mainCommonDef::THUMBNAIL_DIR . '/' . $photoId . '_' . ec_mainCommonDef::DEFAULT_THUMBNAIL_SIZE . '.' . ec_mainCommonDef::DEFAULT_IMAGE_EXT;
+ $imageWidth = ec_mainCommonDef::CART_ICON_SIZE;
+ $imageHeight = ec_mainCommonDef::CART_ICON_SIZE;
break;
- case photo_shopCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
$title = $fetchedRow['pt_name']; // サムネール画像タイトル
$checkValue = $productId; // 項目チェック値
$url = $this->gEnv->getDefaultUrl() . '?' . M3_REQUEST_PARAM_PRODUCT_ID . '=' . $productId;
// 画像URL
- $imageArray = $this->_getImage($imageRows, photo_shopCommonDef::PRODUCT_IMAGE_SMALL);// 商品画像小
+ $imageArray = $this->_getImage($imageRows, ec_mainCommonDef::PRODUCT_IMAGE_SMALL);// 商品画像小
$imageUrl = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $imageArray['im_url']);
$imagePath = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getSystemRootPath(), $imageArray['im_url']);
if (!file_exists($imagePath)){
$imageHeight = $this->_productImageHeight;
// ##### 在庫自動処理 #####
- if (!$this->_createEmailData/*Eメール出力でない場合*/ && $this->_getConfig(photo_shopCommonDef::CF_E_AUTO_STOCK)){
+ if (!$this->_createEmailData/*Eメール出力でない場合*/ && $this->_getConfig(ec_mainCommonDef::CF_E_AUTO_STOCK)){
if (!$this->_useOrderDetail){ // カート内容を取得の場合
// カートの購入数と在庫数を比較し、在庫数が少ない場合はメッセージ出力
$stockCount = intval($row['pe_stock_count']);
// 価格を取得
$price = $row['pp_price']; // 価格
$currency = $row['pp_currency_id']; // 通貨
- $taxType = photo_shopCommonDef::TAX_TYPE; // 税種別
+ $taxType = ec_mainCommonDef::TAX_TYPE; // 税種別
// 価格作成
self::$_ecObj->setCurrencyType($currency, $this->_langId); // 通貨設定
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainCartWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
$this->request = $request;
$index = $request->trimValueOf('index'); // 処理対象項目インデックス
$backUrl = $request->trimValueOf('backurl'); // 戻り先URL
- $defaultCurrency = photo_shopCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
+ $defaultCurrency = ec_mainCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
// クッキー読み込み、カートIDを取得
$cartId = $request->getCookieValue(M3_COOKIE_CART_ID);
$checkVal = $request->trimValueOf('checkvalue_' . $index);
switch ($productClass){
- case photo_shopCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
$checkId = $cartItemRow['ht_public_id'];
break;
- case photo_shopCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
$checkId = $cartItemRow['pt_id'];
break;
}
// 画像情報を取得
$this->_productImageWidth = 0; // 商品画像幅
$this->_productImageHeight = 0; // 商品画像高さ
- $ret = self::$_mainDb->getProductImageInfo(photo_shopCommonDef::PRODUCT_IMAGE_SMALL, $row);
+ $ret = self::$_mainDb->getProductImageInfo(ec_mainCommonDef::PRODUCT_IMAGE_SMALL, $row);
if ($ret){
$this->_productImageWidth = $row['is_width'];
$this->_productImageHeight = $row['is_height'];
$this->tmpl->setAttribute('no_item_message', 'visibility', 'visible');
}
// 注文受付停止中は購入ボタンを不可にする(システム管理者以外)
- if (!$this->gEnv->isSystemAdmin() && !$this->_getConfig(photo_shopCommonDef::CF_E_ACCEPT_ORDER)){
+ if (!$this->gEnv->isSystemAdmin() && !$this->_getConfig(ec_mainCommonDef::CF_E_ACCEPT_ORDER)){
$this->tmpl->addVar("show_cart", "order_msg", 'ただ今、一時的に注文処理を停止しています');
$this->tmpl->addVar("show_cart", "order_disabled", 'disabled');
}
$itemIndex++;
switch ($productClass){
- case photo_shopCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_PHOTO: // フォトギャラリー画像のとき
$checkId = $fetchedRow['ht_public_id'];
if ($checkVal != $checkId) return true;// 入力チェックエラーの場合は終了
if (!$fetchedRow['ht_visible']) $priceAvailable = false; // 商品が表示不可のときは価格を無効とする
// 画像価格情報を取得
- $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, photo_shopCommonDef::STANDARD_PRICE, $this->_langId, $row);
+ $ret = self::$_mainDb->getPhotoInfoWithPrice($productId, $productClass, $productType, ec_mainCommonDef::STANDARD_PRICE, $this->_langId, $row);
break;
- case photo_shopCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
+ case ec_mainCommonDef::PRODUCT_CLASS_DEFAULT: // 一般商品のとき
$checkId = $fetchedRow['pt_id'];
if ($checkVal != $checkId) return true;// 入力チェックエラーの場合は終了
// 価格を取得
$price = $row['pp_price']; // 価格
$currency = $row['pp_currency_id']; // 通貨
- $taxType = photo_shopCommonDef::TAX_TYPE; // 税種別
+ $taxType = ec_mainCommonDef::TAX_TYPE; // 税種別
// 価格作成
self::$_ecObj->setCurrencyType($currency, $this->_langId); // 通貨設定
* @version SVN: $Id$
* @link http://www.magic3.org
*/
-class photo_shopCommonDef
+class ec_mainCommonDef
{
static $_deviceType = 0; // デバイスタイプ(PC)
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainConfirmWidgetContainer.php 5572 2013-01-23 08:43:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
function _assign($request, &$param)
{
$this->now = date("Y/m/d H:i:s"); // 現在日時
- $this->currency = photo_shopCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
+ $this->currency = ec_mainCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
// クッキー読み込み、カートIDを取得
$this->cartId = $request->getCookieValue(M3_COOKIE_CART_ID);
// 画像情報を取得
$this->_productImageWidth = 0; // 商品画像幅
$this->_productImageHeight = 0; // 商品画像高さ
- $ret = self::$_mainDb->getProductImageInfo(photo_shopCommonDef::PRODUCT_IMAGE_SMALL, $row);
+ $ret = self::$_mainDb->getProductImageInfo(ec_mainCommonDef::PRODUCT_IMAGE_SMALL, $row);
if ($ret){
$this->_productImageWidth = $row['is_width'];
$this->_productImageHeight = $row['is_height'];
self::$_orderDb->startTransaction();
// 受注ヘッダ作成
- $orderStatus = photo_shopCommonDef::ORDER_STATUS_REGIST;
+ $orderStatus = ec_mainCommonDef::ORDER_STATUS_REGIST;
$estimateDt = $this->gEnv->getInitValueOfTimestamp();
$registDt = $this->now;
$orderDt = $this->gEnv->getInitValueOfTimestamp();
$this->_orderText .= '合計 ' . $prePrice . self::$_ecObj->convertByCurrencyFormat($this->currency, $this->_langId, $total) . $postPrice . M3_NL; // 合計
// ######## 受注情報をメール送信 ########
- $stateName = self::$_orderDb->getStateName(photo_shopCommonDef::DEFAULT_COUNTRY_ID, $this->_langId, $this->state); // 都道府県
+ $stateName = self::$_orderDb->getStateName(ec_mainCommonDef::DEFAULT_COUNTRY_ID, $this->_langId, $this->state); // 都道府県
$adminUrl = $this->gEnv->getDefaultAdminUrl() . '?task=configwidget_' . self::ORDER_ADMIN_WIDGET; // 管理画面URL
$adminUrl .= '&' . M3_REQUEST_PARAM_OPERATION_TODO . '=' . urlencode(M3_REQUEST_PARAM_OPERATION_TASK . '=order_detail&orderno=' . $orderNo);
$this->sendOrderMail(0/*新規登録*/, $orderNo, $memberNo, $email, $memberName/*会員名*/,
// 決済完了処理
if ($ret){
// 注文状態を支払い完了にする
- $this->updateOrderStatus($this->orderId, photo_shopCommonDef::ORDER_STATUS_PAYMENT_COMPLETED);
+ $this->updateOrderStatus($this->orderId, ec_mainCommonDef::ORDER_STATUS_PAYMENT_COMPLETED);
// 購入完了処理
- //photo_shopCommonDef::purchaseProduct(self::$_orderDb, $this->orderId);
+ //ec_mainCommonDef::purchaseProduct(self::$_orderDb, $this->orderId);
$this->setDownloadContentAccess($this->_userId/*画像購入ユーザ*/, $this->orderId);
}
}
$ret = $this->cancelService($payMethodRow);
// 注文をキャンセル
- if ($ret) $this->updateOrderStatus($this->orderId, photo_shopCommonDef::ORDER_STATUS_CANCEL);
+ if ($ret) $this->updateOrderStatus($this->orderId, ec_mainCommonDef::ORDER_STATUS_CANCEL);
// カートの状態のオンライン決済中を終了
self::$_ecObj->db->updateOrderSheetStatus($this->_userId, 0);
// 決済完了のときは支払い日時を設定
$payDt = $row['or_pay_dt'];
- if ($status == photo_shopCommonDef::ORDER_STATUS_PAYMENT_COMPLETED) $payDt = $this->now;
+ if ($status == ec_mainCommonDef::ORDER_STATUS_PAYMENT_COMPLETED) $payDt = $this->now;
// 受注ヘッダ作成
$ret = self::$_orderDb->updateOrder($row['or_serial'], $row['or_user_id'], $row['or_language_id'], $row['or_order_no'],
// ダウンロードコンテンツのIDを取得
$this->_useOrderDetail = true; // カート内容でなく、受注内容を取得
$this->_updateContentAccess = true; // コンテンツアクセス権の設定かどうか
- $this->_selectProductClass = photo_shopCommonDef::PRODUCT_CLASS_PHOTO; // 商品クラス(フォトギャラリー画像)
- $this->_selectProductType = photo_shopCommonDef::PRODUCT_TYPE_DOWNLOAD; // 商品タイプ(ダウンロード画像)
+ $this->_selectProductClass = ec_mainCommonDef::PRODUCT_CLASS_PHOTO; // 商品クラス(フォトギャラリー画像)
+ $this->_selectProductType = ec_mainCommonDef::PRODUCT_TYPE_DOWNLOAD; // 商品タイプ(ダウンロード画像)
$this->_contentIdArray = array(); // コンテンツID
self::$_orderDb->getOrderDetailList($orderId, $this->gEnv->getCurrentLanguage(), array($this, '_defaultCartLoop'));
$this->_useOrderDetail = false; // カート内容でなく、受注内容を取得
function sendOrderMail($mailType, $orderNo, $memberNo, $email, $memberName, $delivName, $nameKana, $zipcode, $state, $address1, $address2, $phone,
$demandDt, $demandTime, $delivMethod, $payMethod, $note, $orderDetail, $orderText, $adminUrl)
{
- $fromAddress = $this->_getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
+ $fromAddress = $this->_getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
if (empty($fromAddress)) $fromAddress = $this->gEnv->getSiteEmail();// 送信元が取得できないときは、システムのデフォルトメールアドレスを使用
- $toAddress = $this->_getConfig(photo_shopCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT); // 商品受注時送信先メールアドレス
+ $toAddress = $this->_getConfig(ec_mainCommonDef::CF_E_EMAIL_TO_ORDER_PRODUCT); // 商品受注時送信先メールアドレス
if (empty($toAddress)) $toAddress = $this->gEnv->getSiteEmail();// 送信先が取得できないときは、システムのデフォルトメールアドレスを使用
// 件名の設定
$mailParam['ORDER_TEXT'] = $orderText; // 注文内容
$mailParam['ADMIN_URL'] = $adminUrl . ' '; // 管理画面URL
$ret = $this->gInstance->getMailManager()->sendFormMail(1/*自動送信*/, $this->gEnv->getCurrentWidgetId(), $toAddress, $fromAddress, ''/*返信先*/,
- $subject/*件名*/, photo_shopCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_SHOP_MANAGER, $mailParam);// 自動送信
+ $subject/*件名*/, ec_mainCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_SHOP_MANAGER, $mailParam);// 自動送信
// ##### 購入者にメールを送信 #####
if (empty($email)) return $ret; // 送信先が設定されていないときは送信しない
- $fromAddress = $this->_getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
+ $fromAddress = $this->_getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
if (empty($fromAddress)) $fromAddress = $this->gEnv->getSiteEmail();// 送信元が取得できないときは、システムのデフォルトメールアドレスを使用
$toAddress = $email;
$mailParam = array();
$mailParam['NAME'] = $memberName;
- $mailParam['SHOP_NAME'] = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_NAME); // ショップ名
+ $mailParam['SHOP_NAME'] = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_NAME); // ショップ名
$mailParam['DELIV_TEXT'] = $delivText;
$mailParam['ORDER_TEXT'] = $orderText; // 注文内容
- $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
+ $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
$ret = $this->gInstance->getMailManager()->sendFormMail(1/*自動送信*/, $this->gEnv->getCurrentWidgetId(), $toAddress, $fromAddress, ''/*返信先*/,
- ''/*件名*/, photo_shopCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER, $mailParam);// 自動送信
+ ''/*件名*/, ec_mainCommonDef::MAIL_FORM_ORDER_PRODUCT_TO_CUSTOMER, $mailParam);// 自動送信
}
}
?>
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainDelivmethodWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
*/
function _assign($request, &$param)
{
- $defaultCurrency = photo_shopCommonDef::DEFAULT_CURRENCY; // 通貨
+ $defaultCurrency = ec_mainCommonDef::DEFAULT_CURRENCY; // 通貨
// 初期データ取得
// クッキー読み込み、カートIDを取得。カートの商品を集計する(配送料金の計算に必要)
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainLoginWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
$this->tmpl->addVar("_widget", "message", 'ログインに失敗しました');
}
- //} else if ($act == photo_shopCommonDef::EMAIL_LOGIN_ACT){ // メールからの会員ログインのとき
+ //} else if ($act == ec_mainCommonDef::EMAIL_LOGIN_ACT){ // メールからの会員ログインのとき
} else { // 初期画面
// Eメールのリンクでのログインの場合
if ($task == 'emaillogin'){
$this->tmpl->setAttribute('field_regmember', 'visibility', 'hidden');// 会員登録への遷移を削除
} else {
// 非会員の購入を許可している場合は、遷移可能にする
- $value = $this->_getConfig(photo_shopCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER);
+ $value = $this->_getConfig(ec_mainCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER);
if (!empty($value)){
$this->tmpl->setAttribute('field_nonmember', 'visibility', 'visible');
//$this->tmpl->addVar("field_nonmember", "url_order", $this->getUrl($this->gEnv->createCurrentPageUrl() . '&task=order', true)); // 購入画面遷移用
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainMemberinfoWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
function _assign($request, &$param)
{
$now = date("Y/m/d H:i:s"); // 現在日時
- $countryId = photo_shopCommonDef::DEFAULT_COUNTRY_ID; // デフォルト国ID
+ $countryId = ec_mainCommonDef::DEFAULT_COUNTRY_ID; // デフォルト国ID
$firstname = $request->trimValueOf('item_firstname'); // 名前(名)
$familyname = $request->trimValueOf('item_familyname'); // 名前(姓)
$act = $request->trimValueOf('act');
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->gender = $request->trimValueOf('item_gender'); // 性別
$this->year = $request->trimValueOf('item_year'); // 生年月日(年)
$this->month = $request->trimValueOf('item_month'); // 生年月日(月)
$this->checkInput($firstnameKana, '名前カナ(名)');
// 住所登録が必要なとき追加分
-/* if ($this->_getConfig(photo_shopCommonDef::CF_E_USE_MEMBER_ADDRESS)){ // 住所登録が必要なとき
+/* if ($this->_getConfig(ec_mainCommonDef::CF_E_USE_MEMBER_ADDRESS)){ // 住所登録が必要なとき
$this->checkSingleByte($zipcode, '郵便番号');
$this->checkNumeric($this->state, '都道府県');
$this->checkInput($address, '住所');
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->checkInput($this->gender, '性別');
if (empty($this->year) || empty($this->month) || empty($this->day)) $this->setUserErrorMsg('生年月日が入力されていません');
$this->checkInput($sports, '現在やっているスポーツ');
// 個人情報登録
$personOptions = array();
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$personOptions[self::PERSON_INFO_OPT_SPORTS] = $sports;
$birthday = $this->convertToProperDate($this->year . '/' . $this->month . '/' . $this->day);
} else {
$this->state = $addressRow['ad_state_id'];
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->gender = $personRow['pi_gender'];
$this->timestampToYearMonthDay($personRow['pi_birthday'], $this->year, $this->month, $this->day);
$sports = $personOptions[self::PERSON_INFO_OPT_SPORTS];
}
}
// ##### フォトギャラリー追加分 #####
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->setAttribute('show_member_info_option', 'visibility', 'visible');
// 性別選択メニュー作成
}
// 住所入力エリア表示制御
- if ($this->_getConfig(photo_shopCommonDef::CF_E_USE_MEMBER_ADDRESS)) $this->tmpl->setAttribute('input_address', 'visibility', 'visible');
+ if ($this->_getConfig(ec_mainCommonDef::CF_E_USE_MEMBER_ADDRESS)) $this->tmpl->setAttribute('input_address', 'visibility', 'visible');
// 入力値を戻す
$this->tmpl->addVar("_widget", "firstname", $firstname);
$this->tmpl->addVar("_widget", "email", $email);
$this->tmpl->addVar("_widget", "email2", $email2);
$this->tmpl->addVar("_widget", "old_email", $oldemail);
- if ($this->_getConfig(photo_shopCommonDef::CF_E_USE_MEMBER_ADDRESS)){ // 住所登録が必要なとき
+ if ($this->_getConfig(ec_mainCommonDef::CF_E_USE_MEMBER_ADDRESS)){ // 住所登録が必要なとき
$this->tmpl->addVar("input_address", "zipcode", $zipcode);
$this->tmpl->addVar("input_address", "address", $address);
$this->tmpl->addVar("input_address", "address2", $address2);
$this->db->getAllState('JPN', $this->_langId, array($this, 'stateLoop'));
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->addVar("show_member_info_option", "sports", $sports); // 現在やっているスポーツ
}
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainMembernoticeWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
function _assign($request, &$param)
{
// 会員向けお知らせを取得
- $notice = $this->_getConfig(photo_shopCommonDef::CF_E_MEMBER_NOTICE);
+ $notice = $this->_getConfig(ec_mainCommonDef::CF_E_MEMBER_NOTICE);
$this->tmpl->addVar("_widget", "notice", $notice);
}
}
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainPurchasehistoryWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
function _assign($request, &$param)
{
$now = date("Y/m/d H:i:s"); // 現在日時
- $this->currency = photo_shopCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
+ $this->currency = ec_mainCommonDef::DEFAULT_CURRENCY; // デフォルト通貨
// 画像情報を取得
$this->_productImageWidth = 0; // 商品画像幅
$this->_productImageHeight = 0; // 商品画像高さ
- $ret = self::$_mainDb->getProductImageInfo(photo_shopCommonDef::PRODUCT_IMAGE_SMALL, $row);
+ $ret = self::$_mainDb->getProductImageInfo(ec_mainCommonDef::PRODUCT_IMAGE_SMALL, $row);
if ($ret){
$this->_productImageWidth = $row['is_width'];
$this->_productImageHeight = $row['is_height'];
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainRegmemberWidgetContainer.php 5572 2013-01-23 08:43:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
function _assign($request, &$param)
{
$now = date("Y/m/d H:i:s"); // 現在日時
- $countryId = photo_shopCommonDef::DEFAULT_COUNTRY_ID; // デフォルト国ID
+ $countryId = ec_mainCommonDef::DEFAULT_COUNTRY_ID; // デフォルト国ID
$firstname = $request->trimValueOf('item_firstname'); // 名前(名)
$familyname = $request->trimValueOf('item_familyname'); // 名前(姓)
$firstnameKana = $request->trimValueOf('item_firstname_kana'); // 名前カナ(名)
$fax = $request->trimValueOf('item_fax'); // FAX
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->gender = $request->trimValueOf('item_gender'); // 性別
$this->year = $request->trimValueOf('item_year'); // 生年月日(年)
$this->month = $request->trimValueOf('item_month'); // 生年月日(月)
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->checkInput($this->gender, '性別');
if (empty($this->year) || empty($this->month) || empty($this->day)) $this->setUserErrorMsg('生年月日が入力されていません');
$this->checkInput($sports, '現在やっているスポーツ');
$this->tmpl->addVar("_widget", "state", $this->state); // 都道府県の値は非表示パラメータに持つ
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->addVar("show_member_info_option", "gender_disabled", 'disabled'); // 性別
$this->tmpl->addVar("show_member_info_option", "year_disabled", 'disabled'); // 生年月日(年)
$this->tmpl->addVar("show_member_info_option", "month_disabled", 'disabled'); // 生年月日(月)
// 個人情報登録
$personOptions = array();
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$personOptions[self::PERSON_INFO_OPT_SPORTS] = $sports;
$birthday = $this->convertToProperDate($this->year . '/' . $this->month . '/' . $this->day);
} else {
$this->tmpl->addVar("_widget", "state_disabled", 'disabled');
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->addVar("show_member_info_option", "gender_disabled", 'disabled'); // 性別
$this->tmpl->addVar("show_member_info_option", "year_disabled", 'disabled'); // 生年月日(年)
$this->tmpl->addVar("show_member_info_option", "month_disabled", 'disabled'); // 生年月日(月)
}
// ####### 会員登録完了のメールを送信する #######
- if ($this->_getConfig(photo_shopCommonDef::CF_E_USE_EMAIL)){// メール送信許可のときはメールを送信
- $fromAddress = $this->_getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
+ if ($this->_getConfig(ec_mainCommonDef::CF_E_USE_EMAIL)){// メール送信許可のときはメールを送信
+ $fromAddress = $this->_getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
if (empty($fromAddress)) $fromAddress = $this->gEnv->getSiteEmail();// 送信元が取得できないときは、システムのデフォルトメールアドレスを使用
$toAddress = $email; // eメール(ログインアカウント)
- //$url = $this->gEnv->createCurrentPageUrl() . sprintf(photo_shopCommonDef::EMAIL_LOGIN_URL, urlencode($email), urlencode($password)); // ログイン用URL
- $url = photo_shopCommonDef::createLoginUrl($toAddress, $password); // ログイン用URL
+ //$url = $this->gEnv->createCurrentPageUrl() . sprintf(ec_mainCommonDef::EMAIL_LOGIN_URL, urlencode($email), urlencode($password)); // ログイン用URL
+ $url = ec_mainCommonDef::createLoginUrl($toAddress, $password); // ログイン用URL
$mailParam = array();
$mailParam['PASSWORD'] = $password;
$mailParam['URL'] = $this->getUrl($url, true); // ログイン用URL
- $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
+ $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
$ret = $this->gInstance->getMailManager()->sendFormMail(1, $this->gEnv->getCurrentWidgetId(), $toAddress, $fromAddress, '', '', self::REGIST_MEMBER_FORM, $mailParam);// 自動送信
$this->tmpl->addVar("_widget", "message", '登録完了しました。指定のメールアドレス宛てにパスワードが送信されます。<br />再度ログインしてください。');
} else {
$this->tmpl->setAttribute('show_input', 'visibility', 'visible');
}
// ##### フォトギャラリー追加分 #####
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->setAttribute('show_member_info_option', 'visibility', 'visible');
// 性別選択メニュー作成
$this->db->getAllState('JPN', $this->_langId, array($this, 'stateLoop'));
}
// フォトギャラリー追加分
- if (photo_shopCommonDef::MEMBER_INFO_OPTION){
+ if (ec_mainCommonDef::MEMBER_INFO_OPTION){
$this->tmpl->addVar("show_member_info_option", "sports", $sports); // 現在やっているスポーツ
}
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainSendpwdWidgetContainer.php 5572 2013-01-23 08:43:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
function _assign($request, &$param)
{
$act = $request->trimValueOf('act');
- $useEmail = $this->_getConfig(photo_shopCommonDef::CF_E_USE_EMAIL);
+ $useEmail = $this->_getConfig(ec_mainCommonDef::CF_E_USE_EMAIL);
if ($act == 'sendpassword'){ // パスワード再送信のとき
$account = $request->trimValueOf('photo_account');
if ($useEmail == '1'){ // メール送信可能のとき
// パスワード変更
$ret = $this->_db->updateLoginUserPassword($row['lu_id'], $password);
if ($ret){
- $fromAddress = $this->_getConfig(photo_shopCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
+ $fromAddress = $this->_getConfig(ec_mainCommonDef::CF_E_AUTO_EMAIL_SENDER); // 自動送信送信元
if (empty($fromAddress)) $fromAddress = $this->gEnv->getSiteEmail();// 送信元が取得できないときは、システムのデフォルトメールアドレスを使用
$toAddress = $account; // eメール(ログインアカウント)
- //$url = $this->gEnv->createCurrentPageUrl() . sprintf(photo_shopCommonDef::EMAIL_LOGIN_URL, urlencode($account), urlencode($password)); // ログイン用URL
+ //$url = $this->gEnv->createCurrentPageUrl() . sprintf(ec_mainCommonDef::EMAIL_LOGIN_URL, urlencode($account), urlencode($password)); // ログイン用URL
//$url = $this->gPage->getDefaultPageUrlByWidget($this->gEnv->getCurrentWidgetId(),
- // sprintf(photo_shopCommonDef::EMAIL_LOGIN_URL, urlencode($toAddress), urlencode($password))); // ログイン用URL
- $url = photo_shopCommonDef::createLoginUrl($toAddress, $password); // ログイン用URL
+ // sprintf(ec_mainCommonDef::EMAIL_LOGIN_URL, urlencode($toAddress), urlencode($password))); // ログイン用URL
+ $url = ec_mainCommonDef::createLoginUrl($toAddress, $password); // ログイン用URL
$mailParam = array();
$mailParam['PASSWORD'] = $password;
$mailParam['URL'] = $this->getUrl($url, true); // ログイン用URL
- $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(photo_shopCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
+ $mailParam['SIGNATURE'] = self::$_mainDb->getConfig(ec_mainCommonDef::CF_E_SHOP_SIGNATURE); // ショップメール署名
$ret = $this->gInstance->getMailManager()->sendFormMail(1/*自動送信*/, $this->gEnv->getCurrentWidgetId(), $toAddress, $fromAddress, '', '',
- photo_shopCommonDef::MAIL_FORM_SEND_PASSWORD, $mailParam);// 自動送信
+ ec_mainCommonDef::MAIL_FORM_SEND_PASSWORD, $mailParam);// 自動送信
$isSend = true; // 送信完了
}
} else {
*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2012 Magic3 Project.
+ * @copyright Copyright 2006-2017 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ec_mainWidgetContainer.php 5440 2012-12-08 09:37:39Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/ec_mainBaseWidgetContainer.php');
$forward = $request->trimValueOf(M3_REQUEST_PARAM_FORWARD); // 画面遷移用パラメータ
// ##### アクセス制御 #####
- $canNonMemberOrder = $this->_getConfig(photo_shopCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER);
+ $canNonMemberOrder = $this->_getConfig(ec_mainCommonDef::CF_E_PERMIT_NON_MEMBER_ORDER);
// ログインが必要な処理の場合は、ログイン状況をチェックする
switch ($task){
}
}
// 注文受付停止中はトップ画面へ遷移(システム管理者以外)
- if (!$this->gEnv->isSystemAdmin() && !$this->_getConfig(photo_shopCommonDef::CF_E_ACCEPT_ORDER)){
+ if (!$this->gEnv->isSystemAdmin() && !$this->_getConfig(ec_mainCommonDef::CF_E_ACCEPT_ORDER)){
$this->gPage->redirect($this->gEnv->createCurrentPageUrl());
return true;
}
break;
}
// 会員規約を承認していない場合は、規約ページを表示
- if ($task == 'regmember' && $this->getWidgetSession(photo_shopCommonDef::SK_AGREE_MEMBER, '0') == '0'){
+ if ($task == 'regmember' && $this->getWidgetSession(ec_mainCommonDef::SK_AGREE_MEMBER, '0') == '0'){
$task = 'agreemember'; // 会員規約
}
$productTypeCode = $fetchedRow['py_code']; // 商品タイプコード
// 表示用の商品名、商品コード作成
- $productName = sprintf(photo_shopCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
- $productCode = sprintf(photo_shopCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
+ $productName = sprintf(ec_mainCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
+ $productCode = sprintf(ec_mainCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
// 商品の状態
if (!$fetchedRow['ht_visible']) $priceAvailable = false; // 商品が表示不可のときは価格を無効とする
$productTypeCode = $fetchedRow['py_code']; // 商品タイプコード
// 表示用の商品名、商品コード作成
- $productName = sprintf(photo_shopCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
- $productCode = sprintf(photo_shopCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
+ $productName = sprintf(ec_mainCommonDef::PRODUCT_NAME_FORMAT, $productTypeName, $title); // 商品名
+ $productCode = sprintf(ec_mainCommonDef::PRODUCT_CODE_FORMAT, $photoId, $productTypeCode); // 商品コード
// 商品の状態
if (!$fetchedRow['ht_visible']) $priceAvailable = false; // 商品が表示不可のときは価格を無効とする