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
26
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
26

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 custom.css: keine Änderungen sichtbar Templates für JTL-Shop 2
Neu JTL-Shop "Plugin-Vorlage" gesucht User helfen Usern 3
Neu Cross Selling Plugin Plugins für JTL-Shop 1
Neu Installation von Plugin PayPal Check-Out fehlgeschlagen, keine Verbindung zum Webshop Plugins für JTL-Shop 6
Neu Beim Versuch Paypal-Plugin mit Paypal-Konto zu verbinden Shop nicht mehr erreichbar Plugins für JTL-Shop 2
Neu Neues Plugin: Produktbundles mit Rabatten Plugins für JTL-Shop 0
Neu Widerrufsformular als kostenloses Plugin für Shops ab 5.1.5 Plugins für JTL-Shop 9
Neu Neues Plugin: Kaufimpuls Paket Plugins für JTL-Shop 0
Neu Paypal Checkout Plugin - Ist vorhanden aber nichts funktioniert Plugins für JTL-Shop 9
Neu Neues Plugin: Sauberes Meta-Tracking für JTL-Shop 5 (Pixel + CAPI + Consent) Plugins für JTL-Shop 0
Neu 📢 Plugin "Kreditlimit Plugin für JTL-Shop 5 " von CIN GmbH Plugins für JTL-Shop 0
Neu Händlerbund-Plugin lädt Texte herunter, ersetzt sie aber nicht im Frontend Technische Fragen zu Plugins und Templates 1
Neu 503 Service Unavailable bei Payrexx Webhook nach Plugin-Update - wer hat das auch? Plugins für JTL-Shop 0
Neu JTL-Shop 5.2.3 – Google-Shoppin-Plugin 2.3.0: Mehrere Rückgaberichtlinien (DE + Ausland) bei einem Feed / return_policy_label Plugins für JTL-Shop 0

Ähnliche Themen