PPOM Fields Vs products variations

[ad_1]

Hello,

I use this code from a closed topic here, so, first thanks for it!

i insert this code on the JS field, but nothing happens! what i’m doing wrong!

CODE:

 // match variable product variations to PPOM field (for conditional logic)

    var $VariationSelectID = jQuery("#6797");
    var $PPOMSelectID = jQuery("#2");

    $VariationSelectID.on("change", function() {
        var VariationSelect = $VariationSelectID.val();

        var dataOptionId = VariationSelect.replace(/-/g, "_");
        var $PPOMSelectOption = $PPOMSelectID.find("[data-optionid='" + dataOptionId + "']");
        $PPOMSelectOption.prop("selected", true);
        $PPOMSelectID.trigger("change");
    });
	
	// if you want to disable the PPOM field
    $('#your_PPOM_select_ID').prop('disabled', 'disabled');
  • This topic was modified 19 hours, 45 minutes ago by jpcsantos.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer