How to show store price WITHOUT decimals (.00)

I have searched and cannot find the solution to this.

What is the exact full code?

Thanks

1 Like

More people could help you if you showed/linked the code that displays the price with decimals.

I would but I can’t even find the code for that. I only see this:

$w.onReady( function () {
//TODO:
})

I need to edit #gridGallery1 but cannot find how to edit that code.

Is there anyone at WIX that can help? Customer service points your here to get support. This is not support.

Wix explicitly says they won’t write or debug your code for you. They don’t charge nearly enough to deliver a service like that. So they have this community resource. And most community members still won’t write your code for you, but instead point you in the right direction so you can learn and grow to develop your own solutions.

Frankly, and I’m only trying to help in saying this, your question(s) aren’t well formed. What price where? Edit a gallery how? You need to be more descriptive and exact.

1 Like

@wildplasticllc That’s the default skeleton code shown in the code editor. It doesn’t do anything. If you think Corvid is a platform where you can dig into and modify the source code of Wix’s business apps, you are mistaken.

I suppose this is a decent entry point that introduces what the platform can do.

https://support.wix.com/en/article/about-corvid-by-wix

The API to interact with galleries is described here. You’ll soon notice that you can only do so much. Hopefully what’s possible overlaps with what you intend.

https://www.wix.com/corvid/reference/$w.Gallery.html

@lee1 I am having same issue here and there was no help from the wix support. Its very easy and nothing special to explain, I have online store made with wix where I have my products and the price format is like AMD 10,000.00 and I dont need this last .00 as it makes the price UGLY and non usual for my currency. We dont have decimals and I dont want it to be reflected in my store. WIX support cant support me with this as they have no access to it :smiley: I need all the prices and totals and everything to be in this format AMD 10,000 its nice and clean. Is there a way to put a piece of code to fix this?

1 Like

@thenewlevelvape I’m having the same issue! Have you found a solution by any chance?

Fairly straightforward…

var num, n;

num = 5.56789;
res = num.toFixed(1);
console.log(res); //6

num = 6.00;
res = num.toFixed(1);
console.log(res); //6

Use a text element and the code filling it with the custom formatted price.
$w( ‘#productPage1’ ).getProduct().
then(product => {
$w( ‘#text41’ ).text = “Currency code” + product.price
console.log(product)
})

The object returned from getProduct is a Object.
Log it and check its properties.

Hi, Can anyone please tell me where to write this code? And does it work? I am not so experienced with coding, but I`ll give it a try if it works. My page looks pretty bad with all the decimals in the prices everywhere :frowning:

Hello, my site has multiple product slider galleries and the pricing on certain products is all the same. I’d like the price to say C$6 instead of C$6.00. I dont know a single thing about coding, and can’t quite tell if this is possible via coding or not since I would assume you can’t just go in and tweak everything you wish? Again, I know nothing about coding.

Can anyone help with this please and thank you !

var res, res2, res3, num;
var currency = "$" //<---- Change here the currency
var currency2 = "C$" //<---- Change here the currency

num = 5.56789;
res = num.toFixed(1);
console.log(res);     //---> 6
res2=res+currency
console.log(res2)     //---> 6$

num = 6.00;
res = num.toFixed(1);
console.log(res);     //---> 6

res3 = currency2+res
console.log(res3)    //---> C$6

To see all the results → open the CONSOLE in your Google-Chrome-Browser (press F-12 and go to CONSOLE), or use the CONSOLE in Preview-Mode of your editor.

SAME ISSUE HERE.
I don’t want the .00 as it makes my page looks confusing.

Can anyone tell me where to place the above coding? Thanks.

Can you explain exactly how/where to write this so it would work with in the Dev Tools with Wix?

So you’re saying to hide the prices everywhere on the website and manually make your own prices?

This seems like a pretty complicated workaround, yes?

@russian-dima Would you be willing to write code for this that we could copy and paste into our pages? It would be a tremendous help to be able to advertise prices without the decimals.