Post by Anonymous: » Fri Jan 29, 2021 8:34 am

Please help me how to change the price decimals to be lower. Thank you in advance.

Image
Last edited by Anonymous: on Tue Feb 02, 2021 3:10 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Sep 12, 2020 9:52 pm

Post by pprmkr » Fri Jan 29, 2021 5:18 pm

Edit system/library/cart/currency.php
After:

Code: Select all

$string .= number_format($amount, (int)$decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point'));
Add:

Code: Select all

		$dd = '<sup>' . substr($string, (-1 * (int)$decimal_place)) . '</sup>';
		
		$string = substr_replace($string, $dd, (-1 * (int)$decimal_place));
Bootstrap sets sup and sub font-size to 75%. You can add line to stylesheet to adjust the font size:

Code: Select all

sub, sup {
	font-size: 60%;
}

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by Anonymous: » Sat Jan 30, 2021 2:19 am

Thank you very much. It works perfectly!

Newbie

Posts

Joined
Sat Sep 12, 2020 9:52 pm

Post by paulfeakins » Mon Feb 01, 2021 7:14 pm

Anonymous: wrote:
Sat Jan 30, 2021 2:19 am
Thank you very much. It works perfectly!
Please add [SOLVED] to the start of the post title.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: No registered users and 32 guests