商品詳細ページにお問合せボタンを作り、そのボタンをクリックするとお問い合わせ内容の textarea にその商品名を挿入する方法。
EC-CUBE 開発コミュニティの 商品詳細ページからお問い合わせへ遷移するには のスレッドで ryo さんが答えていた方法。
管理画面の「デザイン管理」から「ページ詳細設定」で「商品詳細ページ」を編集。
その時の例は下のformを追加する感じ
<form method=”post” action=”<!–{$smarty.const.SITE_URL}–>contact/”>
<input type=”hidden” name=”products_name” value=”<!–{$arrProduct.name|escape}–>” /><input type=”submit” name=”" value=”この商品について問い合わせる” />
</form>※ 赤字の部分はSSLに飛ばすなら「$smarty.const.SSL_URL」に変更。
※ 既存のformタグの内側に挿入しないように注意。その場合はgetが無難?
それから、「data/Smarty/templates/contact/index.tpl」を下記のように編集。
152行目あたり:
<textarea name=”contents” cols=”60″ rows=”20″ class=”area60″ wrap=”hard”
maxlength=”<!–{$smarty.const.LTEXT_LEN}–>” style=”<!–{$arrErr.contents|sfGetErrorColor}–>”>
<!–{$smarty.post.products_name|escape}–><!–{$contents|escape}–>
</textarea>※ 赤字を追加。
これでOK
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://www.wiz.gr.jp/wordpress/36/trackback
- Listed below are links to weblogs that reference
- EC-CUBE 商品詳細ページにお問合せボタン from WIZ-WORDPRESS│EC-CUBE-LABO
