ネットショップ管理プラグインを利用してWEBサービスを制作します。
マニュアルが少し解りにくかったので自分へのメモ代わりにマニュアルを作りました。
-
商品登録
ネットショップ管理プラグインを入れて有効化したら、まずは商品登録をしてみます。
商品管理画面の新商品登録ボタンより商品登録をします
-
商品テンプレート
ネットショップ→オプション設定→商品テンプレート
商品テンプレートは商品個別ページに表示する内容を入力して商品管理ページよりテンプレートを選択する。
例-1 商品個別ページに下記内容を表示する場合商品項目一覧のショートコードのリンク
■データベースのテーブル:wp_nsa_product記載例
[product option=form]
- 商品ID:[product field=product_id]
- 投稿ID:[product field=post_id]
- 商品テンプレートID:[product field=template]
- 登録者ID:[product field=author_id]
- 商品名:[product field=product_name]
- 商品価格:[product field=product_price]
- 商品価格(税抜き):[product field=product_tax_excluded_price]
[product option=/form]
固定ページに商品一覧ページを表示する方法
ショートコードで [product]で関連商品が吐き出される
[product]の初期値は[product post_id=3 template=0]引数
- 商品テンプレート:template=1
- 表示商品数:posts_per_page=4
- カテゴリーID:category_id=1
- 並べ替えを表示する:order_select=1
- 並べ替え:orderby=product_price order=desc
- 全商品か在庫ありの商品か:display_select=1
カテゴリーページに並べ替えを表示する
<?php echo do_shortcode(‘[product order_select=1 display_select=1 select_type=select only_select=1]’); ?>
この記事へのコメントはありません。