5 Best Hardwood Carpet Vacuums: Expert Reviews & Top Picks

Cleaning a home with both elegant hardwood floors and cozy carpets can be a real challenge. You want to keep your gleaming floors scratch-free, yet ensure your carpets are deeply cleaned from pet hair, dust, and debris. This often leads to the dilemma of needing two different cleaning tools or, ideally, finding the perfect multi-surface vacuum. That’s where a dedicated best hardwood carpet vacuum comes in, offering the versatility and power to transition seamlessly between surfaces without compromising on cleanliness or risking damage. We’ve taken the guesswork out of your search, testing and reviewing some of the top contenders to help you find the ideal cleaning companion for your mixed flooring.

Quick Product Comparison

.modern-product-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
font-size: 14px;
}
.modern-product-table thead th {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 10px 8px;
text-align: left;
font-weight: 600;
font-size: 15px;
border: none;
}
.modern-product-table tbody td {
padding: 10px 8px;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
.modern-product-table tbody tr:last-child td {
border-bottom: none;
}
.product-name {
font-weight: 600;
color: #2d3748;
font-size: 14px;
line-height: 1.4;
max-width: 300px;
}
.product-name a {
color: inherit;
text-decoration: none;
}
.product-name a:hover {
color: #ff6b35 !important;
}
.product-image-cell {
text-align: center;
width: 80px;
}
.product-image-cell img {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 8px;
border: 2px solid #e2e8f0;
transition: transform 0.2s ease;
}
.product-image-cell img:hover {
transform: scale(1.05);
}
.price-button-cell {
text-align: center;
width: 140px;
}
.price-button {
display: inline-block;
background: linear-gradient(135deg, #ff9900 0%, #ff6b35 100%);
color: white;
padding: 8px 12px;
text-decoration: none !important;
border-radius: 6px;
font-weight: 600;
font-size: 13px;
box-shadow: 0 2px 8px rgba(255,153,0,0.3);
transition: all 0.2s ease;
white-space: nowrap;
}
.price-button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(255,153,0,0.4);
}
@media (max-width: 768px) {
.modern-product-table {
font-size: 13px;
}
.modern-product-table thead th {
padding: 8px 6px;
font-size: 14px;
}
.modern-product-table tbody td {
padding: 8px 6px;
}
.product-name {
font-size: 13px;
max-width: 200px;
}
.product-image-cell img {
width: 50px;
height: 50px;
}
.price-button {
padding: 6px 10px;
font-size: 12px;
}
}
@media (max-width: 480px) {
.modern-product-table {
font-size: 12px;
}
.modern-product-table thead th {
padding: 6px 4px;
font-size: 13px;
}
.modern-product-table tbody td {
padding: 6px 4px;
}
.product-name {
font-size: 12px;
max-width: 150px;
}
.product-image-cell {
width: 60px;
}
.product-image-cell img {
width: 40px;
height: 40px;
}
.price-button-cell {
width: 120px;
}
.price-button {
padding: 5px 8px;
font-size: 11px;
}
}

<!–

–>

<!–

–>

<!–

–>

<!–

–>

<!–

–>

Product Image Check Price
1. Eureka PowerSpeed Lightweight Upright Vacuum for Carpet, Hard Floor, and Pet Hair…. Eureka PowerSpeed Lightweight Upright Vacuum for Carpet, Hard Floor, a ⭐ 4.3/5 Check Price
2. Tineco iFLOOR 5 Breeze Wet Dry Cordless Vacuum for Hard Floors with Self-Cleaning…. Tineco iFLOOR 5 Breeze Wet Dry Cordless Vacuum for Hard Floors with Se ⭐ 4.1/5 Check Price
3. Shark Upright Vacuum, Navigator Lift-Away Deluxe with Large Dust Cup Capacity, HEPA Filter, Swive…… Shark Upright Vacuum, Navigator Lift-Away Deluxe with Large Dust Cup C ⭐ 4.4/5 Check Price
4. Bissell CleanView Swivel Upright Bagless Vacuum for Pet Hair, Carpet, and Hard Floors…. Bissell CleanView Swivel Upright Bagless Vacuum for Pet Hair, Carpet, ⭐ 4.5/5 Check Price
5. Bissell CleanView Swivel Upright Vacuum with Triple Action Brush Roll for Carpet and Hard Floors…. Bissell CleanView Swivel Upright Vacuum with Triple Action Brush Roll ⭐ 4.5/5 Check Price

Our Top 5 Best Hardwood Carpet Vacuum Reviews – Expert Tested & Recommended

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

🏆 Best Choice

1. Eureka PowerSpeed Lightweight Upright Vacuum for Carpet, Hard Floor, and Pet Hair.

Eureka PowerSpeed Lightweight Upright Vacuum for Carpet, Hard Floor, and Pet Hair.

The Eureka PowerSpeed Lightweight Upright Vacuum is a fantastic all-rounder for homes with mixed flooring. It strikes an impressive balance between being incredibly lightweight and delivering robust suction power, making it a dream for daily clean-ups. Whether you’re dealing with stubborn pet hair on carpets or fine dust on hardwood, this vacuum handles it with ease, proving to be a true hardwood carpet vacuum champion.

Key Features That Stand Out

  • Lightweight Yet Powerful: Weighing just 10 pounds, it offers heavyweight cleaning performance that’s easy to maneuver and carry.
  • Strong Suction Across Surfaces: A 960-watt motor ensures consistent suction on multiple floor types, from hardwood and tile to plush carpets.
  • Extra-Large Dust Cup: The 2.6-liter capacity minimizes interruptions, allowing for longer cleaning sessions, and it’s easy to empty.
  • Pet Hair Attachment: Comes with a turbo brush specifically designed for tackling pet hair on upholstery and stairs effectively.

Why We Recommend It

We recommend the Eureka PowerSpeed because it genuinely simplifies cleaning for homes with both hardwood and carpet. Its powerful suction combined with its lightweight design makes it less of a chore to vacuum the entire house. Plus, the extra-large dust cup means less frequent emptying, which is a huge convenience.

Best For

This vacuum is best for individuals and families looking for an affordable, lightweight, and powerful upright vacuum that can effectively clean both hardwood floors and carpets, especially those with pets.

Pros and Cons

Pros:
  • Excellent suction power on both hard floors and carpets.
  • Extremely lightweight and easy to maneuver around furniture.
  • Large dust cup capacity reduces emptying frequency.
  • Includes specialized tools for pet hair and crevices.
Cons:
  • May not have advanced features found in more expensive models.
  • Corded design means needing to unplug and replug in larger spaces.
  • Some users might find it less effective on very thick, high-pile carpets.

Customer Reviews

Customer Review: My previous vacuum was by a very popular brand, and it was expensive. It had every feature that you could imagine and worked as an upright, canister, and handheld unit. I had it for years and hated it. Why? Because it was very heavy, unwieldy, and bulky. None of the accessories were mounted on the.

Customer Review: I am close to 80 years old and I have had about every brand of vacuum on the market. My last vacuum weight 16 lb. and was hard to manuver. I saw this Eureka power speed model NEU180D which was 10 lb. and said it had great suction, with a turbo brush. I am so glad I got it. I have 3 large bird cages.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

⭐ Editor’s Choice

See also  5 Best Mop Vac for Sand & Dog Hair: Expert Picks for Ultimate Clean

2. Tineco iFLOOR 5 Breeze Wet Dry Cordless Vacuum for Hard Floors with Self-Cleaning.

Tineco iFLOOR 5 Breeze Wet Dry Cordless Vacuum for Hard Floors with Self-Cleaning.

The Tineco iFLOOR 5 Breeze is a game-changer for hard floor cleaning, offering a unique wet/dry vacuum and mop in one step. While it primarily excels on hard floors, its ability to tackle wet and dry messes efficiently means it significantly reduces the overall cleaning burden. For homes with a mix of hard floors and area rugs, this machine helps keep your hard surfaces spotless, allowing a separate, gentler approach for carpets if needed. It’s a fantastic solution for a pristine clean, acting as a superb hard floor complement to any hardwood carpet vacuum strategy.

Key Features That Stand Out

  • Vacuum and Mop in One Step: Cleans wet and dry messes simultaneously, eliminating the need to sweep before mopping.
  • Fresh Water Cleaning: Innovative scraper technology ensures you’re always cleaning with fresh water, not dirty water.
  • Hands-Free Self-Cleaning: A self-cleaning cycle thoroughly cleans the roller brush and tubing with a single press, simplifying maintenance.
  • Cordless Freedom: Offers the convenience of cordless operation, letting you move freely without being tethered to an outlet.

Why We Recommend It

We recommend the Tineco iFLOOR 5 Breeze for its revolutionary ability to combine vacuuming and mopping for hard floors. It saves a tremendous amount of time and effort, making routine cleaning much more efficient. The self-cleaning function is a major bonus, keeping the device hygienic and ready for the next use.

Best For

This vacuum is best for homes with predominantly hard floors (hardwood, tile, laminate) that want an all-in-one solution for wet and dry messes, or as a complementary tool alongside a dedicated carpet vacuum.

Pros and Cons

Pros:
  • Exceptional wet and dry cleaning for hard surfaces.
  • Significant time-saver by combining two cleaning steps into one.
  • Convenient hands-free self-cleaning system.
  • Cordless design offers excellent mobility and ease of use.
Cons:
  • Primarily designed for hard floors; not suitable for deep carpet cleaning.
  • Requires regular emptying of dirty water tank and refilling of clean water.
  • Battery life, while good, is finite and requires recharging.

Customer Reviews

Customer Review: I bought this at a discounted price during Amazon prime day. I have the S3, which I love, but was excited over new and improved features the latest edition flaunted.Let me tell you what I appreciated:-Closer cleaning to the edges: Okay, so though there is a smidge of an improvement here- the new edi.

Customer Review: I absolutely love this! Buy it, buy it now or when it’s on sale. I have only had it for about 2 weeks so can’t speak to longevity.I have a long haired German shepherd 2 cats, a bird, and a husband. This vacuum does not quit. Pet accidents, mud, sticky watermelon juice it gets it up!I got the s5 and.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

💰 Best Budget

3. Shark Upright Vacuum, Navigator Lift-Away Deluxe with Large Dust Cup Capacity, HEPA Filter, Swive…

Shark Upright Vacuum, Navigator Lift-Away Deluxe with Large Dust Cup Capacity, HEPA Filter, Swivel Steering

The Shark Navigator Lift-Away Deluxe is a household favorite for its powerful suction and versatile design, making it a strong contender for the best hardwood carpet vacuum. Its unique Lift-Away feature allows you to detach the canister for portable cleaning, which is incredibly handy for stairs, upholstery, or even high-up areas. With excellent filtration and strong performance on both carpets and bare floors, it’s a reliable choice that offers great value.

Key Features That Stand Out

  • Powerful Suction: Delivers deep cleaning on carpets and effectively tackles debris on bare floors with consistent power.
  • Lift-Away Functionality: Detachable canister allows for portable cleaning, reaching under furniture or cleaning above-floor areas easily.
  • Anti-Allergen Complete Seal Technology: Combined with a HEPA filter, it traps 99.9% of dust and allergens inside the vacuum.
  • Swivel Steering: Provides excellent maneuverability, making it easy to navigate around furniture and tight corners.

Why We Recommend It

We highly recommend the Shark Navigator Lift-Away Deluxe for its incredible versatility and robust cleaning power at a friendly price point. The ability to switch between an upright and a portable canister is a huge advantage for comprehensive home cleaning. Plus, the HEPA filtration is a big win for allergy sufferers.

Best For

This vacuum is best for allergy sufferers and pet owners who need a versatile vacuum that can handle both deep carpet cleaning and gentle hardwood floor care, with the added benefit of portable convenience for above-floor tasks.

Pros and Cons

Pros:
  • Strong suction performance on multiple floor types.
  • Lift-Away feature makes cleaning stairs and upholstery effortless.
  • HEPA filter with Anti-Allergen Seal is excellent for trapping allergens.
  • Swivel steering enhances maneuverability and ease of use.
Cons:
  • Can be a bit heavy in upright mode compared to lightweight stick vacuums.
  • Not ideal for very low-profile furniture due to its head size.
  • Corded design requires manual unplugging and re-plugging.

Customer Reviews

Customer Review: Warning, it’s a long read, but I wanted to go into deep detail.To start, I have been a Rainbow vacuum user for so long. I love them and felt they worked amazingly.Next, I have 3 dogs & a cat. One is a thick coat lab and the cat sheds so much as well.Another next, I have horrible allergies and wanted.

Customer Review: Definitely get this vacuum. I have a 1bd apartment that is 80% carpet and it works great. I am sure there are better vacuums out there but this vacuum will get a very good amount of your animals hair and dirt out of the carpet. The brush on it definitely works great however longer hair does get tan.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

4. Bissell CleanView Swivel Upright Bagless Vacuum for Pet Hair, Carpet, and Hard Floors.

Bissell CleanView Swivel Upright Bagless Vacuum for Pet Hair, Carpet, and Hard Floors.

The Bissell CleanView Swivel Upright Bagless Vacuum is specifically designed with pet owners in mind, offering powerful suction and specialized tools to tackle stubborn pet hair. Its swivel steering makes navigating around furniture a breeze, and its Triple Action Brush Roll works wonders on both carpets and hard floors. This model is a fantastic option if you’re searching for a reliable hardwood carpet vacuum that also excels at managing pet-related messes.

See also  Top 5 Best Floor Steam Cleaner Mop: Expert Reviews & Top Picks

Key Features That Stand Out

  • Triple Action Brush Roll: Designed to loosen, lift, and remove embedded pet hair and dirt from various surfaces.
  • Swivel Steering: Provides maximum maneuverability, allowing for easy cleaning around obstacles and tight spaces.
  • Every Purchase Saves Pets: Bissell proudly supports the BISSELL Pet Foundation, helping to save homeless pets.
  • Multi-Surface Cleaning: Transitions effectively between carpets and hard floors, delivering strong performance on both.

Why We Recommend It

We recommend the Bissell CleanView Swivel for its impressive pet hair removal capabilities and versatile cleaning performance on both hard floors and carpets. The swivel steering significantly improves the cleaning experience, making it less strenuous to clean your entire home. Plus, supporting a company that gives back to pet causes is a wonderful bonus.

Best For

This vacuum is best for pet owners who need a powerful and maneuverable upright vacuum capable of effectively cleaning pet hair and debris from both carpets and hard floors.

Pros and Cons

Pros:
  • Exceptional at picking up pet hair from all surfaces.
  • Swivel steering makes it easy to navigate and clean tight spots.
  • Strong suction power ensures thorough cleaning.
  • Supports a good cause with every purchase.
Cons:
  • Can be somewhat loud during operation.
  • The brush roll may need occasional cleaning for long hair entanglement.
  • Not as lightweight as some stick or cordless models.

Customer Reviews

Customer Review: Vacuum is really nice and picks up very well. The pet remover tool works great as well on my cats tower and other furniture. I am happy with this product. It is not as loud as other vacuums. Easy to use and put together. Lightweight and swivel is nice along with the cord rewind. Long cord.

Customer Review: This vacuum cleaner is really good — the suction power is excellent. It picks up hair, pet fur, dust, and even crumbs very well. The only downside is that it’s a bit inconvenient to use under the bed or couch, and it’s slightly heavy. Overall, though, it works great!😍

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

5. Bissell CleanView Swivel Upright Vacuum with Triple Action Brush Roll for Carpet and Hard Floors.

Bissell CleanView Swivel Upright Vacuum with Triple Action Brush Roll for Carpet and Hard Floors.

The 2024 model of the Bissell CleanView Swivel Upright Vacuum builds on its predecessor’s success, integrating a Triple Action Brush Roll for superior cleaning across various surfaces. With an active extension wand and enhanced swivel steering, this vacuum is engineered for maximum versatility and ease of use, making it another excellent candidate for a dedicated hardwood carpet vacuum. It’s designed to deliver powerful cleaning, especially in homes with diverse flooring and hard-to-reach spots.

Key Features That Stand Out

  • New 2024 Model with Active Extension Wand: Easily clean hard-to-reach areas like ceiling corners and under furniture.
  • Triple Action Brush Roll: Effectively loosens, lifts, and removes embedded dirt and pet hair from both carpets and hard floors.
  • Swivel Steering: Maximizes maneuverability to effortlessly clean around furniture and navigate corners.
  • Every Purchase Saves Pets: Continuing Bissell’s commitment, a portion of each sale supports the BISSELL Pet Foundation.

Why We Recommend It

We recommend this updated Bissell CleanView Swivel for its enhanced features that make whole-home cleaning even more efficient. The active extension wand is a game-changer for those awkward spots, and the proven Triple Action Brush Roll ensures a deep clean on both your carpets and delicate hardwood. It’s a reliable choice for consistent performance.

Best For

This vacuum is best for individuals seeking an upgraded, powerful upright vacuum that excels at cleaning both carpets and hard floors, with an emphasis on reaching difficult areas and supporting pet welfare.

Pros and Cons

Pros:
  • Improved design with an active extension wand for versatility.
  • Excellent suction and brush roll performance on multi-surfaces.
  • Highly maneuverable due to swivel steering.
  • Contributes to BISSELL Pet Foundation with every purchase.
Cons:
  • Still a corded model, limiting range without re-plugging.
  • Can be moderately noisy during operation, similar to many upright vacuums.
  • Dust bin capacity, while adequate, might require frequent emptying in very large homes.

Customer Reviews

Customer Review: Vacuum is really nice and picks up very well. The pet remover tool works great as well on my cats tower and other furniture. I am happy with this product. It is not as loud as other vacuums. Easy to use and put together. Lightweight and swivel is nice along with the cord rewind. Long cord.

Customer Review: This vacuum cleaner is really good — the suction power is excellent. It picks up hair, pet fur, dust, and even crumbs very well. The only downside is that it’s a bit inconvenient to use under the bed or couch, and it’s slightly heavy. Overall, though, it works great!😍

Complete Buying Guide for Best Hardwood Carpet Vacuum

Essential Factors We Consider

Finding the best hardwood carpet vacuum isn’t just about picking the first one you see; it’s about matching features to your unique home needs. When we evaluate vacuums, we meticulously look at several critical factors. First, suction power is paramount – a good vacuum needs robust suction to lift deep-seated dirt from carpets and fine dust from hardwood without scattering it. Next, the brush roll type is crucial: look for models with an on/off brush roll feature or adjustable height settings. This allows you to turn off the rotating brush for delicate hardwood (to prevent scratches) and engage it for effective carpet agitation. Filtration, especially a HEPA filter, is a must-have for trapping allergens and pet dander, ensuring cleaner air. We also assess weight and maneuverability; a lighter vacuum with swivel steering can make a huge difference in how easy and enjoyable cleaning becomes. Finally, consider the attachments for versatile cleaning and the dustbin capacity for fewer interruptions, as well as whether a corded or cordless model better suits your lifestyle and home size.

See also  5 Best Steam Mops for Tile Floors: Expert-Approved Picks

Budget Planning

When planning your budget for the best hardwood carpet vacuum, remember that price often reflects features and performance. Entry-level models, typically in the $100-$200 range, offer basic but effective dual-surface cleaning and are great for smaller homes or those with fewer demanding cleaning needs. Mid-range options, from $200-$400, often introduce enhanced suction, better filtration (like HEPA), more specialized attachments, and improved maneuverability. If your budget allows for premium vacuums, $400+, you’ll find advanced technologies like smart features, superior battery life in cordless models, and exceptional build quality. It’s about finding the sweet spot where features meet your financial comfort. Don’t just focus on the lowest price; consider the long-term value, durability, and effectiveness that a slightly higher investment might bring to your cleaning routine.

Final Thoughts

Ultimately, the perfect hardwood carpet vacuum is one that makes your life easier and keeps your home consistently clean. By considering the essential factors like suction power, brush roll versatility, filtration, and ease of use, you can confidently choose a vacuum that handles both your gleaming hardwood and plush carpets with grace. Remember, an informed decision today leads to a cleaner, happier home tomorrow.

Frequently Asked Questions

Q: Can I use any vacuum on both hardwood and carpet?

A: While many vacuums claim to be multi-surface, it’s critical to ensure they have features specifically designed for both. For hardwood, you need a vacuum with a soft brush roll or an option to turn off the agitator brush to prevent scratches. For carpets, you need strong suction and a brush roll that can effectively lift dirt and debris. A dedicated hardwood carpet vacuum will typically have these adjustable settings.

Q: What features are essential for a good hardwood carpet vacuum?

A: Key features include adjustable suction power, a brush roll with an on/off switch or different settings for hard floors and carpets, strong suction, a good filtration system (like HEPA, especially for pet owners or allergy sufferers), and useful attachments for various cleaning tasks. Swivel steering and a lightweight design also greatly enhance usability.

Q: Is a wet/dry vacuum suitable for both surfaces?

A: Wet/dry vacuums like the Tineco iFLOOR 5 Breeze are excellent for cleaning hard floors by vacuuming and mopping simultaneously, tackling both wet and dry messes. However, they are generally not suitable for deep cleaning traditional carpets. For homes with a mix, you might use a wet/dry vacuum for your hard floors and a separate, dedicated dry vacuum for your carpets.

Q: How often should I vacuum my hardwood and carpet?

A: It depends on foot traffic, pets, and allergies. Generally, it’s recommended to vacuum high-traffic carpeted areas 2-3 times a week and less trafficked areas once a week. Hardwood floors can also benefit from daily or every-other-day vacuuming to prevent dust and debris from accumulating and causing scratches. Homes with pets or allergy sufferers may need to vacuum more frequently.

Q: What’s the difference between a stick vacuum and an upright for dual surfaces?

A: Upright vacuums typically offer more powerful suction and larger dustbin capacities, making them ideal for deeper cleaning of larger homes with substantial carpeting. Stick vacuums are usually lighter, more maneuverable, and often cordless, providing excellent convenience for quick clean-ups and smaller spaces, performing well on hard floors and low-pile carpets. The best hardwood carpet vacuum type for you depends on your home size, cleaning habits, and specific needs.

Choosing the best hardwood carpet vacuum truly transforms your home cleaning routine, making it less of a chore and more of a breeze. We hope our expert-tested and recommended list helps you find the perfect match for your home’s unique needs. Each vacuum on our list offers a compelling blend of power, versatility, and user-friendliness, ensuring your diverse flooring gets the care it deserves. Don’t wait to upgrade your cleaning experience and enjoy a spotless home!

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B091SWWH59’, ‘B0CRR8FJSD’, ‘B00JH98GR4’, ‘B07F6N3RT6’, ‘B0CWB3TF7X’];
const affiliateTag = ‘arcweldingpro0d-20’;

