Neu Create custom plugin

Osama

Neues Mitglied
7. Mai 2021
2
0
I am trying to create multi contact form plugin and and i am using shop version 5 i have some questions
how can i create custom page for each contact form from my plugin (i need to create page for each form saved to my database)
and can i create short-code to display forms in exists page (Like wordpress)
thanks in advance
 

artm

Sehr aktives Mitglied
22. Februar 2021
107
27
I would just create a single front page with plugin and a load these forms dynamically instead.
 

artm

Sehr aktives Mitglied
22. Februar 2021
107
27

You add front page by editing plugin configuration file.

Example:
XML:
<FrontendLink>
    <Link>
        <Filename>myform.php</Filename>
        <Name>MyForm</Name>
        <FullscreenTemplate>myform.tpl</FullscreenTemplate>
        <VisibleAfterLogin>N</VisibleAfterLogin>
        <PrintButton>N</PrintButton>
        <LinkLanguage iso="ENG">
            <Seo>seoEng</Seo>
            <Name>nameGerEng</Name>
            <Title>Title</Title>
            <MetaTitle>MetaTitle</MetaTitle>
            <MetaKeywords>MetaKeywords</MetaKeywords>
            <MetaDescription>MetaDescription</MetaDescription>
        </LinkLanguage>
        <LinkLanguage iso="GER">
            <Seo>seoGer</Seo>
            <Name>nameGer</Name>
            <Title>Titel</Title>
            <MetaTitle>MetaTitle</MetaTitle>
            <MetaKeywords>MetaKeywords</MetaKeywords>
            <MetaDescription>MetaDescription</MetaDescription>
        </LinkLanguage>
    </Link>
</FrontendLink>

You also need to create both "myform.php" and "myform.tpl" files.
You will find more information on official guide page here:
https://jtl-devguide.readthedocs.io...test/shop_plugins/infoxml.html#frontend-links

Then you need to make sure you can reach the page via seo name. I suggest you check demo or other released plugins by jtl software.

Form class offers you some very basic functions, including token validation, captcha validation and flood protection:
https://gitlab.com/jtl-software/jtl-shop/core/-/blob/master/includes/src/Helpers/Form.php

How you build the form depends on your skills, either you build it extremely plain and simple like "kontakt.php" or you build how you wish, with custom or 3rd party libraries.
 
  • Gefällt mir
Reaktionen: janw
Ähnliche Themen
Titel Forum Antworten Datum
Neu Ab welcher JTL Wawi Version ist der OnPremise REST API Endpoint POST /v2/returns oder POST /v1/returns für Create Return verfügbar? Schnittstellen Import / Export 0
Neu Templateänderung Backend custom Design zerstört Templates für JTL-Shop 5
Neu Custom Checkout - Conversion optimiert mit Speicherung von Standard-Versandart und Zahlungsart am Kunden JTL-Shop - Ideen, Lob und Kritik 1
Beantwortet [Shop 5.7.2 / Wawi 2.0.5] GPSR-Daten werden am Artikel nicht angezeigt trotz korrekter Übertragung und installiertem Plugin Allgemeine Fragen zu JTL-Shop 1
Neu JTL Shop Plugin - BD Automatisierter Widerruf (Von Händler für Händler - Schluss mit Mail-Chaos & Spam-Sorgen!) Plugins für JTL-Shop 0
Neu Plugin: JTL Exportformat Google Shopping gibt <g:google_product_category> unter Shop 5.7.1 und Wawi 2.0.4 nicht aus Plugins für JTL-Shop 1
Neu Seller2Go – Mobile App & JTL-Plugin für Bestellungen, Support und Produktmanagement Plugins für JTL-Shop 0
Neu PayPal Plugin wirft Fehler auf einmal wegen telefonnummer JTL-Shop - Fehler und Bugs 3
Neu Neues Plugin: Erweiterter Widerrufsbutton für JTL-Shop Plugins für JTL-Shop 9
Neu Plugin Preisvorschlag Plugins für JTL-Shop 6
Neu Plugin Allgemeine Fragen zu JTL-POS 1
Neu Betatester gesucht - Plugin: Geizhals Basket Tracking inkl. EMID Übermittlung Plugins für JTL-Shop 0

Ähnliche Themen