var variantSelects = (document.querySelector('variant-selects')) ? document.querySelector('variant-selects') : document.querySelector('variant-radios');
var productJson = (typeof productJson === 'undefined') ? [{"id":41565135077424,"title":"Baby\/Child Hand Casting Kit","option1":"Baby\/Child Hand Casting Kit","option2":null,"option3":null,"sku":"102408","requires_shipping":true,"taxable":true,"featured_image":{"id":33607362478128,"product_id":7515863973936,"position":1,"created_at":"2024-07-04T14:58:00+12:00","updated_at":"2024-07-04T14:58:02+12:00","alt":null,"width":1000,"height":750,"src":"\/\/www.resincraft.co.nz\/cdn\/shop\/files\/baby-child-casting-kit-1000x750-with-casting.webp?v=1720061882","variant_ids":[41565135077424]},"available":true,"name":"Accu-Cast Baby\/Child Hand Casting Kit - Baby\/Child Hand Casting Kit","public_title":"Baby\/Child Hand Casting Kit","options":["Baby\/Child Hand Casting Kit"],"price":5999,"weight":0,"compare_at_price":null,"inventory_quantity":2,"inventory_management":"shopify","inventory_policy":"deny","barcode":"751635024083","featured_media":{"alt":null,"id":26133477359664,"position":1,"preview_image":{"aspect_ratio":1.333,"height":750,"width":1000,"src":"\/\/www.resincraft.co.nz\/cdn\/shop\/files\/baby-child-casting-kit-1000x750-with-casting.webp?v=1720061882"}},"requires_selling_plan":false,"selling_plan_allocations":[]}] : productJson;
let selectedOptions = [];
this.rebuildOptions(variantSelects);
// gather a list of valid combinations of options, check to see if the input passed to it matches in a chain of valid options.
function validCombo(inputValue, optionLevel) {
for(let i = 0; i < productJson.length; i++) {
if(optionLevel == 1){
if (productJson[i].option1 == selectedOptions[0] && productJson[i].option2 == inputValue) { return true; }
} else {
if (productJson[i].option1 == selectedOptions[0] && productJson[i].option2 == selectedOptions[1] && productJson[i].option3 == inputValue) { return true; }
}
}
}
function rebuildOptions(variantSelects) {
const pickerType = (variantSelects.querySelectorAll('fieldset').length > 0) ? 'radios' : 'selects';
const fieldsets = (pickerType == 'radios') ? Array.from(variantSelects.querySelectorAll('fieldset')) : Array.from(variantSelects.querySelectorAll('.product-form__input--dropdown'));
selectedOptions = fieldsets.map((fieldset) => {
return (pickerType == 'radios') ? Array.from(fieldset.querySelectorAll('input')).find((radio) => radio.checked).value : Array.from(fieldset.querySelectorAll('select'), (select) => select.value);
});
//loop through the option sets starting from the 2nd set and disable any invalid options
for(let optionLevel = 1, n = fieldsets.length; optionLevel < n; optionLevel++) {
const inputs = (pickerType == 'radios') ? fieldsets[optionLevel].querySelectorAll('input') : fieldsets[optionLevel].querySelectorAll('option');
inputs.forEach(input => {
input.disabled = (validCombo(input.value,optionLevel)) ? false : true;
if(pickerType == 'radios'){
//get the label for the current input (this is what the user clicks, the "pill")
const label = fieldsets[optionLevel].querySelector(`label[for="${input.id}"]`);
label.style.display = (input.disabled) ? "none" : ""; //Hide the option, or comment this line out and use the following lines to style it..
//label.style.opacity = (input.disabled) ? 0.5 : 1;
//label.style.borderStyle = (input.disabled) ? "dashed" : "solid";
//label.style.textDecoration = (input.disabled) ? "none" : "";
} else {
input.hidden = (validCombo(input.value,optionLevel)) ? false : true;
}
});
}
//if the default selected option is disabled with the function above, select the first available option instead
for (let optionLevel = 1, fieldsetsLength = fieldsets.length, change = false; optionLevel < fieldsetsLength && !change; optionLevel++) {
if(pickerType == 'radios'){
if(fieldsets[optionLevel].querySelector('input:checked').disabled === true) {
change = (fieldsets[optionLevel].querySelector('input:not(:disabled)').checked = true);
}
} else {
if(fieldsets[optionLevel].querySelector('option:checked').disabled === true) {
change = (fieldsets[optionLevel].querySelector('option:not(:disabled)').selected = "selected");
}
}
//if a new option has been selected, restart the whole process
if(change) variantSelects.dispatchEvent(new Event('change', { bubbles: true }));
}
// Select the node that will be observed for mutations
const targetNode = variantSelects.parentElement;
// Options for the observer (which mutations to observe)
const config = { attributes: false, childList: true, subtree: false };
// Callback function to execute when mutations are observed
const callback = (mutationList, observer) => {
for (const mutation of mutationList) {
if (mutation.addedNodes.length > 0) {
for (const addedNode of mutation.addedNodes) {
if (addedNode.nodeName == "VARIANT-SELECTS") {
variantSelects = addedNode;
this.rebuildOptions(addedNode);
}
}
}
}
};
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);}
Low stock: 2 left
Couldn't load pickup availability
Product Information
Suitability
Not Suitable
The Accu-Cast™ Baby / Child Hand Casting Kit is recommended for hand casting of children up to about 7 years old.
This kit contains everything you need to easily and quickly create your very own baby or child's hand castings.
Complete Baby / Child Hand Casting Kit is an easy and fun way to learn this art form. Recommended for hand casting of children up to about 7 years old.
This kit contains everything you need to easily and quickly create your very own baby or child's hand castings. An additional bag of alginate included, should you need to re-make the hand mold.
Kit Contains:
Two bags of our BabyGel 2 (380) Alginate- 6 oz each
One bag of our LiquiStone Casting Stone- 18 oz
One 32 oz molding bucket
One Thermometer
One small bag LiquiStone for fixing small problems with casting