import wixData from 'wix-data'; $w.onReady(function () { // Make sure dataset is ready before filtering $w("#playersDataset").onReady(() => { // Optional: default to showing all classes $w("#classDropdown").value = "all"; filterByClass("all"); }); // When dropdown changes, filter the dataset $w("#classDropdown").onChange((event) => { const selectedClass = event.target.value; filterByClass(selectedClass); }); // Set up repeater item mapping when dataset has items $w("#rankingsRepeater").onItemReady(($item, itemData, index) => { // index starts at 0, so add 1 to show rank number // or use overallRank from DB if you prefer if (itemData.overallRank) { $item("#rankText").text = itemData.overallRank.toString(); } else { $item("#rankText").text = (index + 1).toString(); } // These are already connected by data bindings, but you CAN override if needed: // $item("#nameText").text = itemData.title; // $item("#positionText").text = itemData.position; // $item("#classYearText").text = itemData.classYear; // $item("#teamText").text = itemData.team; // If you want to handle the image manually: // if (itemData.headshot) { // $item("#headshotImage").src = itemData.headshot; // } // Example if you later add a profile page using profileSlug: // $item("#profileButton").onClick(() => { // wixLocation.to(`/player/${itemData.profileSlug}`); // }); }); }); /** * Filters the playersDataset by class year. * @param {string} classYear - "all", "2026", "2027", "2028" */ function filterByClass(classYear) { let filter = wixData.filter(); if (classYear && classYear !== "all") { // classYear is stored as TEXT in the collection in this setup filter = filter.eq("classYear", classYear); } // Apply filter and keep sort by overallRank ascending $w("#playersDataset") .setFilter(filter) .then(() => { // Optional: ensure sort still correct return $w("#playersDataset").setSort( wixData.sort().ascending("overallRank") ); }) .catch((err) => { console.error("Error filtering dataset:", err); }); }
top of page

Refund Policy

A legal disclaimer

The explanations and information provided on this page are only general and high-level explanations and information on how to write your own document of a Refund Policy. You should not rely on this article as legal advice or as recommendations regarding what you should actually do, because we cannot know in advance what are the specific refund policies that you wish to establish between your business and your customers. We recommend that you seek legal advice to help you understand and to assist you in the creation of your own Refund Policy.

Refund Policy - the basics

Having said that, a Refund Policy is a legally binding document that is meant to establish the legal relations between you and your customers regarding how and if you will provide them with a refund. Online businesses selling products are sometimes required (depending on local laws and regulations) to present their product return policy and refund policy. In some jurisdictions, this is needed in order to comply with consumer protection laws. It may also help you avoid legal claims from customers that are not satisfied with the products they purchased.

What to include in the Refund Policy

Generally speaking, a Refund Policy often addresses these types of issues: the timeframe for asking for a refund; will the refund be full or partial; under which conditions will the customer receive a refund; and much, much more.

bottom of page