“Quick-Order”-Addon

Dieses kleine Addon ermöglicht es den Bestellvorgang wahlweise in drei oder fünf Bestell-Schritten (einstellbar im Admin-Menü) durchzuführen.

Hier die Anleitung:

1. Das Paket

Zu nächst müsst ihr das “Quick-Order”-Addon downloaden. In dem Paket befinden sich die Template-Files für das Standard-Template, diese braucht ihr nur zu ersetzen und die bestellvorgang.php welche ihr auch ersetzen müsst, sowie die SQL-Befehle dir ihr auch aus dem Paket verwenden solltet, da es sonst zu Problemen kommen kann. Wenn ihr das macht ist die Anleitung nach dem 4. Schritt (4. includes/bestellvorgang_inc.php) vorbei.

2. MySQL

Jetzt muss per phpMyAdmin folgende SQL-Befehle ausgeführt werden:

INSERT INTO 'teinstellungenconf' VALUES (401, 7, 'Bestellvorgangs-Art', 'Wählen Sie hier ob der Bestellvorgang aus wenigen(schnell) oder vielen(normal) Schritten bestehen soll.', 'bestellvorgang_quickorder', 'selectbox', NULL, 450, 'Y');


und

INSERT INTO 'teinstellungenconfwerte' VALUES (401, 'Normaler Bestellvorgang', 'none', 'N'),

(401, 'Schneller Bestellvorgang', 'Y', 2);


Wem die Auswahl im Admin-Menü nicht wichtig ist kann auch die Datei bestellvorgang-no-admin.php anstatt der bestellvorgang.php im Paket verwenden. Die bestellvorgang-no-admin.php muss dann nur in bestellvorgang.php umbenannt werden. Hierbei werden immer nur drei Bestell-Schritte angezeigt.

3. lang/ger.php bzw. lang/eng.php

