Jump to content
puggybelle

Know how to change the format or style of prices?

Recommended Posts

Using 2.3.4.1 CE

1255540431_specialprice.JPG.027b712db6980541aec8aadc5113c583.JPG

Anyone know how to achieve that look - the cents being smaller and placed higher than the dollars?

I did come across a very old thread, 2005 I think, where someone wanted something similar.  Unfortunately, the code changes offered are not playing well with today's software.  Here's the thread, if anyone's interested.  

How To Add Style To Cents-Currencies

Perhaps a nudge in the right direction is all I need - Thanks if you can help! 

- Andrea

Share this post


Link to post
Share on other sites
7 hours ago, puggybelle said:

not playing well with today's software.

It is probably due to this line

list($dollar, $cent) = split('\\'.$decimal, $price);

Try changing it to 

list($dollar, $cent) = explode($decimal, $price);

 

Share this post


Link to post
Share on other sites

Hi @Jack_mcs

It's been a while!  

Thanks for your reply.  That does work - here's a pic:

bug.JPG.3d8ddf4fc71266c75b2a1c14dfd078b1.JPG

I find that decimal point to be irritating, though.  

If I remove the decimal point in Admin > Localization > Currencies....I lose the price altogether.  Nothing appears.

Any way to remove that decimal point just for cosmetic purposes?  Maybe a way to make the decimal transparent? 

Like....it's there - you just don't see it.  Maybe?  

Nice to talk to you again, Jack!

- Andrea

Share this post


Link to post
Share on other sites

@puggybelleHi Andrea. Same here.:)

For the problem, I think this will remove it. Change this

return $dollar.$decimal."<span class=\"cent\">".$cent."</span>";

to this

return $dollar."<span class=\"cent\">".$cent."</span>";

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×