Behavior Reflection Sheets & Think Sheets for Students – Elementary and Middle School Bundle

SKU 12610438 Category

Description

These behavior reflection sheets give elementary and middle school students structured support for thinking through behavior, understanding its effect on others, and deciding what they can do differently next time. Instead of relying on one generic form for every situation, this bundle includes more than 85 targeted behavior think sheets addressing common classroom, social, emotional, and behavioral concerns.

A student may know that a behavior broke a rule without understanding what led to it, who was affected, or which skill could help in a similar situation. I designed these sheets to move the conversation beyond “What did you do wrong?” and toward reflection, accountability, problem-solving, and repair.

Behavior Reflection Sheets for Specific Situations

Generic reflection forms can lead to generic answers. A student may write that they will “be good next time” without identifying a realistic alternative response.

Each student behavior reflection sheet focuses on a particular concern, such as interrupting, refusing work, excluding classmates, reacting physically, ignoring feedback, or struggling during transitions. This makes it easier to guide students toward reflection that connects directly to what happened.

Students are prompted to consider:

  • What happened
  • Why it happened
  • Who was affected
  • Why the behavior mattered
  • What they could do instead
  • How they can respond in a similar situation
  • What their plan is for moving forward

Space is also included for teacher comments and an optional parent or guardian signature.

More Than a Consequence

These behavior think sheets are intended to support instruction, not simply give students another consequence. They help students slow down, examine the situation, and practice the thinking involved in making a more successful choice.

Depending on the sheet and situation, students may practice:

  • Identifying feelings, triggers, or unmet needs
  • Recognizing how their behavior affected other people
  • Taking responsibility without shame or labels
  • Considering appropriate replacement behaviors
  • Practicing problem-solving and decision-making
  • Repairing harm or rebuilding trust
  • Creating a realistic plan for next time
  • Strengthening self-awareness and self-monitoring

Students still need clear expectations and appropriate follow-through. These worksheets provide a structured way to teach the skills that reminders and consequences alone may not address.

What’s Included in the Behavior Reflection Sheets Bundle

This bundle includes more than 85 behavior-specific reflection sheets organized into 12 areas:

Classroom Disruptions

Topics include calling out, talking during independent work, leaving a seat without permission, interrupting, making excessive noise, and distracting classmates.

Emotional Regulation Issues

Topics include yelling, crying without requesting help, leaving when upset, reacting strongly to small problems, breaking or damaging items, and insisting on having things one particular way.

Not Following Directions

Topics include ignoring instructions, arguing with the teacher, refusing work, delaying compliance, ignoring nonverbal cues, and doing the opposite of what was requested.

General Rule Breaking

Topics include inappropriate language, leaving a mess, writing on school property, passing notes, interrupting conversations, and talking back to adults.

Honesty and Responsibility

Topics include lying, cheating, blaming others, refusing to admit mistakes, breaking promises or agreements, and avoiding responsibility for choices.

Off-Task Behaviors

Topics include playing with objects, daydreaming, talking to friends during work, using devices without permission, asking unrelated questions, spending too much time organizing, and requesting help before attempting the work.

Out-of-Class Settings

Topics address behavior during lunch, recess, music, physical education, art, library, computer activities, assemblies, field trips, and bus transportation.

Physical Behaviors

Topics include pushing, hitting, kicking, throwing objects, touching others without permission, spitting, climbing on furniture, damaging belongings, and taking things from others.

Respecting Rules and Boundaries

Topics include personal space, running in hallways, restroom behavior, substitute-teacher expectations, using others’ belongings, and following technology or equipment rules.

Self-Monitoring Issues

Topics include rushing through work, forgetting materials, giving up instead of asking for help, ignoring feedback, wasting work time, and failing to check completed work.

Social and Peer Issues

Topics include disrespectful language, gossip, excluding classmates, not sharing, teasing, bullying, one-upping, bossing peers, and encouraging others to make an inappropriate choice.

Transitions and Routines

Topics include morning routines, transitions, fire drills and emergency procedures, cleaning up, dismissal, and beginning the next activity.

Two-Page Guided Reflection Format

Each topic uses a two-page format that guides students from understanding the incident to planning a different response.

The first page helps students identify what happened, why it happened, who was affected, and why the behavior was a concern. The second page shifts the focus toward instruction by asking students to identify another response, work through a related scenario, and develop a plan.

This structure can help prevent the activity from becoming a copied apology or a quick answer completed without meaningful thought.

Editable Think Sheet Template Included