async function fetchLiveProductData(asin) {
try {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘⏳ Fetching…’;

const amazonUrl = ‘https://www.amazon.com/dp/’ + asin;
const response = await fetch(‘https://api.allorigins.win/raw?url=’ + encodeURIComponent(amazonUrl));
const html = await response.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, ‘text/html’);

let price = null;
const priceWhole = doc.querySelector(‘.a-price-whole’);
const priceFraction = doc.querySelector(‘.a-price-fraction’);
if (priceWhole) {
price = ‘$’ + priceWhole.textContent.trim() + (priceFraction ? priceFraction.textContent.trim() : ”);
}

let rating = null;
const ratingEl = doc.querySelector(‘[data-hook=”average-star-rating”] .a-icon-alt’);
if (ratingEl) {
const match = ratingEl.textContent.match(/(\d+\.\d+)/);
if (match) rating = match[1];
}

let reviewCount = null;
const reviewEl = doc.querySelector(‘#acrCustomerReviewText’);
if (reviewEl) reviewCount = reviewEl.textContent.trim();

if (price) {
const priceEl = document.getElementById(‘price-‘ + asin);
if (priceEl) {
priceEl.innerHTML = price;
priceEl.style.animation = ‘pulse 0.5s’;
}
}

// if (rating) {
// const ratingEl = document.getElementById(‘rating-‘ + asin);
// if (ratingEl) {
// const stars = ‘⭐’.repeat(Math.floor(parseFloat(rating)));
// ratingEl.innerHTML = stars + ‘ ‘ + rating + ‘/5’;
// ratingEl.style.animation = ‘pulse 0.5s’;
// }
// }

if (reviewCount) {
const reviewsEl = document.getElementById(‘reviews-‘ + asin);
if (reviewsEl) {
reviewsEl.innerHTML = reviewCount;
reviewsEl.style.animation = ‘pulse 0.5s’;
}
}

if (updateTimeEl) {
const now = new Date();
const timeStr = now.toLocaleString(‘en-US’, {
month: ‘long’, day: ‘numeric’, year: ‘numeric’,
hour: ‘numeric’, minute: ‘2-digit’, hour12: true
});
updateTimeEl.innerHTML = ‘✓ Updated: ‘ + timeStr;
}
} catch (error) {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘✓ Cached data’;
}
}

const style = document.createElement(‘style’);
style.textContent = `@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }`;
document.head.appendChild(style);

function loadAllProducts() {
products.forEach((asin, index) => {
setTimeout(() => fetchLiveProductData(asin), index * 2000);
});
}

if (document.readyState === ‘loading’) {
document.addEventListener(‘DOMContentLoaded’, loadAllProducts);
} else {
loadAllProducts();
}
})();

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top