Show Posts


Messages - kolynet

Pages: [1] 2
1
hi, anyone developed this maybe? looking to change default sorting of products by sales (popularity)
views are not accurate and not working well for products thats why im trying to achieve with sales.

2
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 12:43:46 PM »
Look at your math. 83.05 is correct by the formatted total and the displayed total is correct with rounding.

Now, I don't understand what your getting at  Your example is correct both ways. It is displaying the correct amounts. 

You were looking at why Paypal gets a 3 decimal place number and throws an error.  I have suggested ways to correct it and things to look at.  This is getting away from the original question/topic.

yeah but the backend cant calculate with 4 decimal numbers. it its pretty stupid to display this math:

.05+.01=.05 this just cant be true.. the core must calculate with the 2 decimal numbers, so base price should be rounded to 2 decimal after currency conversion. then it would work as it should.

so what i would like to achieve, is to instantly round totals to 2 decimal, after currency conversion.. this will avoid all kind of further issues with the numbers.


3
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 10:26:48 AM »
no, this is not the issue. definetely not in the database.

formatted product:21.0485
formatted product2:62.0063
formatted total:83.0548

display in my storefront p: 21.05
display in my storefront p2: 62.01
displayed total: 83.05

in my cart:
21.05 + 62.01 -> total/subtotal => 83.05 which is incorrect... only is foreign currencies (where crr*value) for example value*0.89 will make it 4 decimal when price is already 2 decimal.

it should calculate with the display decimal rounded numbers.


in the /core/lib/currency.php

'$formatted_number = number_format(round(abs($value), (int)$decimal_place), (int)$decimal_place, $decimal_point, $thousand_point);'

if i put '$value=round($value, (int)$decimal_place);'

it will show the correct 2 decimal value, however the total subtotal still the same old incorrect value. look like its calcaluted somewhere else too.

thanks!


4
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 08:58:29 AM »
im trying to find the php page where the total per product and full total amount is calculated for other currencies. because if i make log of totals, it always display default currency, my case: USD. i want to put the round to decimal 2 on currency exchange variables..then i think everything will be perfect

5
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 08:43:35 AM »
How's your currency setup in Localization?  I bet you have to trim the conversion down to 2 decimal places.  Been on the right track, maybe just the wrong place.  Look at the screen shot. 


========

You might have to change the db xxx_currencies  It is "set" for 2 decimal places,but the value is 15,8.  This makes more sense looking at things a bit closer.

currencies are already set in DB to 2 decimals. those are 2 decimals. im still trying

6
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 08:16:48 AM »
I fixed it lately.. solution:

/model/total/coupon.php

line 70: (i think its a bug in abantecart).

               if ($status) {
                  if ($coupon['type'] == 'F') {
                     $discount = $coupon['discount'] * ($product['total'] / $coupon_total);
                  } elseif ($coupon['type'] == 'P') {
                     $discount = $product['total'] / 100 * $coupon['discount'];

added: $discount = round($discount, 2);

i have no idea if its the right solution, however discount returned 2 decimal instead of 3 lately at this point. maybe model developers forgot to round this part.

==========

when changing currency to EUR, it happens again unluckily


7
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 07:59:23 AM »
i tried changing all 'x,4' decimal to 'x,2'. but i will go through the whole DB and change all table to be 2 decimal.
======
this must be in the code

8
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 07:46:56 AM »
i have this:

      //Need to round price after discounts and specials
      //round main price to currency decimal_place setting (most common 2, but still...)
      $currency = $this->registry->get('currency')->getCurrency();
      $decimal_place = (int)$currency['decimal_place'];
      $decimal_place = !$decimal_place ? 2 : $decimal_place;
      $price = round($price, $decimal_place);

however it does nothing if I remove the rounding of the price calc.

9
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 07:36:10 AM »
product price full: $23.65, when i apply 10% coupon, it shows $2.37. It would work if it calculated with 2.37, but however in the background it counts with -2.365, tahts why paypal throw error. i need to found the variable where it count the full total in the PHP. I guess.

10
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 07:22:03 AM »
i modified my database, however the discount is still calculated by 3 decimal for some reason. somehow I should force it to use 2 decimal always.

11
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 06:50:00 AM »
ahha, yeah i found it to be 4 decimal in my db.. will change and see if it helps! thanks

12
Support / Re: I want to move to another web hosting. What should I do?
« on: October 08, 2016, 05:54:18 AM »
guys, i have migrated abantecart million times, you dont have to reinstall. i can help you to do it quickly without problems. you can contact me

13
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 05:51:14 AM »
P.S: the big isssue:

SUB-TOTAL: $23.65
10% coupon: $2.37 (here come the problem, its actually counted with ($2.365 in the backend)
==============
TOTAL: $21.29.. (this is clearly $21.28) thats why it throw the error. Same happen in all currencies I guess.

I just simply cant find that function which calculateds the full total (like this: sub-total - discounts). If i find it, i can probably fix.

thanks.

14
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 05:47:08 AM »
thanks for ur help, however i dont think it has to do anything with the taxation. i have AbanteCart with 0 tax. so no tax zone. paypal dont put any added tax to the totals. I think its some rounding related thing, where it round up by 1 cents sometimes. maybe can you help me via skype? i pm'd you :)

15
Support / Re: paypal express error, amount not equal
« on: October 08, 2016, 04:42:20 AM »
I have free shipping on everything, and no TAX on the store.

Pages: [1] 2

Powered by SMFPacks Social Login Mod