1. Schritt (ca. Zeile 90 unter //checkout)

define('L_CHECKOUT_WRONG_PAYMENT','TEXT WENN GEWÄHLTE ZAHLUNGSART NICHT FÜR GEWÄHLTE VERSANDART VERFÜGBAR IST');


Natürlich sollte hier der Text “TEXT WENN GEWÄHLTE ZAHLUNGSART NICHT FÜR GEWÄHLTE VERSANDART VERFÜGBAR IST” durch einen entsprechend formulierten Text ersetzt werden.

4. includes/bestellvorgang_inc.php

1. Schritt (vor ?>)

function gibBestellschrittOneClick($step)
{
        $schritt[1]=3;
        $schritt[2]=3;
        $schritt[3]=3;
        switch ($step)
        {
                case "unregistriert bestellen":
                        $schritt[1]=1;
                        $schritt[2]=3;
                        $schritt[3]=3;
                        break;
                case "oneclickstep":
                        $schritt[1]=2;
                        $schritt[2]=1;
                        $schritt[3]=3;
                        break;
                case "Bestaetigung":
                        $schritt[1]=2;
                        $schritt[2]=2;
                        $schritt[3]=1;
                        break;
                default:
                        break;
        }
        return $schritt;
}


einfügen

5. templates/JTL-Shop2/bestellvorgang.tpl

1. Schritt (vor ?>)

<img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step1_{$bestellschritt[1]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step2_{$bestellschritt[2]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step3_{$bestellschritt[3]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step4_{$bestellschritt[4]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step5_{$bestellschritt[5]}.png" alt="" />


ersetzen druch

{if !$oneclick}
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step1_{$bestellschritt[1]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step2_{$bestellschritt[2]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step3_{$bestellschritt[3]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step4_{$bestellschritt[4]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/bestellschritte/bestellvorgang_step5_{$bestellschritt[5]}.png" alt="" />
                                                                        {elseif $oneclick}
                                                                                <img src="{$currentTemplateDir}gfx/{$lang}/oneclick_bestellschritte/bestellvorgang_step1_{$bestellschritt[1]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/oneclick_bestellschritte/bestellvorgang_step2_{$bestellschritt[2]}.png" alt="" />
                                        <img src="{$currentTemplateDir}gfx/{$lang}/oneclick_bestellschritte/bestellvorgang_step3_{$bestellschritt[3]}.png" alt="" />
                                    {/if}


Hierbei ist zu beachten das ihr noch neue Bilder benötigt die im Ordner “gfx/eng” bzw. “gfx/ger” unter “onclick_bestellschritte” liegen.
2. Schritt

{if $step=='accountwahl'}
        {include file='tpl_inc/bestellvorgang_accountwahl.tpl'}
{elseif $step=='unregistriert bestellen'}
        {include file='tpl_inc/bestellvorgang_unregistriert_formular.tpl'}
{elseif $step=='Lieferadresse'}
        {include file='tpl_inc/bestellvorgang_lieferadresse.tpl'}
{elseif $step=='Versand'}
        {include file='tpl_inc/bestellvorgang_versand.tpl'}
{elseif $step=='Zahlung'}
        {include file='tpl_inc/bestellvorgang_zahlung.tpl'}
{elseif $step=='ZahlungZusatzschritt'}
        {include file='tpl_inc/bestellvorgang_zahlung_zusatzschritt.tpl'}
{elseif $step=='Bestaetigung'}
        {include file='tpl_inc/bestellvorgang_bestaetigung.tpl'}
{/if}


ersetzen druch

{if !$oneclick}
        {if $step=='accountwahl'}
            {include file='tpl_inc/bestellvorgang_accountwahl.tpl'}
        {elseif $step=='unregistriert bestellen'}
            {include file='tpl_inc/bestellvorgang_unregistriert_formular.tpl'}
        {elseif $step=='Lieferadresse'}
            {include file='tpl_inc/bestellvorgang_lieferadresse.tpl'}
        {elseif $step=='Versand'}
            {include file='tpl_inc/bestellvorgang_versand.tpl'}
        {elseif $step=='Zahlung'}
            {include file='tpl_inc/bestellvorgang_zahlung.tpl'}
        {elseif $step=='ZahlungZusatzschritt'}
           {include file='tpl_inc/bestellvorgang_zahlung_zusatzschritt.tpl'}
        {elseif $step=='Bestaetigung'}
            {include file='tpl_inc/bestellvorgang_bestaetigung.tpl'}
        {/if}
{elseif $oneclick}
        {if $step=='accountwahl'}
            {include file='tpl_inc/bestellvorgang_accountwahl.tpl'}
        {elseif $step=='unregistriert bestellen'}
            {include file='tpl_inc/bestellvorgang_unregistriert_formular.tpl'}
        {elseif $step=='oneclickstep'}
            {include file='tpl_inc/bestellvorgang_lieferadresse.tpl'}
            {include file='tpl_inc/bestellvorgang_versand.tpl'}
            {include file='tpl_inc/bestellvorgang_zahlung.tpl'}
        {elseif $step=='ZahlungZusatzschritt'}
            {include file='tpl_inc/bestellvorgang_zahlung_zusatzschritt.tpl'}
        {elseif $step=='Bestaetigung'}
            {include file='tpl_inc/bestellvorgang_bestaetigung.tpl'}
        {/if}
{/if}

6. templates/JTL-Shop2/tpl_inc/bestellvorgang_lieferadresse.tpl

1. Schritt (Zeile 283)

<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td style="padding-top:10px;" width="30" valign="top">
                        <input src="{$currentTemplateDir}gfx/pfeilRechts.gif" type="image" /></td>
<td style="padding-top:8px;" width="100%" align="left">
                        <a class="link" href="javascript:document.lieferadresse.submit();">{#continueOrder#}</a></td>
</tr>
</tbody></table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-top:4px;border-color:#8E8E8E; border-width:1px; border-style:solid; border-bottom-width:0px; border-right-width:0px; border-left-width:0px;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom:4px;">
<table border="0" cellspacing="4" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
                                                                        <img src="{$currentTemplateDir}gfx/pfeilLinks.gif" alt="" /></td>
<td style="padding-left:6px;" width="100%">
                                                                        <a class="link" href="warenkorb.php?{$SID}">{#backToBasket#}</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
 


ersetzen durch

{if !$oneclick}
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td style="padding-top:10px;" width="30" valign="top">
                        <input src="{$currentTemplateDir}gfx/pfeilRechts.gif" type="image" /></td>
<td style="padding-top:8px;" width="100%" align="left">
                        <a class="link" href="javascript:document.lieferadresse.submit();">{#continueOrder#}</a></td>
</tr>
</tbody></table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-top:4px;border-color:#8E8E8E; border-width:1px; border-style:solid; border-bottom-width:0px; border-right-width:0px; border-left-width:0px;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom:4px;">
<table border="0" cellspacing="4" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
                                                                        <img src="{$currentTemplateDir}gfx/pfeilLinks.gif" alt="" /></td>
<td style="padding-left:6px;" width="100%">
                                                                        <a class="link" href="warenkorb.php?{$SID}">{#backToBasket#}</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
{/if}

7. templates/JTL-Shop2/tpl_inc/bestellvorgang_versand.tpl

1. Schritt (Zeile 14)

{include
file='tpl_inc/bestellvorgang_positionen.tpl'}
<table style="border: 0px 0px 1px dotted #929292;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#billingAdress#}:</div>
{include file='tpl_inc/inc_rechnungsadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editRechnungsadresse=1&amp;{$SID}">[{#modifyBillingAdress#}]</a></td>
<td width="5"></td>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#shippingAdress#}:</div>
{include file='tpl_inc/inc_lieferadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editLieferadresse=1&amp;{$SID}">[{#modifyShippingAdress#}]</a></td>
</tr>
</tbody></table>
<span class="standardred">{$hinweis}</span>

<form style="margin: 0px; padding: 0px;" action="bestellvorgang.php" method="post"><input name="{$session_name}" type="hidden" value="{$session_id}" /></form>
 


ersetzen durch

{if !$oneclick}
{include file='tpl_inc/bestellvorgang_positionen.tpl'}
<table style="border: 0px 0px 1px dotted #929292;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#billingAdress#}:</div>
{include file='tpl_inc/inc_rechnungsadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editRechnungsadresse=1&amp;{$SID}">[{#modifyBillingAdress#}]</a></td>
<td width="5"></td>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#shippingAdress#}:</div>
{include file='tpl_inc/inc_lieferadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editLieferadresse=1&amp;{$SID}">[{#modifyShippingAdress#}]</a></td>
</tr>
</tbody></table>
{/if}
{if $hinweis &amp;&amp; !$hinweis_shipping &amp;&amp; !$oneclick}
        <span class="standardred">{$hinweis}</span>
{/if}
{if $hinweis_shipping}
        <span class="standardred">{$hinweis_shipping}</span>
{/if}

{if !$oneclick}
<input name="{$session_name}" type="hidden" value="{$session_id}" />
{/if}


2. Schritt (jetzt Zeile 88)

<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td style="padding-top: 10px;" width="30" valign="top"><input src="{$currentTemplateDir}gfx/pfeilRechts.gif" type="image" /></td>
<td style="padding-top: 8px;" width="100%" align="left"><a class="link" href="javascript:document.versand.submit();">{#continueOrder#}</a></td>
</tr>
</tbody></table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-top: 4px; border: 1px 0px 0px solid #8e8e8e;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom: 4px;">
<table border="0" cellspacing="4" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="{$currentTemplateDir}gfx/pfeilLinks.gif" alt="" /></td>
<td style="padding-left: 6px;" width="100%"><a class="link" href="warenkorb.php?{$SID}">{#backToBasket#}</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>


ersetzen durch

{if !$oneclick}
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td style="padding-top: 10px;" width="30" valign="top"><input src="{$currentTemplateDir}gfx/pfeilRechts.gif" type="image" /></td>
<td style="padding-top: 8px;" width="100%" align="left"><a class="link" href="javascript:document.versand.submit();">{#continueOrder#}</a></td>
</tr>
</tbody></table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-top: 4px; border: 1px 0px 0px solid #8e8e8e;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom: 4px;">
<table border="0" cellspacing="4" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="{$currentTemplateDir}gfx/pfeilLinks.gif" alt="" /></td>
<td style="padding-left: 6px;" width="100%"><a class="link" href="warenkorb.php?{$SID}">{#backToBasket#}</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
{/if}

8. templates/JTL-Shop2/tpl_inc/bestellvorgang_zahlung.tpl

1. Schritt (Zeile 9)

{include
file='tpl_inc/bestellvorgang_positionen.tpl'}
<table style="border: 0px 0px 1px dotted #929292;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#billingAdress#}:</div>
{include file='tpl_inc/inc_rechnungsadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editRechnungsadresse=1&amp;{$SID}">[{#modifyBillingAdress#}]</a></td>
<td width="5"></td>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#shippingAdress#}:</div>
{include file='tpl_inc/inc_lieferadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editLieferadresse=1&amp;{$SID}">[{#modifyShippingAdress#}]</a></td>
</tr>
</tbody></table>
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#shippingOptions#}:</div>
<span class="standard">{$smarty.session.Versandart->angezeigterName[$smarty.session.cISOSprache]}</span>

<a class="linko" href="bestellvorgang.php?editVersandart=1&amp;{$SID}">[{#modifyShippingOption#}]</a>


ersetzen durch

{if !$oneclick}
{include file='tpl_inc/bestellvorgang_positionen.tpl'}
<table style="border: 0px 0px 1px dotted #929292;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#billingAdress#}:</div>
{include file='tpl_inc/inc_rechnungsadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editRechnungsadresse=1&amp;{$SID}">[{#modifyBillingAdress#}]</a></td>
<td width="5"></td>
<td style="padding-bottom: 5px; padding-top: 11px;" width="49%" valign="top">
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#shippingAdress#}:</div>
{include file='tpl_inc/inc_lieferadresse.tpl'}

                <a class="linko" href="bestellvorgang.php?editLieferadresse=1&amp;{$SID}">[{#modifyShippingAdress#}]</a></td>
</tr>
</tbody></table>
<div id="sectionheader"><img src="{$currentTemplateDir}gfx/menu-punkt-select.png" border="0" alt="" width="8" height="9" /> {#shippingOptions#}:</div>
<span class="standard">{$smarty.session.Versandart->angezeigterName[$smarty.session.cISOSprache]}</span>

<a class="linko" href="bestellvorgang.php?editVersandart=1&amp;{$SID}">[{#modifyShippingOption#}]</a>

{/if}


2. Schritt (jetzt Zeile 51)

<form style="margin: 0px; padding: 0px;" action="bestellvorgang.php" method="post"><input name="{$session_name}" type="hidden" value="{$session_id}" /></form>

ersetzen durch
<code><pre lang="smarty">{if !$oneclick}
<input name="{$session_name}" type="hidden" value="{$session_id}" />
{/if}


3. Schritt (jetzt Zeile 78)

<strong>{$zahlungsart->cPreisLocalized}</strong>


ersetzen durch

<strong>{$zahlungsart->cPreisLocalized}
                        {if $oneclick &amp;&amp; ($shipping_types_no != $zahlungsart->shipping_types_no)}
                                 ({#only#}
                                {foreach name=shipping from=$zahlungsart->kVersandart item=shipping_type}
                                        {$shipping_type->cName}{if $smarty.foreach.shipping.index < count($zahlungsart->kVersandart)-1}, {/if}
                                {/foreach}
                                )
                        {/if}</strong>


4. Schritt (jetzt Zeile 90)

<a class="link" href="javascript:document.zahlung.submit();">{#continueOrder#}</a>


ersetzen durch

{if !$oneclick}
        <a class="link" href="javascript:document.zahlung.submit();">{#continueOrder#}</a>
{else}
        <a class="link" href="javascript:document.lieferadresse.submit();">{#continueOrder#}</a>
{/if}

Leave a Reply