Add Newsletter Checkbox to Checkout

Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules
Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
cyrotek
Posts: 35
Joined: 27 Jun 2019, 16:43

Add Newsletter Checkbox to Checkout

Post by cyrotek » 13 Sep 2019, 10:50

Hello,

another questions. I'd like to add a checkbox for a newsletter sign up to the checkout and pass the info along to checkout confirm.

Just like the terms checkbox, however, the decorator I have created is asigned to the checkout confirm, but print $view->param( 'cs_option_terms_value'); returns nothing. How do i access the param or do i need to fire my signup in checkout standard and just make sure everything is filled properly myself?

User avatar
aimeos
Administrator
Posts: 3191
Joined: 01 Jan 1970, 00:00

Re: Add Newsletter Checkbox to Checkout

Post by aimeos » 14 Sep 2019, 20:29

Recommendation would be to use the API of your mailing provider to signup using an AJAX or POST request when the customer checks the newsletter box.

To pass that value to the confirmation page is only slightly more difficult because you have to store the value in the user session in your decorator. In the view on the confirmation page, you can get the value with

Code: Select all

$this->session( 'my-newsletter-key' );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply