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

カラーミショップで商品の価格を表示する代わりに、非売品やお問い合わせ
にするときの条件分岐。
商品情報登録時に価格などを空欄にしておき
条件分岐として
・価格が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>

コメントを残す

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

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)