Closed (fixed)
Project:
Commerce Multicurrency
Version:
7.x-1.0-beta1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
17 Sep 2011 at 18:11 UTC
Updated:
6 Oct 2015 at 20:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
das-peter commentedHi Neil,
You're right that would be nice - and it wouldn't be that much work.
Sounds you know how that could be done - would be great if you would write a patch for this :)
Do you know how to create patches? If not, check this: http://drupal.org/patch
I guess the necessary change would take place in this function
commerce_multicurrency_selector_form- here a hint what you could change:FAPI - #attached
And of course there's needed some Javascript.
And even if it's a small change I should mention the Coding Standards:
Would be awesome to see a patch from you - if you need help don't hesitate and ask!
Cheers
Peter
Comment #2
das-peter commentedMarking as feature request. I'm sure a lot of others will be happy to see this too.
Comment #3
Aham commentedHi das-peter,
Just to clarify, are we talking about the 'Currency Selector' block or the selector in the currency settings? Also, is there a best practice way to accomplish this feature request without using Drupal's '#ahah' property? AHAH seems to be a big can of worms that I would like to deal with at another time, but I would like create a patch for this module.
Can I just use the #attached property with a separate JS file in the module folder and do some jQuery magic? If the only best practice way to do this is with AHAH, then I still might do it, but I will wait to here from you.
Cheers,
Jonathan
Comment #4
das-peter commentedHi Aham,
I'd say 1freethinker was talking about the selector where the customer set's it currency, the block provided by this module.
And
#attachedand an jQuery event handler / trigger are the best solution I can think of yet.Comment #5
Aham commentedHi
Here are the changes suggested by das-peter. Patch need review. Enjoy!
tot ziens,
Jonathan
P.S. Any reason the git repo for this module has no branch info. Says * (no branch).
Comment #6
das-peter commentedHey Aham thank you very much for the patch.
I just gave it a short visual review - the biggest hurdle was to download it. :)
Please don't use
#in filenames ;) Otherwise to download it the people have to replace the # by %23.In the patch itself I see only two things that should be changed before I commit it:
The debug stuff shouldn't go into the official repo.
I'd suggest to hide the button by JS. That way users without JS will see the normal button.
I'm not sure that I really got what you mean, but I'd say you didn't checkout a branch but maybe a tag? I never experienced anything special while working with the repo.
Comment #7
Aham commentedThis should do it! Let me know if this is ready.
Jonathan
Comment #8
das-peter commentedNice :)
I've adjusted the comment of the js a bit but here it is, your first commit: http://drupalcode.org/project/commerce_multicurrency.git/commit/483eb8b
Thank you very much!
Comment #9
PedroMiguel commenteddas-peter, sorry to reopen but you forget to add commerce_multicurrency.js to the git.
Comment #10
das-peter commentedOuch, thanks for the hint Pedro!
File is committed now: http://drupalcode.org/project/commerce_multicurrency.git/commit/3cb4f6e
New release created: http://drupal.org/node/1446654