2006年12月アーカイブ

zencart不達メール

|

v1.2では、OSCと同じ。
V1.3では、

/includes/classes/class.phpmailer.phpの458行目

$rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header, "-fメアド");

サーバー設定
/etc/mail/trusted-usersにapacheを追加

oscommerce不達メール

|

サーバー設定
/etc/mail/trusted-usersにapacheを追加

不達メールの通知先を変更する件で、以下のファイルの変更方法ですが、
catalog/includes/classes/email.php
admin/includes/classes/email.php

例えば、次のように編集すればいいと思います。

(変更前) 514行目
------------------------------------------------------------
if (EMAIL_TRANSPORT == 'smtp') {
return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
} else {
return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));
}
------------------------------------------------------------

(変更後)
------------------------------------------------------------
$bounce_mail_option = '-f' . (defined('BOUNCE_EMAIL_ADDRESS') ? BOUNCE_EMAIL_ADDRESS : STORE_OWNER_EMAIL_ADDRESS);
if (EMAIL_TRANSPORT == 'smtp') {
return mail($to_addr, $subject, $this->output,
('From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers)),
$bounce_mail_option
);
} else {
return mail($to, $subject, $this->output,
('From: ' . $from . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers)),
$bounce_mail_option
);
}
------------------------------------------------------------
↑ 2007/07/20訂正

-------------------------------------------------

不達メールについて
メンバー登録や注文後に送られる自動送信のメールが不達の場合に指定
のメールアドレスに帰ってくるように出来たらと思うのですが?
mb_send_mailのoptionにreply to:を追加すればいいのでは。
でも相手先のサーバーによってはreplyを見ない場合もあるので
万能ではないはず。
sendmailを使っているなら、-f <<送信元アドレス>>が指定できます。
具体的には、PHP の mail() 関数の5番目の引数で指定できますので、
http://jp.php.net/manual/ja/function.mail.php (例 3)
catalog/includes/classes/email.php
admin/includes/classes/email.php
に少し手を入れれば、通知先を変更できます。

どこかに(例えば [catalog|admin]/includes/application_top.php)
define('EMAIL_BOUNCE', 'webmaster@example.com');
のように転送先を指定する行を挿入して、

以下のファイルの mail() 関数を呼んでいる部分を書き換えます。
catalog/includes/classes/email.php
admin/includes/classes/email.php

例) catalog/includes/classes/email.php L.468
---------------------------------------------------
return mail($to,
$subject,
$this->output,
'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers),
"-f".EMAIL_BOUNCE
);
---------------------------------------------------
ただし、これはメールサーバにパラメータを受け渡すものなので、
メールサーバによっては、うまく働かないかもしれません。

-----------------------------
http://blog.buchanweb.net/?itemid=59

zencart1.3用friendly URL

|


/includes/functions/html_output.php

        $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
      } else {
        $link .= 'index.php?main_page=' . $page;
      }

上記4行を

