[Liquid]公開日からxxxx秒以内の商品にNEWアイコン
{%- assign current = 'now' | date: '%s' -%} {%- assign published_at = tmp_product.published_at | date:'%s' -%} {%- assign gap = current | minus:published_at -%} {%- if gap < xxxx -%} //NEWアイコン {%- endif -%}
{%- assign current = 'now' | date: '%s' -%} {%- assign published_at = tmp_product.published_at | date:'%s' -%} {%- assign gap = current | minus:published_at -%} {%- if gap < xxxx -%} //NEWアイコン {%- endif -%}
<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 -%}