バージョン選択

フォーラム

メニュー

オンライン状況

65 人のユーザが現在オンラインです。 (57 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 65
もっと...

サイト内検索

質問 > 管理機能 > 【2.11.1】納品書にお届け先の追加方法

管理機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
brother
投稿日時: 2011/8/16 13:28
対応状況: −−−
半人前
登録日: 2011/8/16
居住地:
投稿: 16
Re: 【2.11.1】納品書にお届け先の追加方法
アドバイスいただきありがとうございます。

早速試してみましたが、帳票出力のポップアップ画面において
以下のエラーが表示されてしまいました。


Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /var/www/vhosts/ドメイン/data/class/SC_Fpdf_Order.php on line 177

ゲスト
投稿日時: 2011/8/16 14:55
対応状況: −−−
Re: 【2.11.1】納品書にお届け先の追加方法
引用:
動作確認はしていません。。。


$1 を $i に修正、、、で、どうでしょう。。。
brother
投稿日時: 2011/8/16 15:17
対応状況: −−−
半人前
登録日: 2011/8/16
居住地:
投稿: 16
Re: 【2.11.1】納品書にお届け先の追加方法
Ringo様

ありがとうございます。
アドバイスいただいたとおり、$1 を $i に修正すると表示されました!

ただ、西暦も2ケタ表示となり
お届け日 11年08月18日 14時〜16時
と表示されて少し違和感を感じたので、手前に "20" .  を追記して
お届け日 2011年08月18日 14時〜16時
と表示されるようにしました。

もう少しスマートな記述方法がございましたらご指摘願います。

$text = "お届け日 ". "20" . $this->arrShip[$i]["shipping_ymd"] = substr($this->arrShip[$i]["shipping_date"],2,2) . "年" . substr($this->arrShip[$i]["shipping_date"],5,2) . "月" . substr($this->arrShip[$i]["shipping_date"],8,2) . "日" . " " . $this->arrShip[$i]['shipping_time'];
ゲスト
投稿日時: 2011/8/16 15:30
対応状況: −−−
Re: 【2.11.1】納品書にお届け先の追加方法
引用:
もう少しスマートな記述方法がございましたらご指摘願います。


http://www.google.co.jp/search?hl=ja&source=hp&biw=&bih=&q=php+substr&btnG=Google+%E6%A4%9C%E7%B4%A2

http://php.net/manual/ja/function.substr.php

substr

(PHP 4, PHP 5)

substr ― 文字列の一部分を返す
説明
string substr ( string $string , int $start [, int $length ] )

文字列 string の、start で指定された位置から length バイト分の文字列を返します。
brother
投稿日時: 2011/8/16 15:40
対応状況: −−−
半人前
登録日: 2011/8/16
居住地:
投稿: 16
Re: 【2.11.1】納品書にお届け先の追加方法
Ringo様

ありがとうございます。
たいへん勉強になります。
後ろの数字はそのような意味合いがあったのですね。

["shipping_date"],2,2)
 を
["shipping_date"],0,4)
へ変更することで、西暦が4ケタ表示できました。

自分で調べもせずに質問してしまいたいへん恐縮です。
ありがとうございました
ゲスト
投稿日時: 2011/8/18 12:15
対応状況: −−−
Re: 【2.11.1】納品書にお届け先の追加方法
「お届け先」情報の格納を半ば把握出来たので、コードを修正しました。
なお、
・「お届け先」全パターンでの表示確認が出来ていない。
・「お届け先」数が多くなると、表示が崩れる。
と、いうことで、参考までに。。。

