ZenCartカスタマイズ
ZenCartカスタマイズ
http://www.gnnk.net/archives/category/zencart/
Archive for the 'ZenCart' Category
« Previous Entries[ZenCart]新着商品の登録日の非表示
Thursday, September 7th, 2006
/include/modules/products_new_listing.php
PLAIN TEXTPHP:
if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_DATE_ADDED') {
echo $display_products_date_added;
}
をコメントアウト
[ZenCart]振込先の改行
Wednesday, June 7th, 2006
webでの表示と注文受付のメール、
どちらも改行するには、
PLAIN TEXTHTML:
\n
と、改行部分に入力する。
[ZenCart]注文メールSubjectの注文番号を削除
Wednesday, May 24th, 2006
/includes/modules/checkout_process.php
PLAIN TEXTPHP:
. EMAIL_ORDER_NUMBER_SUBJECT . $insert_id
を削除
[ZenCart]商品詳細のモデル削除
Tuesday, May 23rd, 2006
/includes/templates/テンプレート名
/templates/tpl_product_info_display.php
PLAIN TEXTPHP:
TEXT_PRODUCT_MODEL . $products_model : ' '); ?>
を削除
[ZenCart]デバッグ
Saturday, May 20th, 2006
includes\classes\template_function.phpの 45~61行目
PLAIN TEXTPHP:
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;
}
}
を
PLAIN TEXTPHP:
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 . '/' . '
';
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.'
';
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]画像の縦横比
Wednesday, May 17th, 2006
管理画面の「一般設定」→画像の「設定」
縦横どちらかのサイズを0に指定
「画像サイズを計算する」をTrueに設定
縦横比を保持したまま計算して拡大縮小
[ZenCart]地域別送料設定
Wednesday, May 17th, 2006
地域・税率設定 -> 地域税に進む
「北海道・沖縄」という地域を追加
その地域で「詳細」ボタンを押す
その地域に北海道と沖縄を紐付けする
「定額料金」の配送モジュールを元にして、「定額料金(北海道・沖縄)」という配送モジュールを新しく作る
「定額料金(北海道・沖縄)」モジュールをインストールして、「配送地域」として「北海道・沖縄」を紐付け。
モジュールの追加
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]文章の修正
Wednesday, May 17th, 2006
タイトルの修正
/includes/languages/テンプレート名/japanese.php
各文章の修正
/includes/languages/japanese/テンプレート名/***.php
[ZenCart]テンプレートの追加
Wednesday, May 17th, 2006
[includes/templates/]を開き、ディレクトリを追加
includes/templates/テンプレート名/template_info.php
$template_name = ‘テンプレート名’;
管理画面から、各種ツール>テンプレート設定>編集ボタンをクリック
ドロップダウンメニューより、作成したテンプレートを選択し更新ボタンをクリック
各種ツール>サイドボックスのレイアウト設定を選び、画面最下部のリセットボタンをクリック
[ZenCart]Google Analyticsの設置
Wednesday, May 17th, 2006
includes/templates/テンプレート名/common/tpl_main_page.php
[ZenCart]国名非表示・都道府県ドロップダウン化
Wednesday, May 17th, 2006
YOUR_TEMPLATEフォルダを実際のテンプレートフォルダ名に変更
zen_address_format.sql内のテーブル名を変更
zen_address_format.sqlをphpMyAdminなどで実行
フォルダ/ファイルをコピーする。
管理画面→地域・税率設定→国名設定→Japan
の住所フォーマットを7に変更して更新
[ZenCart]在庫数の非表示
Wednesday, May 17th, 2006
「商品の管理」>「商品タイプの管理」
>「Product - General」>「edit layout」
>「Show Date Available」