Hello all together,
in my checkout I have configured three extra panes with the enabled checkbox "Enable this pane as Terms of Service".
and in all extra panes the same text is shown:
"I agree with the Terms of Service *"
But what I need are three extra panes with different check box descriptions:
1. extra pane: "I confirm that I..."
2. extra pane: "I agree with the Terms of USE"
3. extra pane: "I agree with the Terms of Service *"
Is there a possibility to change the description of the check box manually?
Or if someone could add an input field for the check box description next to the check box "Enable this pane as Terms of Service" it would be even easier.
Thanx for your help.
Comment | File | Size | Author |
---|---|---|---|
#14 | 1714236-translate-string.patch | 1.04 KB | fugazi |
#12 | 23-06-_2014_13-55-25.jpg | 46 KB | fugazi |
#12 | 23-06-_2014_13-55-03.jpg | 10.99 KB | fugazi |
#12 | 23-06-_2014_13-51-37.jpg | 92.13 KB | fugazi |
#12 | 23-06-_2014_13-50-59.jpg | 54.53 KB | fugazi |
Comments
Comment #1
design.er CreditAttribution: design.er commentedGerman online shops has new rules for "terms of service agreements" -> 2 checkboxes are needed:
Is it possible to alter the
commerce_extra_panes_termsofservice_form_alter()
function with if-statements to manipulate the links/output for each extra pane manually?It would be a great approach in conjunction with #1830712: Possibility to have separate page for "I agree" to the Terms of Service.
Comment #2
vantastic CreditAttribution: vantastic commentedI second the OP's request for this feature.
There is little use in having the ability to add multiple extra TOS panes if they all display the same standard "I agree with the Terms of Service" message next to the checkbox.
For now, here is a CSS work-around, using the fact that each TOS [checkbox + label] are wrapped in a DIV with a unique class identifier, generated by the module. The unique DIV class is simply named after the content node that contains the relevant TOS text. The naming convention is: form-item-extra-pane--node--XX-termsofservice, where XX is the ID number of the content node.
So using this, in /modules/system/system.theme.css, or another loaded CSS if you prefer, we add:
Where XX is of course still the relevant node number. This will remove the original label text. Then we add:
Where XX is of course still the relevant node number. This will place the desired unique text in front of the (now invisible) original text with whatever you put in the CSS content attribute.
Not ideal, but it does the job for now without having to touch the module code. You will likely need to customse the css a little more to ensure flawless integration in your theme, especially if you want the * to be displayed correctly.
Comment #3
pcambraPatches are welcome for adding this, but please, no CSS content fixes.
Comment #4
rikki_iki CreditAttribution: rikki_iki commentedMy first proper patch so apologies for any issues.
This makes an editable checkbox label for unlinked version, as well as making the linked text the node title and makes the link prefix editable.
Should cover the majority of use cases.
Comment #5
haggins CreditAttribution: haggins commentedThanks rikki. Unfortunately this does not work for every language.
In english you can say: "I agree with the %tile".
In german it's: "Ich stimme den %title zu".
So you need a placeholder for the link instead just appending it to the label.
Comment #6
rikki_iki CreditAttribution: rikki_iki commentedOf course, thanks for pointing that out @haggins
I've added a placeholder for %title.
Comment #7
haggins CreditAttribution: haggins commentedGreat!
I rerolled your patch against current dev.
Comment #8
pvdjay CreditAttribution: pvdjay commentedTested. Works beautifully against current 1.x-dev.
Comment #9
howdytom CreditAttribution: howdytom commentedWe also need 2 checkboxes with different descriptions.
Sounds great. How can I get the latest release including your recent changes? As far as I see 7.x-1.x-dev doesn’t contain those changes. I don’t want to hack core.
Comment #10
pvdjay CreditAttribution: pvdjay commentedMarked #2007352: Editable line "I agree with the Terms of Service" as a duplicate of this issue.
Comment #11
fugazi CreditAttribution: fugazi commentedUnfortunately, the translation of the string does not work.
Comment #12
fugazi CreditAttribution: fugazi commentedI have now tried everything. The string is displayed in the Translation. But in the cart, it will not be translated. See the screenshot. Maybe someone has a tip?
(Ich stimme der %title zu) typo in translation corrected but unfortunately does not go well
Comment #13
fugazi CreditAttribution: fugazi commentedI have tried the patch from https://www.drupal.org/node/2007352, and here the translation works.
Comment #14
fugazi CreditAttribution: fugazi commentedI sorry that I have to please churned everything here. I have found the error. We have attached a patch