-----------------------------------------------------

 if ((USER_FRIENDLY_URLS_REWRITE == 'true') &&
     (!ereg('language', $parameters)) &&
     (!ereg('manufacturers_id', $parameters)) &&
     (!ereg('contact_us', $page)) &&
     (!ereg('review', $page)) &&
     (!ereg('review', $parameters))
    ) {

   $parameters = str_replace('&sort=', '/sort', $parameters);
   $parameters = str_replace('&page=', '/page', $parameters);
   $parameters = str_replace('&filter_id=', '/filter', $parameters);
   $parameters = str_replace('disp_order=', 'display', $parameters);

   if (($page == "index") && (ereg('cPath', $parameters))){
  $cnum = str_replace('cPath=', 'cid', $parameters);
  $parameters = str_replace("cPath=", "categories/", $parameters); 
  $link .= $parameters . '.html';
  require("url_data.php");
  if ($urlrpl[$cnum] != NULL) {
      $link = ereg_replace("categories/[0-9_]{1,}", "categories/$urlrpl[$cnum]", $link);
  }
   }

          elseif (($page == "product_info") && (ereg('products_id', $parameters))){
  $pnum = str_replace('products_id=', 'pid', $parameters);
  $pnum = ereg_replace('cPath=[0-9_]{1,}&', '', $pnum);
  $parameters = str_replace("products_id=", "products/", $parameters);
  $parameters = ereg_replace('cPath=([0-9_]{1,})&', '', $parameters);
  $parameters = str_replace('action=notify&','notify', $parameters);
  $parameters = str_replace('action=add_product&','add', $parameters);
  $parameters = str_replace('&reviews_id=','review/', $parameters);
  $parameters = str_replace('&action=notify_remove','notify_remove', $parameters);
  $parameters = str_replace('&action=notify','notify', $parameters);
  $link .= $parameters . '.html';
  require("url_data.php");
  if ($urlrpl[$pnum] != NULL) {
      $link = ereg_replace("products/[0-9]{1,}", "products/$urlrpl[$pnum]", $link);
  }
   }

   elseif ($page == 'redirect') {
  if (ereg('banner', $parameters)){
  $parameters = str_replace('action=banner&goto=', 'redirect_banner', $parameters);
  $link .= $parameters . '.html';
  }
  if (ereg('url', $parameters)){
  $parameters = str_replace('action=url&goto=', 'redirect_url-', $parameters);
  $link = $parameters;
  }
   }

   elseif ($page == 'tell_a_friend') {
  $parameters = str_replace('to_email_address=','/to_', $parameters);
  $parameters = str_replace('products_id=','/products', $parameters);
  $parameters = str_replace('action=process&','/send', $parameters);
  $link .= $page . $parameters . '.html';
   }

          elseif (
       ($page == "products_all") or
  ($page == "products_new") or
  ($page == "featured_products") or
  ($page == "specials)")
       ){

   $link .= $page ."/" . $parameters . '.html';
          } else {

        $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);

 } 

    } else {
        $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
 }
      } else {
 if (USER_FRIENDLY_URLS_REWRITE == 'true') {
          if (
                ($page == 'login') or
                ($page == 'advanced_search') or
                ($page == 'specials') or
                ($page == 'featured_products') or
                ($page == 'products_new') or
                ($page == 'products_all') or
                ($page == 'shippinginfo') or
                ($page == 'privacy') or
                ($page == 'conditions') or
                ($page == 'contact_us') or
                ($page == 'gv_faq') or
                ($page == 'site_map') or
                ($page == 'logoff') or
                ($page == 'account') or
                ($page == 'shopping_cart') or
                ($page == 'popup_shipping_estimator') or
                ($page == 'news_manager_all_news') or
                ($page == 'unsubscribe') or
                ($page == 'reviews') or
                ($page == 'checkout_shipping')
              ){
                        $link .= $page . ".html";
  } else {
  $link .= 'index.php?main_page=' . $page;
      }
     } else {
     $link .= 'index.php?main_page=' . $page;
     }
 }

-----------------------------------
書き換えする。

②.htaccessでrewriteを設定する。
③ルートにurl_data.phpを設置する。
----------------------
<?php
$urlrpl = array(
"cid1" => "Hardware", <- cidはカテゴリID
"cid1_4" => "Graphics_Cards",
"cid1_8" => "Keyboards",
"cid1_9" => "Mice",
"pid1" => "Matrox_G200_MMS", >- pidは商品ID
"pid25" => "Microsoft_Internet_Keyboard_PS2",
"pid26" => "Microsoft_IntelliMouse_Explorer"
);
?>
----------------------
④/includes/configure.phpの最終行に下記の一行文を追加。
-----------------------
define('USER_FRIENDLY_URLS_REWRITE', 'true');
-----------------------

ドロップダウンは、不明。

 

zencart URL書き換え日本語版

|

携帯サイト用htaccess

|

参照元


--------------------

order deny,allow
deny from all

# iモード端末を許可(2006/10/23)
# http://www.nttdocomo.co.jp/service/imode/make/content/ip/about/
allow from 210.153.84.0/24
allow from 210.136.161.0/24
allow from 210.153.86.0/24

