Git Product home page Git Product logo

newsletter2go-shopware-form's Introduction

Newsletter2Go Signup & Signout Form for Shopware

This guide extends the official Newsletter2Go Help Article How Can I Create My Own HTML Form?, that delivers Screenshots of the code snippets. WTF. Made this for Shopware 5. Must be easy to adopt for plain HTML.

Guide

  1. Create a Form in the Newsletter2Go UI and get the Code Snippet that you might have used to display their javascript form. Looks like this:
<script id="n2g_script">!function(e,t,n,c,r,a,i){e.Newsletter2GoTrackingObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,a=t.createElement(n),i=t.getElementsByTagName(n)[0],a.async=1,a.src=c,i.parentNode.insertBefore(a,i)}(window,document,"script","https://static.newsletter2go.com/utils.js","n2g");var config = {"container": {"type": "div","class": "","style": ""},"row": {"type": "div","class": "","style": "margin-top: 15px;"},"columnLeft": {"type": "div","class": "","style": ""},"columnRight": {"type": "div","class": "","style": ""},"label": {"type": "label","class": "","style": ""}};n2g('create', 'xxxxxxxx-xxxxxxxx-xxx');n2g('subscribe:createForm', config);</script>
  1. Let's tidy that up. See jquery.newsletter2go.js and add your key in line 57.
  2. Add src/js/jquery.newsletter2go.js to $javascript in your Theme.php
  3. As I want to integrate in Shopware, I use the /frontend/newsletter/index.tpl for the HTML form.
  4. Recompile your template and open /shopware.php?sViewport=newsletter or shopware.php?sViewport=newsletter&signout=false. Add Shoppages to have readable links for that.

newsletter2go-shopware-form's People

Contributors

mmoollllee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.