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)

CommentFileSizeAuthor
#12 money.diff2.67 KBjoseph.olstad
#13 money.diff3.27 KBjoseph.olstad

Comments

markus_petrux’s picture

Yes, 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.

markus_petrux’s picture

Status: Active » Postponed
lpalgarvio’s picture

oh, 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

zeezhao’s picture

+1 to D7 upgrade.

Already use cck 3.x with D6.

Shadlington’s picture

Subbing

zeezhao’s picture

Title: drupal 7 port and d6 upgrade (cck 3.x)? » formatted_number drupal 7 port and d6 upgrade (cck 3.x)?
pepemty’s picture

Subscribing

nouriassafi’s picture

Title: formatted_number drupal 7 port and d6 upgrade (cck 3.x)? » Initial Drupal 7 port: issues
Assigned: Unassigned » nouriassafi
Status: Postponed » Needs review

Here 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.

joseph.olstad’s picture

Hello 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.

nouriassafi’s picture

@joseph.olstad Of course you can!

joseph.olstad’s picture

We 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...

joseph.olstad’s picture

StatusFileSize
new2.67 KB

Hi 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/1619328

I will be doing more testing tomorrow but what I tested so far works. see follow up.

joseph.olstad’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.27 KB

D7 money feeds module integration updated.

see attached:

joseph.olstad’s picture

Hi 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?

joseph.olstad’s picture

Since 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.

Ozzie’s picture

subscribing

kenorb’s picture

Project: Formatted Number » Money field
kenorb’s picture

Title: Initial Drupal 7 port: issues » D7 money feeds module integration
Version: 6.x-1.x-dev » 7.x-1.x-dev
kenorb’s picture

Assigned: nouriassafi » Unassigned
Category: task » feature
Status: Reviewed & tested by the community » Patch (to be ported)
kenorb’s picture

Priority: Critical » Normal
Status: Patch (to be ported) » Needs work

I'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.

$currency = "CAD"; //hard coding to Canadian Dollars, TODO: please fix this 

And there are some TODOs.

kenorb’s picture

Status: Needs work » Closed (duplicate)