{
    const queryString = new URLSearchParams(new FormData($refs.filter_form)).toString()
    loading = true;
    fetch('/collections/bestsellers?' + queryString)
      .then(response => response.text())
      .then(data => {
        let html_div = document.createElement('div');
        html_div.innerHTML = data;
        let html_dom = html_div.querySelector('#ProductGridContainer').innerHTML;
        document.querySelector('#ProductGridContainer').innerHTML = html_dom;
        // update url without refreshing the page
        history.replaceState(null, null, '?' + queryString);
      })
      .catch(error => console.error('Error:', error))
      .finally(() => loading = false);
  })"
  >
    
    
          - Featured
- Best selling
- Alphabetically, A-Z
- Alphabetically, Z-A
- Price, low to high
- Price, high to low
- Date, old to new
- Date, new to old
- 
                
        Spin Food Fun WheelRegular price $22.00
- 
                
        Pet Finder TrackerRegular price $10.00
- 
                
        Lickbud FeederRegular price $20.00
- 
                
        PetFeed Portable FeederRegular price $24.00
- 
                
        Electric Pets Nail ClipperRegular price $35.00
- 
                
    Sale    Pet Reflective Collar$16.00 $14.00
- 
                
        Collar With Flashlight Lighting WalkRegular price $51.00
- 
                
    Sale    Durable Dog Ball$26.00 $15.00
- 
                
    Sale    Automatic Pet DrinkerSale price $60.00 $39.00
- 
                
    Sale    Pet Anti-Stress Vest$34.00 $24.00
- 
                
        Fun Tunnel for CatsRegular price $34.00
- 
                
    Sale    Soft Clipper Nail Cutter Scissors$16.00 $14.00
- 
                
        AutoHeat MatRegular price $22.00
- 
                
    Sale    Dog Scooper$25.00 $21.00
- 
                
        Pet Anti Stress PlushRegular price $34.00
 
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
               
            
           
            
              