お世話になっております。
アルコールの販売に伴い、カート画面において「20歳以上ですか?」というチェックボックスを設け、チェックが入った場合に購入ボタンを有効にする実装を行っております。
チェックがない場合は無効。
テーマはprestigeになります。
Dawnなどでは実装ができたのですが、prestigeでは他のJavaScriptが邪魔をしているのか実装できないようです。
こちら何かご存知の方がいらっしゃいましたら教えていただきたいです。
下記にコードを添付しておきます。
何卒宜しくお願いいたします。
theme.liquid
main-cart.liquid
{%- capture shipping_and_taxes_notice -%}{{ 'cart.general.shipping_and_taxes_notice' | t }}{%- endcapture -%}
{%- if cart.cart_level_discount_applications != blank -%}
{%- for discount_application in cart.cart_level_discount_applications -%}
{{ 'cart.general.discount' | t }} ({{ discount_application.title }}): -{{ discount_application.total_allocated_amount | money }}
{%- endfor -%}
{%- endif -%}
{{ 'cart.general.total' | t }}: {{ cart.total_price | money_with_currency }}
{%- if shipping_and_taxes_notice != blank -%}
{{ shipping_and_taxes_notice }}
{%- endif -%}
checkbox.js
$(function () {
$(".Cart__Checkout").attr("disabled", "disabled");
$("#cart_check").click(function () {
if ($(this).prop("checked") == false) {
$(".Cart__Checkout").attr("disabled", "disabled");
} else {
$(".Cart__Checkout").removeAttr("disabled");
}
});
});