Students and situations do not always fit neatly into a prepared category. The bundle includes an editable template that allows you to create an additional behavior reflection sheet using the same guided structure.

Use the template to address:

  • A behavior not already included
  • A school-specific expectation
  • An individual student need
  • Language used in a classroom behavior system
  • A situation requiring more personalized prompts

Ways to Use These Behavior Think Sheets

Use the sheets as part of:

  • Individual behavior reflection
  • Restorative conversations
  • Classroom problem-solving
  • Behavior intervention plans
  • SEL or social-skills instruction
  • Counseling or behavior-support groups
  • Parent-teacher conferences
  • Home-school communication
  • Behavior documentation
  • MTSS or student-support planning
  • Reentry conversations after a difficult situation

The sheets may be completed independently when a student has the reading, writing, and reflection skills needed. Other students may benefit from completing them with an adult who can help them understand the questions and develop a realistic response.

Flexible Support for Elementary and Middle School Students

The targeted format allows teachers to select the sheet that most closely matches the student’s situation rather than asking every student to complete the same general worksheet. Use only the pages you need and choose the amount of adult support based on the student’s age, language skills, emotional state, and ability to reflect.

These behavior reflection worksheets can be used after a student is calm enough to think clearly. They should not be used to force written reflection during escalation or as a replacement for instruction, regulation support, an individualized behavior plan, or a functional behavior assessment when one is needed.

Help Students Reflect, Repair, and Try Again

Students need accountability, but accountability is more meaningful when they understand the situation and know what to do differently. These behavior reflection sheets and think sheets for behavior give teachers a ready-to-use structure for turning challenging moments into opportunities for reflection, skill-building, and a more successful next step.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

