Post by retrowatches » Tue Dec 05, 2017 11:18 pm

I install Bitcoin Payment Extension. Set in SYSTEM/LOCALISATION/CURRENCIES/Bitcoin/ "Decimal Places"=6
All work properly:
In Orders..price have 6 decimal places;
In Cart.. price have 6 decimal places;
In Invoices.. prices have 6 decimal places,
but in fron interface (shop) only Product page show product price up to 4 decimal places.
When I define a price for a product, I enter 0.005230, but after saving, the price is changed to 0.005200.

Using 6 or 7 decimal places is absolutely imperative because 1 BTC = $11798.63 (05.12.2017) i.e. 1 USD = 0.0000847 BTC
The price of one TV is 200 USD, expressed in USD will be 200*0.0000847=0.016940, but the current "product interface" will be show 0.0169 !
This is unacceptable, especially if the price of Bitcoin is raise more.

Probably the problem comes from "product.tpl", but I do not know if so.

How to change "product page" shop interface to work with 6 decimal places?



Wed Nov 15, 2017 7:46 pm

Post by rgbrewer » Wed Dec 06, 2017 12:18 am

This is coded into the database itself. The oc_product SQL table is instructed to store 4 decimal places. I think you'd probably be okay if you changed it there. I'm trying to think of downstream effects of that and nothing are coming to mind, but you never really know until you do it and test it a bunch.

If you need some help, I'd love to work for some BTC :)

New member


Sat Apr 22, 2017 9:30 am

Post by thekrotek » Wed Dec 06, 2017 12:40 am

You need to browse ALL your database tables and change ALL related fields to DECIMAL {15,6}. Not just "product" table, because figures are saved all over the OC database.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by

User avatar
Expert Member


Sun Jul 03, 2016 12:24 am

Post by IP_CAM » Wed Dec 06, 2017 8:09 am

OC v- Default Installation DB Content ;)
Be aware of this default Value too: 0.0000

Code: Select all

Search "decimal(15,4)" (19 hits in 1 file)
  C:\TEMP\_tc\opencart-\upload\install\opencart.sql (19 hits)
	Line 123:   `amount` decimal(15,4) NOT NULL,
	Line 993:   `discount` decimal(15,4) NOT NULL,
	Line 996:   `total` decimal(15,4) NOT NULL,
	Line 1040:   `amount` decimal(15,4) NOT NULL,
	Line 1275:   `amount` decimal(15,4) NOT NULL,
	Line 2119:   `total` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2122:   `commission` decimal(15,4) NOT NULL,
	Line 2207:   `price` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2208:   `total` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2209:   `tax` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2308:   `value` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2333:   `amount` decimal(15,4) NOT NULL,
	Line 2359:   `price` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2488:   `price` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 2649:   `price` decimal(15,4) NOT NULL,
	Line 2769:   `price` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 3321:   `rate` decimal(15,4) NOT NULL DEFAULT '0.0000',
	Line 3551:   `amount` decimal(15,4) NOT NULL,
	Line 3568:   `amount` decimal(15,4) NOT NULL,

I'm rarely still active at the OC Forum. To reach me, contact:
A Demoversion of my free OpenCart LIGHT v. Software Edition
can be seen in real Action here:
1'000+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site:

User avatar
Legendary Member


Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: Bing [Bot] and 51 guests