Shopify themes, liquid, logos, and UX
HI Members,
I am using Empire theme for me site https://dreamzhub.in/collections/home-accessories/products/multifunctional-mandoline-slicer . This theme don't have much option to design the product page. So i want to use some custom code.
I want to change the item sold last 10 days section.
In this section i want to show random numbers like 30 40 55 sold in last hour or 2 hours like this. Don't want to show actual value in last 10 days.
Thanks in Advance.
Solved! Go to the solution
This is an accepted solution.
Hi @naveen1989
Use the below script to implement the same, put this code in main-product.liquid at the appropriate location.
<div>Item sold last <span id="_ordercount"></span> days section.</div>
Below script at the bottom of liquid file.
<script>
let x = Math.floor((Math.random() * 100) + 1);
document.getElementById("_ordercount").innerHTML = x;
</script>
This will return the value between 1-100, you can change the value.
hope this will help...
Hi @naveen1989
You an do this using javascript, while refresh javascript will fetch the random number between the given numbers.
can you please share the code ?
This is an accepted solution.
Hi @naveen1989
Use the below script to implement the same, put this code in main-product.liquid at the appropriate location.
<div>Item sold last <span id="_ordercount"></span> days section.</div>
Below script at the bottom of liquid file.
<script>
let x = Math.floor((Math.random() * 100) + 1);
document.getElementById("_ordercount").innerHTML = x;
</script>
This will return the value between 1-100, you can change the value.
hope this will help...
Hi can you help me in this issue
User | RANK |
---|---|
227 | |
174 | |
63 | |
52 | |
48 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023