Home > ZenCart

ZenCart Archive

[ZenCart]デバッグ

includes\classes\template_function.phpの 45~61行目

function get_template_dir($template_code, $current_template,
 $current_page, $template_dir, $debug=false) {
//	echo 'template_default/' . $template_dir . '=' . $template_code;
if ($this->file_exists($current_template . $current_page, $template_code)) {
return $current_template . $current_page . '/';
} elseif ($this->file_exists(DIR_WS_TEMPLATES . 'template_default/' . $current_page, ereg_replace('/', '', $template_code), $debug)) {
return DIR_WS_TEMPLATES . 'template_default/' . $current_page;
} elseif ($this->file_exists($current_template . $template_dir, ereg_replace('/', '', $template_code), $debug)) {
return $current_template . $template_dir;
} else {
return DIR_WS_TEMPLATES . 'template_default/' . $template_dir;
//        return $current_template . $template_dir;
}
}

function get_template_dir($template_code, $current_template, $current_page, $template_dir, $debug=false) {
//   echo 'template_default/' . $template_dir . '=' . $template_code;
      if ($this->file_exists($current_template . $current_page, $template_code)) {
        echo $current_template . $current_page . '=' . $template_code . '/' . '<br />';
        return $current_template . $current_page . '/';
      } elseif ($this->file_exists(DIR_WS_TEMPLATES . 'template_default/' . $current_page, ereg_replace('/', '', $template_code), $debug)) {
        echo DIR_WS_TEMPLATES . 'template_default/' . $current_page .'=' . $template_code.'';
        return DIR_WS_TEMPLATES . 'template_default/' . $current_page;
      } elseif ($this->file_exists($current_template . $template_dir, ereg_replace('/', '', $template_code), $debug)) {
        echo $current_template . $template_dir. '=' . $template_code.'<br />';
        return $current_template . $template_dir;
      } else {
        echo DIR_WS_TEMPLATES . 'template_default/' . $template_dir. '=' . $template_code.'';
        return DIR_WS_TEMPLATES . 'template_default/' . $template_dir;
//        return $current_template . $template_dir;
      }
    }

[ZenCart]画像の縦横比

管理画面の「一般設定」→画像の「設定」
縦横どちらかのサイズを0に指定
「画像サイズを計算する」をTrueに設定
縦横比を保持したまま計算して拡大縮小

[ZenCart]地域別送料設定

地域・税率設定 -> 地域税に進む
「北海道・沖縄」という地域を追加
その地域で「詳細」ボタンを押す
その地域に北海道と沖縄を紐付けする
「定額料金」の配送モジュールを元にして、「定額料金(北海道・沖縄)」という配送モジュールを新しく作る
「定額料金(北海道・沖縄)」モジュールをインストールして、「配送地域」として「北海道・沖縄」を紐付け。

モジュールの追加
includes/modules/shipping/flat.php を includes/modules/shipping/flatritou.phpなどにコピー
includes/languages/japanese/modules/shipping/flat.phpを
includes/languages/japanese/modules/shipping/flatritou.phpなどにコピー
falt -> flatritou
FLAT -> FLATRITOU
のように置換

[ZenCart]文章の修正

タイトルの修正
/includes/languages/テンプレート名/japanese.php
各文章の修正
/includes/languages/japanese/テンプレート名/***.php

[ZenCart]テンプレートの追加

[includes/templates/]を開き、ディレクトリを追加
includes/templates/テンプレート名/template_info.php
$template_name = ‘テンプレート名’;
管理画面から、各種ツール>テンプレート設定>編集ボタンをクリック
ドロップダウンメニューより、作成したテンプレートを選択し更新ボタンをクリック
各種ツール>サイドボックスのレイアウト設定を選び、画面最下部のリセットボタンをクリック

ホーム > ZenCart

Search
Feeds
[PR]

Return to page top