Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On a website I needed to display a link to the terms of service since it was too big. Embedding the complete node was a bit overkill.
patch following
Comment | File | Size | Author |
---|---|---|---|
#10 | commerce_extra_panes_tos.zip | 2.65 KB | vickey |
#9 | tos-as-link.jpg | 270.14 KB | silkogelman |
#1 | tos_as_link-1808452-1.patch | 3.09 KB | idflood |
Comments
Comment #1
idflood CreditAttribution: idflood commentedComment #2
kiwimind CreditAttribution: kiwimind commentedI think it's crazy to not have this feature available. It is how this module used to behave.
Surely most terms of service are going to be too long to include in a pane during checkout.
I intend on trying out your patch and will let you know how I get on.
Thanks.
Comment #3
mihai_brb CreditAttribution: mihai_brb commentedA workaround for this issue could be:
1) create Therms and Conditions content (page)
2) create a separate node (page) with a link to the above content
ex: Read the (link to the abode node)Therms and Conditions here
3) set this new node as therms and conditions
Best,
Comment #4
kiwimind CreditAttribution: kiwimind commentedThat's exactly what I did as a workaround, but seems a little long-winded.
An older version of this module simply had a link to the ToS page as mentioned above.
Comment #5
lorenz CreditAttribution: lorenz commentedWorkaround with a new module:
- Create a page with Terms of Service content (f.e. node/1)
- Create an empty page (f.e. node/2)
- Disable the Terms of Service - submodule
- Copy all the content from the TOS submodule to a new module folder
in your new module do the following:
- edit the .info file with the name of your new module, adjust the "files[]" section as needed
- in the .module and .install file replace all the function names and variables which include "commerce_extra_panes_termsofservice" with "YOUR-MODULE-NAME"
- replace the following line in the .module file
- enable your new module
- configure node/2 to be used as an extra pane and as TOS
On your checkout form you should now see the title of node/2 which you can easily hide with CSS and a checkbox with a link to node/1.
Comment #6
pcambraAnd fixed, added a uninstall call for the variable. Thanks.
Comment #8
Summit CreditAttribution: Summit commentedHi #1 worked fine! Is that one committed?
The only strange thing about that one is that with enabling the link, the option disappears from the pane-settings page.
But with saving, the option !link is working!
Greetings, Martijn
Comment #9
silkogelman CreditAttribution: silkogelman commentedThanks for this.
This link to TOS was exactly what I needed.
To others: it's currently available in latest dev version and looks like the attached image.
Maybe we should put a few words about this 'link to TOS' thing on the project page?
Comment #10
vickey CreditAttribution: vickey commentedAs they discussed above, I have created new module with new name from clone of commerce_extra_panes_termsofservice module.
put it in sites/all/modules folder and configure it in your pack.
Comment #11
pcambra#10 really?, you can just download the -dev version and you're fine, no need to pack anything again...
Comment #12
MariskaTh CreditAttribution: MariskaTh commentedI solved the length of the Terms of service in CSS. That works too:
- I gave the pane a set hight of 12 em
- I set the overflow to 'scroll'.
In this way people can read the Terms of Service of the Checkout page, without having a very large pane.
Simple, but it works.
Best regards,
Mariska.