[Liquid]バリエーション選択select
<select name="id" class="js_variantsSelect" data-product="{{ product.id }}"> {%- for variant in product.variants -%} <option value="{{ variant.id }}">{{ variant.title | escape }}</option> {%- endfor -%} </select>
<select name="id" class="js_variantsSelect" data-product="{{ product.id }}"> {%- for variant in product.variants -%} <option value="{{ variant.id }}">{{ variant.title | escape }}</option> {%- endfor -%} </select>
{%- for link in linklists.sidemenu.links -%} {%- if link.links.size <= 0 -%} 子項目が無いとき {%- else -%} 子項目があるとき {%- for childlink in link.links -%} {%- endfor -%} {%- endif -%} {%- endfor -%}
{%- capture 変数名 -%}dummy520x390.jpg{%- endcapture -%}
{%- capture html_params -%} data-product="{{ product.id }}" data-variant="{{ variant.id }}" style="{{ html_style }}"{%- endcapture -%}
<a href="{{ product.url | within: collection }}"> <div class="image"><img src="{{ product.featured_image.src | img_url: 'large' }}" alt="{{ product.featured_image.alt | escape }}"></div> <h3>{{ product.title | escape }}</h3> {%- if product.metafields.my_fields.cf_text -%} <p>{{ product.metafields.my_fields.cf_text.value | escape }}</p> {%- else -%} <p>あいうえお</p> {%- endif -%} </a>
tax-text.liquid
{%- if shop.taxes_included -%}(税込){%- else -%}(税抜){%- endif -%}
管理画面「設定 > 税金」の「すべての価格を税込価格で表示する」チェックならばshop.taxes_includedはtrue
コレクションページネーション
{%- paginate collections[handle].products by collections[handle].all_products_count -%} {%- for product in collections[handle].products -%} //処理 {%- endfor -%} {%- endpaginate -%}
$result = DB::table('users')->insert([ ['email' => \DB::raw("AES_ENCRYPT('{$xxx}',SHA2('".env('DB_ENCRYPT_KEY')."',512))"), 'token' => \DB::raw("AES_ENCRYPT('{$yyy}',SHA2('".env('DB_ENCRYPT_KEY')."',512))")] ]);
{%- if shop.customer_accounts_enabled -%} {%- if customer -%} <a href="{{ routes.account_url }}">会員情報</a> <a href="{{ routes.account_logout_url }}">ログアウト</a> {%- else -%} <a href="{{ routes.account_register_url }}">会員登録</a> <a href="{{ routes.account_login_url }}">ログイン</a> {%- endif -%} {%- endif -%}
$record = DB::table('xxx') ->selectRaw("id,AES_DECRYPT(`yyy`,SHA2(:key1,512)) AS shop,AES_DECRYPT(`zzz`,SHA2(:key2,512)) AS token",['key1'=>env('DB_ENCRYPT_KEY'),'key2'=>env('DB_ENCRYPT_KEY')]) ->whereRaw("AES_DECRYPT(`yyy`,SHA2(:key,512)) = :yyy", ['key'=>env('DB_ENCRYPT_KEY'),'yyy'=>$yyy]) ->first();