12 / 20 / 2009 / Ec-Cube, Weblog
EC-Cubeでカテゴリ0の「全商品」の名前を変更

/data/class/pages/products/LC_Page_Products_List.php

// タイトル編集
$tpl_subtitle = “”;
$tpl_search_mode = false;

if (!isset($_GET['mode'])) $_GET['mode'] = “”;
if (!isset($_POST['mode'])) $_POST['mode'] = “”;
if (!isset($_GET['name'])) $_GET['name'] = “”;
if (!isset($_REQUEST['orderby'])) $_REQUEST['orderby'] = “”;
if (empty($arrCategory_id)) $arrCategory_id = array(”0″);

if($_GET['mode'] == ’search’){
$tpl_subtitle = “検索結果”;
$tpl_search_mode = true;
}elseif (empty($arrCategory_id)) {
$tpl_subtitle = “全商品”;
}else{
$arrFirstCat = $objDb->sfGetFirstCat($arrCategory_id[0]);
$tpl_subtitle = $arrFirstCat['name'];
}

/data/class_extends/page_extends/products/LC_Page_Products_List_Ex.php

// タイトル編集
$tpl_subtitle = “”;
if ($_GET['mode'] == ’search’) {
$tpl_subtitle = “検索結果”;
} elseif (empty($arrCategory_id[0])) {
$tpl_subtitle = “全商品”;
} else {
$arrFirstCat = $objDb->sfGetFirstCat($arrCategory_id[0]);
$tpl_subtitle = $arrFirstCat['name'];
}

$tpl_subtitle = “全商品”;の部分を任意の文字に書き換える。

Tags:

12 / 9 / 2009 / Ec-Cube, Weblog
EC-Cubeで詳細ページに一覧 – メインコメントを表示する

data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php

の420行目にあるvw_products_allclass_detailにmain_list_commentを追加する

Tags:

12 / 4 / 2009 / Ec-Cube, Weblog
EC-Cubeインストール時のアクセス権設定

#!/usr/bin/perl

print “Pragma: no-cache\n”;
print “Cache-Control: no-cache\n”;
print “Content-type: text/html; charset=UTF-8\n\n”;
print “<html><head><title>chmod</title></head><body>”;

$cnt = 0;
my @dirs = (’./’);
while($cnt < @dirs){
$dir = $dirs[$cnt];
opendir DH, $dir or die “$dir:$!”;
while (my $file = readdir DH) {
next if $file =~ /^\.{1,2}$/;
$checkdir = $dir . $file;
my(@type) = split(/\./,$checkdir);
if(-d $checkdir){
chmod 0707, $checkdir;
push @dirs, “${checkdir}/”;
}
elsif($type[-1] eq “png”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “gif”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “jpg”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “css”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “sql”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “CSV”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “js”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “php”){
chmod 0606, $checkdir;
}
elsif($type[-1] eq “tpl”){
chmod 0606, $checkdir;
}
}
closedir DH;
$cnt++;
}

@dummy = (’./html/user_data/dummy’,
‘./html/user_data/include/campaign/dummy’,
‘./html/cp/dummy’,
‘./html/upload/dummy’,
‘./data/cache/dummy’,
‘./data/Smarty/config/dummy’,
‘./data/Smarty/templates_c/dummy’,
‘./data/logs/dummy’,
‘./data/downloads/dummy’
);
foreach(@dummy){
chmod 0606,$_;
}

print “PROCESSING COMPLETION</body></html>”;
exit;

Tags:

Twitter Updates

    follow me on Twitter

    Web & Graphic

    Web制作、SEO(検索エンジン対策)、SEMを考えたサイト構築を行いWeb戦略のコンサルティング〜プロデュース/ディレクティング/プランニングを提供します。

    名刺やパンフレット、DM等の制作も行っております。

    詳細はこちらをご覧下さい

    wald