# EZweb TU-KA端末を許可(2006/8/17)
# http://www.au.kddi.com/ezfactory/tec/spec/ezsava_ip.html
allow from 59.135.38.128/25
allow from 61.117.0.0/24
allow from 61.117.1.0/24
allow from 61.117.2.0/26
allow from 61.202.3.0/24
allow from 210.169.40.0/24
allow from 210.196.3.192/26
allow from 210.196.5.192/26
allow from 210.230.128.0/24
allow from 210.230.141.192/26
allow from 210.234.105.32/29
allow from 210.234.108.64/26
allow from 210.251.1.192/26
allow from 210.251.2.0/27
allow from 211.5.1.0/24
allow from 211.5.2.128/25
allow from 211.5.7.0/24
allow from 218.222.1.0/24
allow from 219.108.158.0/26
allow from 219.125.148.0/24
allow from 222.5.63.0/24
allow from 222.7.56.0/24
allow from 222.5.62.128/25
allow from 222.7.57.0/24

# SoftBank(旧vodafone)端末を許可(2006/06/15)
# http://developers.softbankmobile.co.jp/dp/tech_svc/web/ip.php
allow from 202.179.204.0/24
allow from 210.146.7.192/26
allow from 210.146.60.192/26
allow from 210.151.9.128/26
allow from 210.169.176.0/24
allow from 210.175.1.128/25
allow from 210.228.189.0/24
allow from 211.8.159.128/25

# AirH"PHONE端末を許可(2006/08/17)
# http://www.willcom-inc.com/ja/service/contents_service/club_air_edge/for_phone/ip/
allow from 61.198.129.0/24
allow from 61.198.130.0/24
allow from 61.198.140.0/24
allow from 61.198.141.0/24
allow from 61.198.142.0/24
allow from 61.198.161.0/24
allow from 61.198.163.0/24
allow from 61.198.249.0/24
allow from 61.198.250.0/24
allow from 61.198.253.0/24
allow from 61.198.254.0/24
allow from 61.198.255.0/24
allow from 61.204.0.0/24
allow from 61.204.2.0/24
allow from 61.204.3.0/25
allow from 61.204.4.0/24
allow from 61.204.5.0/24
allow from 61.204.6.0/25
allow from 125.28.0.0/24
allow from 125.28.1.0/24
allow from 125.28.11.0/24
allow from 125.28.12.0/24
allow from 125.28.13.0/24
allow from 125.28.14.0/24
allow from 125.28.15.0/24
allow from 125.28.2.0/24
allow from 125.28.3.0/24
allow from 125.28.4.0/24
allow from 125.28.5.0/24
allow from 125.28.6.0/24
allow from 125.28.7.0/24
allow from 125.28.8.0/24
allow from 210.168.246.0/24
allow from 210.168.247.0/24
allow from 211.18.232.0/24
allow from 211.18.233.0/24
allow from 211.18.235.0/24
allow from 211.18.236.0/24
allow from 211.18.237.0/24
allow from 211.18.238.0/24
allow from 211.18.239.0/24
allow from 219.108.0.0/24
allow from 219.108.1.0/24
allow from 219.108.14.0/24
allow from 219.108.15.0/24
allow from 219.108.2.0/24
allow from 219.108.3.0/24
allow from 219.108.4.0/24
allow from 219.108.5.0/24
allow from 219.108.6.0/24
allow from 219.108.7.0/24
allow from 221.119.0.0/24
allow from 221.119.1.0/24
allow from 221.119.2.0/24
allow from 221.119.3.0/24
allow from 221.119.4.0/24
allow from 221.119.5.0/24
allow from 221.119.6.0/24
allow from 221.119.7.0/24
allow from 221.119.8.0/24
allow from 221.119.9.0/24

携帯振り分けhtaccess

|

RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} ^DoCoMo [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^J-PHONE [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^KDDI [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^UP.Browser [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^DDIPOCKET [NC]
RewriteRule ^.*$ http://www.xxx.jp [L]

このアーカイブについて

このページには、2006年12月に書かれたブログ記事が新しい順に公開されています。

前のアーカイブは2006年11月です。

次のアーカイブは2007年2月です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。