Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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

Link to comment
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);

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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>";

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...