.elementor-element-9643cc1:has(#product-bundle-guide) { display: none; } .elementor-element-6e3bdc7e .elementor-widget-container .related > h2, .elementor-element-6e3bdc7e .related > .product-bundle-options > h2 { font-family: 'Open Sans', sans-serif !important; font-size: clamp(1.375rem, 2.1vw, 1.75rem) !important; font-weight: 700 !important; line-height: 1.3; } .related .product-bundle-options h3 { font-weight: 600; } .related .product-bundle-options .bundle-card-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 105px), 1fr)); gap: 0.75rem; align-items: stretch; padding: 0; } .related .bundle-card-grid li { margin: 0; } .related .bundle-card-grid a { display: flex; flex-direction: column; height: 100%; gap: 0.45rem; padding: 0.5rem; border: 1px solid #dce9e9; border-radius: 7px; background: #fff; color: #00536b; line-height: 1.3; text-decoration: none; } .related .bundle-card-grid a:hover, .related .bundle-card-grid a:focus-visible { border-color: #087879; } .related .bundle-card-grid img { display: block; width: 100%; max-width: 220px; height: auto; aspect-ratio: 1 / 1; object-fit: contain; align-self: center; } .related .bundle-card-grid .bundle-card-name { text-decoration: none; } .related .bundle-card-grid .bundle-card-price { margin-top: auto; font-size: 0.9rem; } .elementor-element-6e3bdc7e .related > .product-bundle-options { margin: 0 0 2.25rem; padding: 0; border: 0; background: transparent; box-shadow: none; } .elementor-element-6e3bdc7e .related > .product-bundle-options > h2 { margin: 0 0 1rem; } .elementor-element-6e3bdc7e .related > h2::after, .elementor-element-6e3bdc7e .related > .product-bundle-options > h2::after { content: ''; display: block; width: 2rem; height: 3px; margin-top: 0.4rem; border-radius: 2px; background-color: #36adab; } body.single-product :is(#tab-description, .woocommerce-product-details__short-description) p { margin-block-end: 0.85em; } body.single-product :is(#tab-description, .woocommerce-product-details__short-description) :is(ul, ol) + p { margin-block-start: 0.85em; } .elementor-element-6e3bdc7e .related ul.products li.product .woocommerce-loop-product__title { font-size: 1rem !important; line-height: 1.3; } (() => { const products = {"18294":[21276],"18299":[21276],"18301":[21276],"18302":[21276],"18305":[23979,21282],"18306":[23979,21282],"18308":[23979,21393,21282],"18309":[23979,21393,21282],"18311":[23981,21282],"18312":[23982,21282],"18332":[23982,21393,21282],"18333":[23982,21282],"18334":[23981,21282],"18335":[23979,21282],"18336":[23981,21282],"18337":[23981,21282],"18338":[23981,21393,21282],"18339":[23982,21393,21282],"18416":[21377,21283],"18418":[21364,21283],"18420":[21391,21283],"18422":[23787,21283],"18424":[21366,21283],"18426":[21390,21283],"18428":[21368,21283],"18430":[23788,21283],"18432":[23785,21283],"18434":[23784,21283],"18436":[21379,21283],"18438":[21363,21283],"18440":[21365,21283],"18442":[21369,21283],"18444":[21372,21283],"18446":[21373,21283],"18448":[21370,21283],"18452":[21385,21283],"18454":[21386,21283],"18456":[21384,21283],"18458":[21371,21283],"18460":[21388,21283],"18462":[21387,21283],"18466":[21382,21283],"18470":[21381,21283],"18472":[21383,21283],"18474":[21375,21283],"18476":[21389,21283],"18480":[21374,21283],"18482":[21367,21283],"18484":[23786,21283],"18486":[21380,21283],"18488":[21378,21283],"18490":[21376,21283],"18492":[21392,21283],"18494":[21565],"18536":[21565],"18537":[21565],"18538":[21565],"18539":[21565],"18540":[21565],"18541":[21565],"18542":[21565],"18630":[21565],"18631":[21565],"18632":[21565],"18633":[21565],"18634":[21565],"18635":[21565],"18636":[21565],"18637":[21565],"18638":[21565],"18639":[21565],"18640":[21565],"18641":[21565],"18642":[21565],"18643":[21565],"18644":[21565],"18645":[21565],"18646":[21565],"18647":[21565],"18648":[21565],"18649":[21565],"18650":[21565],"18651":[21565],"18652":[21565],"18653":[21565],"18654":[21565],"18655":[21565],"18656":[21551],"21245":[21313,21316,21317],"21275":[21276],"21279":[21364,21289],"21280":[23788,21289],"21281":[23785,21289],"21284":[23784,21289],"21285":[21377,21289],"21286":[21366,21289],"21287":[21368,21289],"21288":[21379,21289],"21290":[21363,21314],"21291":[21364,21314],"21292":[21365,21314],"21293":[21366,21314],"21294":[21368,21314],"21295":[21369,21314],"21296":[21370,21314],"21297":[23784,21314],"21298":[21372,21314],"21299":[23788,21314],"21300":[21373,21314],"21301":[21374,21314],"21302":[23786,21314],"21303":[21376,21314],"21304":[21377,21314],"21305":[21378,21314],"21306":[21379,21314],"21307":[23785,21314],"21308":[21380,21314],"21310":[21313,21316,21317],"21311":[21313,21316,21317],"21312":[21313,21316,21317],"21318":[21367,21314],"21319":[21371,21314],"21320":[21375,21314],"21321":[21392,21314],"21322":[21381,21314],"21323":[21382,21314],"21324":[21383,21314],"21325":[21384,21314],"21326":[21385,21314],"21327":[21386,21314],"21328":[21387,21314],"21329":[21388,21314],"21330":[21389,21314],"21332":[21390,21314],"21333":[23787,21314],"21334":[21391,21314],"21336":[21369,21289],"21337":[21370,21289],"21338":[21372,21289],"21339":[21371,21289],"21340":[21367,21289],"21341":[21365,21289],"21342":[21363,21289],"21343":[21373,21289],"21344":[21374,21289],"21345":[23786,21289],"21346":[21375,21289],"21347":[21376,21289],"21348":[21384,21289],"21349":[21378,21289],"21350":[21390,21289],"21351":[23787,21289],"21352":[21391,21289],"21353":[21380,21289],"21354":[21392,21289],"21355":[21381,21289],"21356":[21382,21289],"21357":[21383,21289],"21358":[21385,21289],"21359":[21386,21289],"21360":[21387,21289],"21361":[21388,21289],"21362":[21389,21289],"21401":[23981,21393,21282],"21402":[23981,21282],"21406":[21412],"21407":[21412],"21408":[21412],"21409":[21412],"21410":[21412],"21411":[21412],"21413":[21423,21426],"21414":[21423,21426],"21415":[21423,21426],"21416":[21424,21426],"21417":[21424,21426],"21418":[21424,21426],"21419":[21425,21426],"21420":[21425,21426],"21421":[21425,21426],"21422":[21425,21426],"21423":[21426],"21424":[21426],"21425":[21426],"21427":[21363],"21428":[21364],"21429":[21365],"21430":[21366],"21431":[21367],"21432":[21368],"21433":[21369],"21434":[21370],"21435":[23784],"21436":[21371],"21437":[21372],"21438":[23788],"21439":[21373],"21440":[21374],"21441":[23786],"21442":[21375],"21443":[21376],"21444":[21377],"21445":[21378],"21446":[21379],"21447":[23785],"21448":[21380],"21449":[21392],"21450":[21381],"21451":[21382],"21452":[21383],"21453":[21384],"21454":[21385],"21455":[21386],"21456":[21387],"21457":[21388],"21458":[21389],"21459":[21390],"21460":[23787],"21461":[21391],"21481":[23981,21282],"21482":[21569],"21491":[23982,21282],"21492":[21551],"21493":[21551],"21494":[21551],"21495":[21551],"21496":[21551],"21497":[21551],"21498":[21551],"21499":[21551],"21500":[21551],"21501":[21551],"21502":[21551],"21503":[21551],"21506":[22803],"21507":[22803],"21508":[22803],"21509":[22803],"21510":[22803],"21511":[22803],"21512":[22803],"21513":[22803],"21514":[22803],"21515":[22803],"21516":[22803],"21517":[22803],"21519":[21566,21568],"21520":[21566,21568],"21521":[21567,21568],"21522":[21567,21568],"21523":[21533],"21524":[21533],"21525":[21533],"21526":[21533],"21527":[21533,21569],"21528":[21533],"21529":[21533],"21530":[21533],"21531":[21533],"21532":[21533],"21536":[22803],"21552":[21563],"21553":[21563],"21554":[21563],"21555":[21563],"21556":[21563],"21557":[21563],"21558":[21563],"21559":[21563],"21560":[21563],"21561":[21563],"21562":[21563],"21566":[21568],"21567":[21568]}; const bundles = {"21276":["/product/iep-behavior-progress-monitoring-bundle/","IEP Behavior Progress Monitoring Bundle"],"21282":["/product/sel-read-aloud-activities-bundle/","Full SEL Read-Aloud Activities Bundle"],"21283":["/product/token-boards-with-visuals-bundle/","Token Boards with Visuals Bundle"],"21289":["/product/student-behavior-point-sheets-bundle/","Student Behavior Point Sheets Bundle"],"21313":["/product/fba-forms-bundle/","FBA Forms Bundle"],"21314":["/product/daily-reward-charts-bundle/","35 Themed Daily Reward Charts Bundle"],"21316":["/product/fba-and-bip-bundle/","FBA & BIP Bundle"],"21317":["/product/fba-bip-progress-monitoring-bundle/","FBA, BIP & Progress Monitoring Bundle"],"21363":["/product/airplanes-behavior-support-toolkit/","Airplanes Behavior Support Toolkit"],"21364":["/product/aliens-behavior-support-toolkit/","Aliens Behavior Support Toolkit"],"21365":["/product/astronaut-behavior-support-toolkit/","Astronaut Behavior Support Toolkit"],"21366":["/product/autumn-behavior-support-toolkit/","Autumn Behavior Support Toolkit"],"21367":["/product/baseball-behavior-support-toolkit/","Baseball Behavior Support Toolkit"],"21368":["/product/basketball-behavior-support-toolkit/","Basketball Behavior Support Toolkit"],"21369":["/product/beach-behavior-support-toolkit/","Beach Behavior Support Toolkit"],"21370":["/product/birds-behavior-support-toolkit/","Birds Behavior Support Toolkit"],"21371":["/product/cinderella-behavior-support-toolkit/","Cinderella Behavior Support Toolkit"],"21372":["/product/construction-behavior-support-toolkit/","Construction Behavior Support Toolkit"],"21373":["/product/dino-babies-behavior-support-toolkit/","Dino Babies Behavior Support Toolkit"],"21374":["/product/dinosaur-behavior-support-toolkit/","Dinosaur Behavior Support Toolkit"],"21375":["/product/farm-behavior-support-toolkit/","Farm Behavior Support Toolkit"],"21376":["/product/flowers-behavior-support-toolkit/","Flowers Behavior Support Toolkit"],"21377":["/product/football-behavior-support-toolkit/","Football Behavior Support Toolkit"],"21378":["/product/frogs-behavior-support-toolkit/","Frogs Behavior Support Toolkit"],"21379":["/product/gamer-behavior-support-toolkit/","Gamer Behavior Support Toolkit"],"21380":["/product/valentines-day-behavior-support-toolkit/","Valentines Day Behavior Support Toolkit"],"21381":["/product/jungle-behavior-support-toolkit/","Jungle Behavior Support Toolkit"],"21382":["/product/kittens-behavior-support-toolkit/","Kittens Behavior Support Toolkit"],"21383":["/product/brick-building-behavior-support-toolkit/","Brick Building Behavior Support Toolkit"],"21384":["/product/mermaids-behavior-support-toolkit/","Mermaids Behavior Support Toolkit"],"21385":["/product/sleeping-princess-behavior-support-toolkit/","Sleeping Princess Behavior Support Toolkit"],"21386":["/product/bayou-princess-behavior-support-toolkit/","Bayou Princess Behavior Support Toolkit"],"21387":["/product/puppies-behavior-support-toolkit/","Puppies Behavior Support Toolkit"],"21388":["/product/rapunzel-behavior-support-toolkit/","Rapunzel Behavior Support Toolkit"],"21389":["/product/singers-behavior-support-toolkit/","Singers Behavior Support Toolkit"],"21390":["/product/superheroes-behavior-support-toolkit/","Superheroes Behavior Support Toolkit"],"21391":["/product/unicorns-behavior-support-toolkit/","Unicorns Behavior Support Toolkit"],"21392":["/product/hockey-behavior-support-toolkit/","Hockey Behavior Support Toolkit"],"21393":["/product/my-dragon-sel-read-alouds-bundle/","My Dragon SEL Read-Alouds Bundle"],"21412":["/product/dolch-sight-words-flash-cards/","Complete Dolch Sight Words Bundle"],"21423":["/product/fry-first-300-sight-words/","Fry First 300 Sight Words Bundle"],"21424":["/product/fry-fourth-sixth-100-sight-words-flash-cards/","Fry Fourth–Sixth 100 Sight Words Bundle"],"21425":["/product/fry-seventh-tenth-100-sight-words-flash-cards/","Fry Seventh–Tenth 100 Sight Words Bundle"],"21426":["/product/fry-sight-words-flash-cards/","Complete Fry 1,000 Sight Words Bundle"],"21533":["/product/student-self-monitoring-checklists-bundle/","Student Self-Monitoring Checklists Bundle"],"21551":["/product/traffic-light-behavior-chart-bundle/","Traffic Light Behavior Chart Bundle"],"21563":["/product/would-you-rather-questions-for-students/","Would You Rather & Write the Room Bundle"],"21565":["/product/smiley-face-behavior-chart-bundle/","Smiley Face Behavior Chart Bundle"],"21566":["/product/k-5th-grade-functional-life-skills-checklist/","K–5 Functional Life Skills Checklist Bundle"],"21567":["/product/6th-12th-grade-functional-life-skills-checklist/","Grades 6–12 Functional Life Skills Checklist Bundle"],"21568":["/product/k-12th-grade-functional-life-skills-checklist/","K–12 Functional Life Skills Checklist Bundle"],"21569":["/product/time-on-task-data-sheet/","Time on Task Observation & Self-Monitoring Bundle"],"22803":["/product/behavior-reflection-sheets/","Complete Think Sheet Collection"],"23784":["/product/christmas-behavior-support-toolkit/","Christmas Behavior Support Toolkit"],"23785":["/product/halloween-behavior-support-toolkit/","Halloween Behavior Support Toolkit"],"23786":["/product/easter-behavior-support-toolkit/","Easter Behavior Support Toolkit"],"23787":["/product/thanksgiving-behavior-support-toolkit/","Thanksgiving Behavior Support Toolkit"],"23788":["/product/dia-de-los-muertos-behavior-support-toolkit/","Día de los Muertos Behavior Support Toolkit"],"23979":["/product/emotional-regulation-read-aloud-bundle/","Emotional Regulation Read-Aloud Bundle"],"23981":["/product/social-skills-read-aloud-bundle/","Social Skills Read-Aloud Bundle"],"23982":["/product/growth-mindset-read-aloud-bundle/","Growth Mindset Read-Aloud Bundle"]}; async function addBundleImagesAndPrices(list, options) { const query = new URLSearchParams({ include: options.join(','), per_page: String(options.length), _fields: 'id,images,prices' }); const response = await fetch('/wp-json/wc/store/v1/products?' + query); if (!response.ok) return; const items = await response.json(); if (!Array.isArray(items)) return; const byId = new Map(items.map(item => [Number(item.id), item])); const cards = [...list.querySelectorAll('a')]; for (const [index, option] of options.entries()) { const item = byId.get(Number(option)); const link = cards[index]; if (!item || !link) continue; const cover = item.images?.[0]; const name = document.createElement('span'); name.className = 'bundle-card-name'; name.textContent = link.textContent; link.replaceChildren(name); if (cover?.thumbnail || cover?.src) { const image = document.createElement('img'); image.src = cover.thumbnail || cover.src; image.alt = ''; image.width = image.height = 300; image.loading = 'lazy'; image.decoding = 'async'; link.prepend(image); } const prices = item.prices; if (prices?.price != null && prices.price !== '') { const formatted = new Intl.NumberFormat(document.documentElement.lang || 'en-US', { style: 'currency', currency: prices.currency_code }).format(Number(prices.price) / 10 ** prices.currency_minor_unit); const price = document.createElement('span'); price.className = 'bundle-card-price'; price.textContent = formatted; link.append(price); } } if (list.querySelector('.bundle-card-name')) list.classList.add('bundle-card-grid'); } function showBundleOptions() { if (!document.body.classList.contains('single-product')) return; const id = document.body.className.match(/\bpostid-(\d+)\b/)?.[1]; const options = products[id]; if (!options || document.querySelector('.product-bundle-options')) return; const related = document.querySelector('.elementor-element-6e3bdc7e .related'); const description = document.querySelector('#tab-description'); const title = document.querySelector('.elementor-element-79ab709 h1'); const box = document.createElement('div'); box.className = 'product-bundle-options'; const heading = document.createElement('h3'); heading.textContent = 'Also available in a bundle'; if (options.length > 1) heading.textContent = 'Also available in these bundles'; const list = document.createElement('ul'); for (const option of options) { const [url, label] = bundles[option]; const item = document.createElement('li'); const link = document.createElement('a'); link.href = url; link.textContent = label; item.append(link); list.append(item); } box.append(heading, list); const relatedHeading = related?.querySelector(':scope > h2'); const firstParagraph = description?.querySelector(':scope > p'); if (firstParagraph) firstParagraph.after(relatedHeading ? box.cloneNode(true) : box); else title?.after(relatedHeading ? box.cloneNode(true) : box); if (relatedHeading) { const bundleHeading = document.createElement('h2'); bundleHeading.textContent = 'Also Available In'; heading.replaceWith(bundleHeading); relatedHeading.textContent = 'Related Products'; relatedHeading.before(box); addBundleImagesAndPrices(list, options).catch(() => {}); } } async function showSameTypeProducts() { if (!document.body.classList.contains('single-product')) return; const currentId = document.body.className.match(/\bpostid-(\d+)\b/)?.[1]; const grid = document.querySelector('.elementor-element-6e3bdc7e .related > ul.products'); if (!currentId || !grid || Object.hasOwn(bundles, currentId)) return; const themedCategories = [ 'behavior-point-sheets', 'behavior-reward-charts-for-students', 'token-boards-token-economy', 'i-need-a-break-cards', 'smiley-face-behavior-charts', 'traffic-light-behavior-charts' ]; const categoryLinks = [...document.querySelectorAll('.elementor-element-394e597b .posted_in a')]; const categoryUrl = categoryLinks.map(link => new URL(link.href)).find(url => url.origin === location.origin && themedCategories.includes(url.pathname.split('/').filter(Boolean).at(-1)) ); if (!categoryUrl) return; const category = categoryUrl.pathname.split('/').filter(Boolean).at(-1); const response = await fetch(categoryUrl.href); if (!response.ok) return; const archive = new DOMParser().parseFromString(await response.text(), 'text/html'); const candidates = [...archive.querySelectorAll('.elementor-element-5c577e03 ul.products > li.product')]; const matches = candidates.filter(card => { const id = [...card.classList].find(name => /^post-\d+$/.test(name))?.slice(5); return id && id !== currentId && !Object.hasOwn(bundles, id) && card.classList.contains('product_cat-' + category); }).slice(0, 4); if (matches.length { const copy = document.importNode(card, true); copy.classList.remove('first', 'last'); for (const image of copy.querySelectorAll('img')) { image.loading = 'lazy'; if (image.dataset.src && (!image.getAttribute('src') || image.getAttribute('src').startsWith('data:'))) { if (image.dataset.sizes) image.sizes = image.dataset.sizes; if (image.dataset.srcset) image.srcset = image.dataset.srcset; image.src = image.dataset.src; image.classList.remove('lazyload'); } } return copy; }); grid.replaceChildren(...cards); } function showProductRecommendations() { showBundleOptions(); showSameTypeProducts().catch(() => {}); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', showProductRecommendations, { once: true }); else showProductRecommendations(); })();