hey
are there plans for a drupal 7 port and a drupal 6 upgrade?
CCK 3.x is in development for D6 and Fields is now present in D7 core, with optional contrib 3.x modules (cck project)
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | money.diff | 2.67 KB | joseph.olstad |
| #13 | money.diff | 3.27 KB | joseph.olstad |
Comments
Comment #1
markus_petrux commentedYes, my intention is to port this module to D7 as soon as I have the time. Though, it depends on Format Number, and that one needs to be ported first.
In regards to CCK 3... what do you exactly mean? AFAICT, it works.
When porting to D7, CCK does not exist, all modules implementing fields will have to support the new Fields in core APIs.
Comment #2
markus_petrux commentedComment #3
lpalgarvio commentedoh, i did not know that if it works fine on 3.x without changes.
there's a lot of APIs (in other projects too) that are still midway porting or haven't started yet.
my point was, after those are ported
Comment #4
zeezhao commented+1 to D7 upgrade.
Already use cck 3.x with D6.
Comment #5
Shadlington commentedSubbing
Comment #6
zeezhao commentedFor D7, see this comment: http://drupal.org/node/1091914#comment-4895552
Comment #7
pepemty commentedSubscribing
Comment #8
nouriassafi commentedHere is a Drupal 7 port of Formatted Number CCK:
http://drupal.org/sandbox/nouriassafi/1603812
Please make sure to use this version of the Format Number API:
http://drupalcode.org/project/format_number.git/commit/e52ee8a46466f4aa7...
Note that the 7.x-1.x-dev release in the project page has not been updated.
Comment #9
joseph.olstadHello Nouriassafi, I have tested your D7 module, it seems to work very well in my environment.
The conversion has been completed very nicely, well done!
Can we make your version a release for D7? I have also tested your money field upgrade from your sandbox, that too should be brought into the mainstream out of the sandbox. We're doing some dev work and would like to make some improvements specific to feeds integration to add the hook_feeds_processor_targets_alter so that the mappings show up. This would be an enhancement and right now your modules look like the best ones to enhance.
Comment #10
nouriassafi commented@joseph.olstad Of course you can!
Comment #11
joseph.olstadWe should ask the maintainer(s) to uptake your D7 code asap.
Updated , see my later post, I have integrated feeds.
I based the work on this and the feeds api documentation of course
http://api.drupalcommerce.org/api/Drupal%20Commerce/sites!all!modules!co...
Comment #12
joseph.olstadHi Nouriassafi, you'll be happy to see that I've added some new code for your module to enable feeds module integration. This is an enhancement to your module.
See attachment called money.diff for the D7 money feed mapper code, note for others:this requires the nouriassafi D7 version of the money module http://drupal.org/sandbox/nouriassafi/1619328I will be doing more testing tomorrow but what I tested so far works.see follow up.Comment #13
joseph.olstadD7 money feeds module integration updated.
see attached:
Comment #14
joseph.olstadHi Nouriassafi, how do we get your D7 code into this module? , How do we take your code from your sandbox and bring it into the D7 version of this module? I think it works well and it deserves official status. Can we do this ourselves or does an official maintainer for this module have to do this?
Comment #15
joseph.olstadSince I last posted, I stopped using the D7 Money module and started using formatter instead with some very simple php code to format the fields with the currencies and locales I needed.
Here's what my formatter looks like for those that may be interested:
Field type(s):
number_decimal
Formatter:
//start code
global $language;
$amount = $variables['#items'][0]['value'];
if ($language->language == 'en') {
$amount = '$ ' . number_format($amount, 2, '.' , ',' );
} elseif ($language->language == 'fr') {
$amount = number_format($amount, 2, ',' , ' ' ) . ' $';
}
return $amount;
//end of code
This above code formats CAD$ in both official locales (FR & EN) (ex: 1,00$ & $1.00)
So in our case, it was simpler to use formatter than to use money. Although if you need to use money with feeds, grab the money.diff and insert it in money.module.
Comment #16
Ozzie commentedsubscribing
Comment #17
kenorb commentedComment #18
kenorb commentedComment #19
kenorb commentedComment #20
kenorb commentedI've created 7.x branch for Money module.
Patch #13 can be integrated with latest 7.x version, but it needs some work, as some of the variables are hardcoded.
E.g.
And there are some TODOs.
Comment #21
kenorb commented#628354: Add support for Money as a Feeds mapping target