lsascha / registeraddress

newsletter registration extension to tt_address made in Extbase + Fluid for Typo3. with double-opt in, user editing and unsubscribing
GNU General Public License v2.0
7 stars 18 forks source link

Unsubscription link in the default view #1

Closed seirerman closed 7 years ago

seirerman commented 7 years ago

If a user comes to my newsletter page trying to unsubscribe, the user has to either

Maybe there should be a link for this in the default view of the plugin. direct_mail_subscription does this already.

taunusweb commented 7 years ago

Hi There, ist it possible to add an unsubscribe Link to a Newsletter Template? Or is there another possibility for unsubscribing the Newsletter?

lsascha commented 7 years ago

Basicly you just need to call the delete action with the hash as argument.

You can see an example in the Edit.html template. <f:link.action action="delete" arguments="{hash: address.registeraddresshash}" noCacheHash="1" pageUid="{settings.pagewithform}" absolute="1">unsubscribe</f:link.action>

with the target pageId of the formular for subscription.

I will need to have a look at direct mail to see how to get the hash of the user (its named registeraddresshash in the tt_address table). But pretty sure it is possible. Or are you using any other newsletter extension?

taunusweb commented 7 years ago

Yes, I'm using direct mail, would be great, if it's possible.

SventB commented 7 years ago

I will need to have a look at direct mail to see how to get the hash of the user (its named registeraddresshash in the tt_address table). But pretty sure it is possible.

In the configuration manager you have to configure EXT:direct_mail: add "registeraddresshash" to field "basic.addRecipFields". Then you can use this field and create the unsubscribe link with TypoScript:

typolink.parameter = 123
typolink.additionalParams = &tx_registeraddress_registerform[hash]=###USER_registeraddresshash###&tx_registeraddress_registerform[action]=delete&tx_registeraddress_registerform[controller]=Address
taunusweb commented 7 years ago

Thank you SventB, i will try this solution!

opaque01 commented 6 years ago

Please help: What I am doing wrong? ###USER_registeraddresshash### wont be filled inside the url. I added "registeraddresshash" inside directmail extension also a and the TS: lib.unsubscribe = TEXT lib.unsubscribe { value = austragen! typolink.parameter = 259 typolink.additionalParams = &tx_registeraddress_registerform[hash]=###USER_registeraddresshash###&tx_registeraddress_registerform[action]=delete&tx_registeraddress_registerform[controller]=Address } After sending a newsletter to the test group I will not be changed: https://domain.at/meta/newsletter-anmeldung/newsletterabmeldung/?tx_registeraddress_registerform[hash]=###USER_registeraddresshash###&tx_registeraddress_registerform[action]=delete&tx_registeraddress_registerform[controller]=Address

Thanks in advance

Meggie-K commented 6 years ago

The solution is SventB's answer:

In the configuration manager you have to configure EXT:direct_mail: add "registeraddresshash" to field "basic.addRecipFields".