I did more testings and found few small bugs. I went through all ot modules and three of them are modified.
Discount coupons had a lot to do. For any reason, the tax re-calculation modes were kind...
Type: Posts; User: pilou2
I did more testings and found few small bugs. I went through all ot modules and three of them are modified.
Discount coupons had a lot to do. For any reason, the tax re-calculation modes were kind...
The Japanese language pack v2.0.0 for the new Zen Cart version 2.0.0 is ready.
You can download it on GitHub here.
It will be soon available in plugin section too.
日本語言語パックをGitHubで公開しました。...
Well, to come back to code, I updated it so it goes through all modules used during checkout and add their results, rounded as displayed. It is then compared with actual order total which is updated...
It is easy to save the corrected total in database. I already modified code on GitHub. Like this, everything is consistent.
Don't worry, I appreciate your opinion and I don't mind you being against...
Well. I agree with you, Zencart should just add numbers at the end. Actually, it is mixing calculation from different modules. I think it is due to all possible options and the fact it is modifying...
The 'lost penny' in Zen Cart refers to the one unit difference between invoice total and addition of intermediate numbers (cart total + shipping +...).
It is due to rounding errors and is not a...
Thanks are always welcome. ;)
I really need someone else looking at it. The file was definitely a work in progress with lots of debug comments, and it is complicated. Although most of the...
This week I did more testing than writing code, and discount coupons should now be usable with most of the options available in Zen Cart.
By the way, I did same kind of work on GV module as it is...
After more research on the topic, it seems that shipping with no tax is necessary in some situations, especially in the United States.
Now that I understand more about taxes and ZC, I was able to...
Well... I did all my testing, modifications using a shipping module with tax class set and when I removed this tax class, problems appeared.
I have to rethink everything as I made two assumptions...
Last update uploaded to GitHub.
Results look very good. ;)
Discount coupons should be ok with all coupons options.
Credit notes (refund) too with all usable options. When using credit notes,...
Wait until next update, I realized there were some mistakes. I did not upload the right version and anyway, now that I am testing with multiple tax rates, I need to rewrite part of the code.
I updated ot_coupon.php file. Calculations for both 'Discount coupon' and 'Credit note' are supported for different type of coupons.
'Discount coupon' are discounts applied on customer order, which...
I set a new branch on GitHub:
https://www.zen-cart.com/showthread.php?230003-Discount-coupon-value
I am not sure how to give you right to comment, modify it...
Yes, we need time... Although I have made good progresses. Different discount options are now all working: fixed, %, free shipping and combination with tax displayed or not.
I need to put this code...
For Discount coupon by percentage, a modification was necessary too.
Line 545 was changed from:
$od_amount['total'] = zen_round($orderAmountTotal * ($coupon_details['coupon_amount'] / 100),...
Here are the results:
2053020531
I got it fixed.
There were 3 problems:
1- Getting rid of all zen_round function calls fixed or at list minimized penny loss problem
2- Code to display coupon value was adding the tax difference...
I forgot to write it, but discount coupon is fixed at $8.
Then, if you look at total when displaying with no tax ($89.17) for what is considered good, it should be $89.18 so that numbers in the...
On ZC v2.0.0-rc2, discount coupons are displayed /calculated wrong values in checkout pages.
There is a unique tax class with rate of 10%.
There are two items in cart, one at $48.34 and the other...
Based on lat9 new PR, I did more testing and tried new code. I got a good 'penny loss' fix that works great on standard orders, no more differences between tax display or not, cart or final invoice....
It won't be necessary, I found the problem and it has nothing to with new PR... For any reason, I set the flat rate module I use to a zone 'all countries' and 'all zones', which prevented it from...
I saw, a little bit surprised that the PR was merged already. I tested it today and apart from the lost penny problem that is still here, when there is a tax applied on shipping, it is not displayed...
I updated the GitHub branch with something that seems to do the job. https://github.com/piloujp/zencart/tree/Currency-prices
No more penny loss, numbers add perfectly except when using a secondary...
I tried the new PR.
For files header.php and shopping_cart.php I did exactly the same modifications at first, and it did correct issues discussed in this thread but re-introduced an old one......
Cart page is now fixed but code still need lots of testing because of all possible discount, attributes and other free stuffs.
I made a branch for that on my ZC fork:...
Thanks, I come back here if I find something interesting.
The main currency is default US$. I use a default cart with demo data to which I added Japanese yen as currency with rate (including factor 1.05) of 155 (155.00000000) and has 0 decimal. Then I...
I think I figured out part of the problem. In my currency with rate 155 (JPY) I use 0 decimal. It seems that currency conversion in cart rounds to 0 decimals before conversion:
Product price 48.34...
I figure this out, 15035 = 14260 + 775 (shipping fee). It is time for me to sleep...
Using this PR, I did some testing changing all I can, price, tax display and value... As long as I use main currency, calculation was all good. But when using another currency, things get weird......
Just submitted v1.3.1 for part 1, which is an update of SQL file for Japanese postal codes when no zone is defined for Japan.
Postcode auto fill Part 1
Part 2 does not need to be updated, please...
Japanese Language Pack version 2.0.0 for Zen Cart v2.0.0-alpha1 is available on Github.
Zen Cart v2.0.0-alpha1 の日本語言語パック バージョン 2.0.0 は、Githubで入手できます。
Fresh install and update from ZC v2.0.0-alpha1...
Entry for your SUBdomain in configure.php should have the subdomain 'shop.' in your server variables:
define('HTTP_SERVER', 'https://shop.MY_DOMAIN.com');
define('HTTPS_SERVER',...
It seems I did:
Your site is not accessible with a message saying your DNS can't be found.
It sounds like a DNS server problem.
It would be a nice feature but there is some code rewite to do. I plan to look at it when I have time...
I did not do detailed explanation as it was already explained few month ago but I made it backward compatible. It uses IntlDateFormatter (PHP >=5.3.0 with PECL >=1.0.0) if avialable as it is possible...
I had this problem recently after changing attribution of tax rate to geo zones. In short, tax rate attributed to the whole country, no problem. Tax rate attributed to geo zones (states) tax become...
Few month ago I submitted on github a re-write of class file zc_date.php based on intl date_format object instead of srftime(). It was not accepted at the time but it might change now. Basically...
I have just submitted version 4.0.3 in plugin section:
https://www.zen-cart.com/downloads.php?do=file&id=30
It will now display currencies links in Bootstrap template in a visible color and you can...
Just to check, you need at least two languages/currencies installed for this to work. Actually used language/currency is not displayed.
It looks like something is missing. Did you installed files in...
I added files for bootstrap template in version 4.0.2 of the plugin release:
https://www.zen-cart.com/downloads.php?do=file&id=30
This means what it means... You need to check your credentials for connecting to the new database. Have you set this user in MySQL with necesary rights to access your Zen Cart database?
There was probably a good reason long time ago... I checked other files code where final_price is used and it is always rounded before displaying at least one time, but most of the time after...
I tried saving final-price not rounded in database and it fixed it. I tried both with option to display with tax or not and checked for other possible consequences using developper tool in admin and...
Many currencies use two decimals. Using four prevents loosing precision.
It is not what I have here. In my orders_total table, all numbers (product price, shipping fees, tax, sub-total and...
Hi,
I see this problem in my shop from time to time. Although I started investigating, I never got the end of it. Here is where I was:
Successful orders are saved in database and particularly...
I actually use this function for backup of structure (for developpement) and comparaison too in combinaison with WinMerge. It is probably the quickest way I know to compare but I am looking for a...
Although I use Zen Cart 1.5.8a and PHP 8.1.24 like you I just realized I was using reCAPTCHA v3.7 from Torvista (on GitHub) and files are completly different. Please ignore my precedent post.