1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

カラーミーで商品のオプション価格を全て取得する

Last updated at Posted at 2018-07-09

$option_view_dataの中に色々入っているようです。
<{$option_view_data|@debug_print_var}>配列をdumpできます。

JavaScriptで商品データを作成するには

optionData.js
<{* 価格表データの生成 *}>
var optionData = [];
for (let i = 0; i < 3; i++) {
  optionData[i]=[,,];
}
<{foreach from=$option_view_data item=i key=k}>
  <{foreach from=$i.data item=i2 key=k2}>
    optionData[<{$2}>][<{$k}>] = "<{$i2.sales}>"
    <{* option_view_dataの配列の次元がなぜか直感とは逆っぽいです *}>
  <{/foreach}>
<{/foreach}>

のような感じでできるかもしれません。

この情報にたどり着くまで3時間くらいかかってしまった。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?