Post by aang12 » Thu Apr 25, 2019 3:20 am

Hi Together
I hope I'm correct here. I need help. Here you see my Problem: https://prnt.sc/ngept6

The Article in the Cart has an Special Price; 39.425. Some Years in the Past, a Company made some Adjustments on my Shop. I don't know where they're stored and what they did (ocmod, vqmod, hardcoded…). But I know, that they made adjustments for Rounding.

On this Image http://prnt.sc/ngequ9 you see, on Product Page we have two Prices one Rounded and one not.

The Main Problem is on Image 1. The Calculation of Order Totals is Wrong. The Sub_Total is 7.885, what is correct, but in the Cart is it 7.990 and that's wrong.


ALL what I need, is to know where this rounding calculation can be stored in OpenCart? Where have I to search for this?
I have OpenCart 2.0.3.1 and Journal 2.16.8

What I did:
  • Loaded clear catalog Folder (from OC 2.0.3.1) to my FTP to overwrite existing catalog Files - doesn't helped (not hardcoded?)
  • Deleted all VQMOD Files (doesn't helped) (not in a vqmod extension?)
  • Searched in so many catalog and Modification (ocmod) Files for rnd / round / (/ 100) etc. nothing found.
Regards
Dominik

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by thekrotek » Thu Apr 25, 2019 3:43 am

Not sure, how you do the searching, but for me it returns a bunch of results for "round". For example, library\cart\currency.php

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


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by aang12 » Thu Apr 25, 2019 3:57 am

thekrotek wrote:
Thu Apr 25, 2019 3:43 am
Not sure, how you do the searching, but for me it returns a bunch of results for "round". For example, library\cart\currency.php
Hi Thanks for Quick Responding.
in
system/library/cart/currency.php is nothing for that. In my Files, there should be a change. But the original 2.0.3.1 File is same like in my Store. And there is also no modified Currency.php in System/Modification & vqcache.

Must be somewhere else.

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by aang12 » Thu May 02, 2019 8:45 pm

Can no one helps here?

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by JNeuhoff » Thu May 02, 2019 9:57 pm

Searched in so many catalog and Modification (ocmod) Files for rnd / round / (/ 100) etc. nothing found.
Well, if that's the case then for example your 'system/library/currency.php' is corrupted or modified in a hard-coded way. It should contain this line:

Code: Select all

$string .= number_format(round($value, (int)$decimal_place), (int)$decimal_place, $decimal_point, $thousand_point);

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by aang12 » Thu May 02, 2019 10:02 pm

JNeuhoff wrote:
Thu May 02, 2019 9:57 pm
Searched in so many catalog and Modification (ocmod) Files for rnd / round / (/ 100) etc. nothing found.
Well, if that's the case then for example your 'system/library/currency.php' is corrupted or modified in a hard-coded way. It should contain this line:

Code: Select all

$string .= number_format(round($value, (int)$decimal_place), (int)$decimal_place, $decimal_point, $thousand_point);
Thank you. Yes, my File "system/library/currency.php" has exactly this Line. So it isn't modified.

My Question is, where COULD it be possible that it's modified?


The Price in the Cart and the Sub_Total is wrong...
If the Product Price is 80.245 it rounds it in the Cart to 80.25. With Quantity 100 it's 8'025.00 (in the Cart!) but the Sub_Total has 8'024.50 (80.245x100). AND Where could this be programmed?
Currency.php, somewhere in cart.php?
Opencart Files itself or Journal 2?

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by JNeuhoff » Thu May 02, 2019 10:09 pm

For a start, temporarily switch to the default web theme, to see whether it's still the same problem or not.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by aang12 » Thu May 02, 2019 11:07 pm

JNeuhoff wrote:
Thu May 02, 2019 10:09 pm
For a start, temporarily switch to the default web theme, to see whether it's still the same problem or not.
Switched Theme in Settings from Journal 2 to default. Same Problem. So not theme relevant?

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by straightlight » Thu May 02, 2019 11:10 pm

aang12 wrote:
Thu May 02, 2019 11:07 pm
JNeuhoff wrote:
Thu May 02, 2019 10:09 pm
For a start, temporarily switch to the default web theme, to see whether it's still the same problem or not.
Switched Theme in Settings from Journal 2 to default. Same Problem. So not theme relevant?
Switching from Journal 2 is insufficient. Testing from fresh installation may be needed to ensure the results are accurate.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by aang12 » Thu May 02, 2019 11:14 pm

straightlight wrote:
Thu May 02, 2019 11:10 pm
aang12 wrote:
Thu May 02, 2019 11:07 pm
JNeuhoff wrote:
Thu May 02, 2019 10:09 pm
For a start, temporarily switch to the default web theme, to see whether it's still the same problem or not.
Switched Theme in Settings from Journal 2 to default. Same Problem. So not theme relevant?
Switching from Journal 2 is insufficient. Testing from fresh installation may be needed to ensure the results are accurate.
I tested it on another OC 2.0.3.1. Installation with same Journal Version. There, the Problem doesn't exist.
There is the Unit Price rounded up from 80.245 to 80.25. The Total is correct 8,024.50 (for 100units). And also the Sub-Total is correct.

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by straightlight » Thu May 02, 2019 11:16 pm

Then, the issue must be originating from another extension where the store contains the error message as compared to the test store where you may also have installed Journal 2 but without the extra extension that is affecting your totals.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by aang12 » Fri May 03, 2019 12:13 am

straightlight wrote:
Thu May 02, 2019 11:16 pm
Then, the issue must be originating from another extension where the store contains the error message as compared to the test store where you may also have installed Journal 2 but without the extra extension that is affecting your totals.
I finally found the wrongdoer!
I replaced existing Files in "system" by original 2.0.3.1 and the Bug was gone. So replied that Folder by Folder in "system" to elaborate the wrong File.
It's "system/library/tax.php".

This made the wrong Calculating. Thank's all for the Tips.

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am

Post by JNeuhoff » Fri May 03, 2019 12:44 am

Glad to hear you resolved it. Quite often finding the cause of an error involves a simple process of elimination.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by aang12 » Fri May 03, 2019 1:32 am

JNeuhoff wrote:
Fri May 03, 2019 12:44 am
Glad to hear you resolved it. Quite often finding the cause of an error involves a simple process of elimination.
Yeah :)
I would have searched further in /catalog.. without Tips.

Newbie

Posts

Joined
Sun Sep 25, 2016 4:19 am
Who is online

Users browsing this forum: No registered users and 186 guests