Hello.
I fixed the code style everywhere in the module and fixed couple of bugs:
- Missing uninstall hook.
- Bug with rewriting default prices on node form.
- #479556: UC_Multiprice doesn't work with Product Classes
- Dev version from "2009-May-04" isn't work with ip2cc at all, as they removed ip2cc_user_contry() from their API. But there is another big issue with ip2cc. For example, the Ukraine (iso country name from uc_countries "UK") listed at ip2cc as "UA" and some other countries have differences as well. So, the ip lookup don't work as it should be. I changed the IP-lookup dependancy to another module — ip2country. It's the same, except it has correct country tags and up-to-date database.
- Fixed tons of code-style bugs.
- Added CVS tags everywhere.
- Changed module's package to "Ubercart - extra", as it's not a core module.
- Maybe some other too minor to remember.
Please, review the patch, it should be certainly commited.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | uc_multipriceHEAD2.patch | 20.88 KB | Docc |
| #3 | uc_multiprice2.patch | 21.78 KB | neochief |
| #2 | uc_multipriceHEAD.patch | 19.99 KB | Docc |
| uc_multiprice.patch | 21.4 KB | neochief |
Comments
Comment #1
Docc commentedtnx i will review the patch and certainly use some of it for the next update.
Comment #2
Docc commentedRight this one is your patch (most of it) against HEAD.
I decided to leave ip2cc in and added support for ip2country. This way the user can decide what to use.
If no problems show up i will commit this patch to HEAD and DEV this week.
Comment #3
neochief commented>Right this one is your patch (most of it) against HEAD.
Actually, against DRUPAL-6--1 branch.
>I decided to leave ip2cc in and added support for ip2country. This way the user can decide what to use.
Yes, it's wise. But your implementation isn't correct, as you're providing two session variables, and are using only one. In fact, my previous patch wasn't perfect as well (as I knew today, I was working with totally outdated uc_country table). I prepared a better implementation for both ip2cc and ip2country support.
Also, your patch isn't contains most of my code style updates. Is it was your decision, or your IDE "decided" to not let them go? :) I used the drupal's coding standarts and the Coder module to make these updates, so they are 100% right.
Comment #4
Docc commentedI made your patch work against HEAD. The best is to use HEAD if you submit a patch
About the coding standards. Its just the way i do it :) But i kept it in this time.
Attached, your patch against HEAD. Looks good to me. I you dont have anything else ill commit it.
BTW What variables are you referring to when you say ""two session variables"?
Comment #5
neochief commented>I made your patch work against HEAD. The best is to use HEAD if you submit a patch
Aha, I see. Okay, no problem, I just used that everybody store the dev code in versioned branches.
> BTW What variables are you referring to when you say ""two session variables"?
$_SESSION['country_id'] and $_SESSION['country_code'], but it's not important, as in latest patch everything is okay.
Thanks for the great module, you're done it exactly as I imagined it to be! :)
Comment #6
Docc commentedCommited and created a stable branch of the latest head. Tnx again.