正しくは
http://svn.ec-cube.net/open_trac/changeset/20943
他の seasoft様のロジックと差し替える必要があると思います。
事の成り行きは
http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=8650&forum=11&post_id=42082#forumpost42082
を参照ください。

    function setOrderData() {
        // DBから受注情報を読み込む
        $this->lfGetOrderData($this->arrData['order_id']);

        // 購入者情報
        $text = "〒 ".$this->arrDisp['order_zip01']." - ".$this->arrDisp['order_zip02'];
        $this->lfText(23, 43, $text, 10); //購入者郵便番号
        $text = $this->arrPref[$this->arrDisp['order_pref']] . $this->arrDisp['order_addr01'];
        $this->lfText(27, 47, $text, 10); //購入者都道府県+住所1
        $this->lfText(27, 51, $this->arrDisp['order_addr02'], 10); //購入者住所2
        $text = $this->arrDisp['order_name01']." ".$this->arrDisp['order_name02']." 様";
        $this->lfText(27, 59, $text, 11); //購入者氏名

        // お届け先情報
        $this->pdf->SetFontSize(10);
        $this->lfText(25, 125, SC_Utils_Ex::sfDispDBDate($this->arrDisp['create_date']), 10); //ご注文日
        $this->lfText(25, 135, $this->arrDisp['order_id'], 10); //注文番号

       // 届先情報 <ここから>
       $objShip = new SC_Helper_Purchase_Ex();
       $this->arrShip = $objShip->getShippings($this->arrDisp['order_id']);
             
       $y = 144; // お届け先開始y軸位置
       
       $count = count($this->arrShip);
       $i = 0; // 配列のindex
       $j = 0; // 届け先取り出し数

       do {
           if ($j == $count) {
               break;
           }
           if ($this->arrShip[$i]['shipping_id'] != "") {
               $y += $j * 4 * 3; // 届け先 * 高さ * 要素数
               $text = "[お届け先". (string)($j + 1) . "]";
               $this->lfText(23, $y, $text, 10);
               $y += 4;
               $text = "〒"
                   . $this->arrShip[$i]['shipping_zip01']
                   . "-"
                   . $this->arrShip[$i]['shipping_zip02']
                   . " "
                   . $this->arrPref[$this->arrShip[$i]['shipping_pref']] 
                   . $this->arrShip[$i]['shipping_addr01']
                   . $this->arrShip[$i]['shipping_addr02'];
               $this->lfText(25, $y, $text, 10);
               $y += 4;
               $text = $this->arrShip[$i]['shipping_name01'] . " " . $this->arrShip[$i]['shipping_name02'] . " 様";
               $this->lfText(25, $y, $text, 10);
               
               $j += 1;
           }
           $i += 1;
       } while (true);
       // <ここまで>

        $this->pdf->SetFont('', 'B', 15);
        $this->pdf->Cell(0, 10, $this->lfConvSjis($this->tpl_title), 0, 2, 'C', 0, '');  //文書タイトル(納品書・請求書)
        $this->pdf->Cell(0, 66, '', 0, 2, 'R', 0, '');
        $this->pdf->Cell(5, 0, '', 0, 0, 'R', 0, '');
        $this->pdf->Cell(67, 8, $this->lfConvSjis(number_format($this->arrDisp['payment_total'])." 円"), 0, 2, 'R', 0, '');

       // <ここ>
       //$this->pdf->Cell(0, 45, '', 0, 2, '', 0, '');
       $this->pdf->Cell(0, 45 + $count * 20, '', 0, 2, '', 0, ''); // 第2引数:Cell上端y軸位置 (20は「適当な値」)
comcom
投稿日時: 2011/12/16 15:41
対応状況: −−−
半人前
登録日: 2010/6/10
居住地:
投稿: 15
Re: 【2.11.1】納品書にお届け先の追加方法
引用:

正しくは
http://svn.ec-cube.net/open_trac/changeset/20943
他の seasoft様のロジックと差し替える必要があると思います。
事の成り行きは
http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=8650&forum=11&post_id=42082#forumpost42082
を参照ください。


こちらの仕様で問題なくお届先情報を取得・帳票へ表示できるようになりましたが、管理画面からの受注登録の場合、「お客様情報へお届けする」を押しても帳票へは反映しない(というよりも受注登録画面のお届け先が消えてしまっている)ので、これを何とか改善できませんでしょうか?
ゲスト
投稿日時: 2011/12/16 18:05
対応状況: −−−
Re: 【2.11.1】納品書にお届け先の追加方法
下記を参照の上、動作環境の情報をください。

http://xoops.ec-cube.net/modules/tinyd0/index.php?id=8

取り敢えず、心当たりは、

http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=8608&forum=9&viewmode=flat&order=ASC&start=0

ですが。。。
« 1 (2)
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,886名です
総投稿数は110,000件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1295
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.