List Info

Thread: help with input user field development / module




help with input user field development / module
user name
2007-12-21 03:29:10
Hi everybody,

i need to develop a module that simply accepts an input
user, say for
example a currency conversion. I need to use this data to
make a
conversion in views module.

I have a type of content with a field named price. The user
inserts a
new page of this type of content and fills the price. The
final
objective is to be able to get from views the conversion
ratio to
apply the needed conversions and show the price in 2
different
currencys.

I don´t need to use an ecommerce module because the web is
much more
symple than this. I also don´t know if that is the best or
simplier
solution.

Anyone could guide me on how to start or where to look for
more information?

Thanks a lot in advance.

-- 
Alejandro Moreno López
Publicidad en Buscadores y Marketing Online
http://www.tdo.es

Re: help with input user field development / module
country flaguser name
United States
2007-12-21 10:16:03
There is a 'computed field' module for cck. this wouldn't
take into
consideration current exchange rates dynamically, but it
might work.

--
Brett Evanson

-----Original Message-----
From: development-bouncesdrupal.org
[mailto:development-bouncesdrupal.org]
On Behalf Of Alex Moreno
Sent: Friday, December 21, 2007 2:29 AM
To: developmentdrupal.org
Subject: [development] help with input user field
development / module

Hi everybody,

i need to develop a module that simply accepts an input
user, say for
example a currency conversion. I need to use this data to
make a
conversion in views module.

I have a type of content with a field named price. The user
inserts a
new page of this type of content and fills the price. The
final
objective is to be able to get from views the conversion
ratio to
apply the needed conversions and show the price in 2
different
currencys.

I don´t need to use an ecommerce module because the web is
much more
symple than this. I also don´t know if that is the best or
simplier
solution.

Anyone could guide me on how to start or where to look for
more information?

Thanks a lot in advance.

-- 
Alejandro Moreno López
Publicidad en Buscadores y Marketing Online
http://www.tdo.es

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.17.5/1191 - Release
Date: 12/20/2007
2:14 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.17.6/1192 - Release
Date: 12/21/2007
1:17 PM
 


Re: help with input user field development / module
user name
2007-12-21 11:26:06
seems a good solution. By the way i want to let the user
the
posibility to modify the currency himself. Until now i´ve
built a
module that allows him to insert the currency, and i store
this value
on the database. How can i access to this value from php? I
know that
i can use node-> * to access some values, but i don´t
know how to
access other external data not in the node.

Thanks a lot for your help.

On 21/12/2007, Brett Evanson <brettevgmail.com> wrote:
> There is a 'computed field' module for cck. this
wouldn't take into
> consideration current exchange rates dynamically, but
it might work.
>
> --
> Brett Evanson
>
> -----Original Message-----
> From: development-bouncesdrupal.org
[mailto:development-bouncesdrupal.org]
> On Behalf Of Alex Moreno
> Sent: Friday, December 21, 2007 2:29 AM
> To: developmentdrupal.org
> Subject: [development] help with input user field
development / module
>
> Hi everybody,
>
> i need to develop a module that simply accepts an input
user, say for
> example a currency conversion. I need to use this data
to make a
> conversion in views module.
>
> I have a type of content with a field named price. The
user inserts a
> new page of this type of content and fills the price.
The final
> objective is to be able to get from views the
conversion ratio to
> apply the needed conversions and show the price in 2
different
> currencys.
>
> I don´t need to use an ecommerce module because the web
is much more
> symple than this. I also don´t know if that is the best
or simplier
> solution.
>
> Anyone could guide me on how to start or where to look
for more information?
>
> Thanks a lot in advance.
>
> --
> Alejandro Moreno López
> Publicidad en Buscadores y Marketing Online
> http://www.tdo.es
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.17.5/1191 -
Release Date: 12/20/2007
> 2:14 PM
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.17.6/1192 -
Release Date: 12/21/2007
> 1:17 PM
>
>
>


-- 
Alejandro Moreno López
Publicidad en Buscadores y Marketing Online
http://www.tdo.es

Re: help with input user field development / module
user name
2007-12-21 11:52:34
If you want to be able to change the currency dynamically,
you can
create a little jquery script that will modify the content
of your
page. Put the original value in hidden fields with a class
"original-value" and append the converted value to
the hidden field:

$(document).ready(function() {
  $('input.original-value').each(function() {
    $(this).after(($(this).val() * exchange_rate) +
'euros');
  });
});

This is just a basic idea, but a script that loads the
currency and
the associated exchange rate from a form, as well as
creating correct
html code should not be much longer.

You would still need some server-side conversion for users
who don't
have javascript enabled, but depending on your needs this
might not be
an issue.

On 12/21/07, Alex Moreno <al3xmor3nogmail.com> wrote:
> seems a good solution. By the way i want to let the
user the
> posibility to modify the currency himself. Until now
i´ve built a
> module that allows him to insert the currency, and i
store this value
> on the database. How can i access to this value from
php? I know that
> i can use node-> * to access some values, but i
don´t know how to
> access other external data not in the node.
>
> Thanks a lot for your help.
>
> On 21/12/2007, Brett Evanson <brettevgmail.com> wrote:
> > There is a 'computed field' module for cck. this
wouldn't take into
> > consideration current exchange rates dynamically,
but it might work.
> >
> > --
> > Brett Evanson
> >
> > -----Original Message-----
> > From: development-bouncesdrupal.org
> [mailto:development-bouncesdrupal.org]
> > On Behalf Of Alex Moreno
> > Sent: Friday, December 21, 2007 2:29 AM
> > To: developmentdrupal.org
> > Subject: [development] help with input user field
development / module
> >
> > Hi everybody,
> >
> > i need to develop a module that simply accepts an
input user, say for
> > example a currency conversion. I need to use this
data to make a
> > conversion in views module.
> >
> > I have a type of content with a field named price.
The user inserts a
> > new page of this type of content and fills the
price. The final
> > objective is to be able to get from views the
conversion ratio to
> > apply the needed conversions and show the price in
2 different
> > currencys.
> >
> > I don´t need to use an ecommerce module because
the web is much more
> > symple than this. I also don´t know if that is the
best or simplier
> > solution.
> >
> > Anyone could guide me on how to start or where to
look for more
> information?
> >
> > Thanks a lot in advance.
> >
> > --
> > Alejandro Moreno López
> > Publicidad en Buscadores y Marketing Online
> > http://www.tdo.es
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.17.5/1191 -
Release Date:
> 12/20/2007
> > 2:14 PM
> >
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.17.6/1192 -
Release Date:
> 12/21/2007
> > 1:17 PM
> >
> >
> >
>
>
> --
> Alejandro Moreno López
> Publicidad en Buscadores y Marketing Online
> http://www.tdo.es
>

Re: help with input user field development / module
country flaguser name
Belgium
2007-12-21 11:55:36
You can use the Currency API module (part of the Currency
module  
[1]), which will make the code to do the actual currency
conversions  
super easy.

[1] http://drupal.org/
project/currency


Wim Leers  ~  http://wimleers.com/work



On Dec 21, 2007, at 10:29 , Alex Moreno wrote:

> i need to develop a module that simply accepts an input
user, say for
> example a currency conversion. I need to use this data
to make a
> conversion in views module.


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )