カラーミーショップで商品を問合せや非売品にしたい場合

カラーミショップで商品の価格を表示する代わりに、非売品やお問い合わせ
にするときの条件分岐。
商品情報登録時に価格などを空欄にしておき
条件分岐として
・価格が0ならHogeを表示する
というかたちで商品情報を掲載。

・詳細画面

販売価格など
<{$product.sales}>の欄の場合は
<{if $product.sales == 0}>表示したい内容
<{else}><{$product.sales}><{/if}>

同様に、価格に関わる変数の箇所に条件分岐を入れる。
お問い合わせに引きあわせたい場合は
<a href="<{$prod_inq_url}>">この商品について問い合わせる</a>
を入れておく。

会員価格などの項目もあるので、適時入れておく。

カート部分は
<code><{if $product.sales == 0}>

<{else}>
カート部分のタグ
<{/if}>
としておく。

・一覧画面系

<code><{if $productlist[num].price == 0}>表示したい内容
<{else}><{$productlist[num].price}><{/if}></code>

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.