All Categories
US$

Cart

Loadding...

Reviews (1)

Write a Review
Rating
Sporting Lisbon Home Man Jersey 24/25
【24-25】里斯本主场
US$ 17.36
5.0
Reviews (1)
(1)
(0)
(0)
(0)
(0)
  • Ro****ll
    Looks great! Did unfortunately arrive with some of the vinyl backing still attached and had to use an iron to press it to the shirt myself so it was sent unfinished. but still happy especially as i requested my own personal name and number which was done perfectly.
    2025-03-26
// 注意:这只是一个概念演示,实际能否运行完全取决于 Shopyy 搜索页的 HTML 结构 // 以及商品元素中是否包含可读取的销量数据(通常模板不会默认把销量放在 DOM 里) document.addEventListener('DOMContentLoaded', function() { // 1. 检查当前页面是否是搜索结果页(需要根据 URL 特征判断) if (window.location.href.indexOf('/search') === -1) return; // 2. 找到商品列表的容器(需要你按 F12 查看实际 class 或 id) const productContainer = document.querySelector('.你的商品列表容器选择器'); if (!productContainer) return; // 3. 获取所有商品元素 const products = Array.from(productContainer.children); // 4. 尝试从每个商品元素中读取“销量”(这一步几乎肯定需要定制,因为模板未必输出) // 假设每个商品有一个 data-sales 属性(现实中很可能没有) products.sort(function(a, b) { const salesA = parseInt(a.getAttribute('data-sales') || '0'); const salesB = parseInt(b.getAttribute('data-sales') || '0'); return salesB - salesA; // 降序 }); // 5. 按新顺序重新插入 products.forEach(function(product) { productContainer.appendChild(product); }); });