Jump to content

Texteingabe Vom Kunden Bevor In Warenkorb Legt?


Yabasta

Recommended Posts

Schönen guten Abend,

 

ich suche nach einer Möglichkeit, dass der Kunde eine Möglichkeit hat, bevor er die Ware in Warenkorb legt, eine Texteingabe machen kann.

 

Diese Möglichkeit gibt es bereits siehe Bild

 

 

 

diese ist jedoch ganz unten im Produkt. Ich möchte es in der nähe der Varianten haben.Wisst ihr wie man das machen könnte?

Kunde soll 20 Zeichen eingeben eingeben können.

 

 

Viele Grüße

Yabasta

post-810350-0-92333800-1457303169_thumb.png

post-810350-0-32014800-1457302981_thumb.png

Edited by Yabasta (see edit history)
Link to comment
Share on other sites

Schönen guten Abend,

ich suche nach einer Möglichkeit, dass der Kunde eine Möglichkeit hat, bevor er die Ware in Warenkorb legt, eine Texteingabe machen kann.

Diese Möglichkeit gibt es bereits siehe Bild

diese ist jedoch ganz unten im Produkt. Ich möchte es in der nähe der Varianten haben.Wisst ihr wie man das machen könnte?

Kunde soll 20 Zeichen eingeben eingeben können.

 

 

Viele Grüße

Yabasta

 

Hallo Yabasta,

 

ein Thema, daß wir hier im Forum schon öfters hatten. Für die aktuelle Prestashop-Version 1.6.1.4 gehst du folgendernassen vor:

Du öffnest die Datei /themes/default-bootstrap/product.tpl

Ab ca Zeile 586 findest du :

 

            {if isset($product) && $product->customizable}

            <!--Customization -->

            <section class="page-product-box">

                <h3 class="page-product-heading">{l s='Product customization'}</h3>

                <!-- Customizable products -->

                <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix">

                    <p class="infoCustomizable">

                        {l s='After saving your customized product, remember to add it to your cart.'}

                        {if $product->uploadable_files}

                        <br />

                        {l s='Allowed file formats are: GIF, JPG, PNG'}{/if}

                    </p>

                    {if $product->uploadable_files|intval}

                        <div class="customizableProductsFile">

                            <h5 class="product-heading-h5">{l s='Pictures'}</h5>

                            <ul id="uploadable_files" class="clearfix">

                                {counter start=0 assign='customizationField'}

                                {foreach from=$customizationFields item='field' name='customizationFields'}

                                    {if $field.type == 0}

                                        <li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

                                            {if isset($pictures.$key)}

                                                <div class="customizationUploadBrowse">

                                                    <img src="{$pic_dir}{$pictures.$key}_small" alt="" />

                                                        <a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html':'UTF-8'}" title="{l s='Delete'}" >

                                                            <img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />

                                                        </a>

                                                </div>

                                            {/if}

                                            <div class="customizationUploadBrowse form-group">

                                                <label class="customizationUploadBrowseDescription">

                                                    {if !empty($field.name)}

                                                        {$field.name}

                                                    {else}

                                                        {l s='Please select an image file from your computer'}

                                                    {/if}

                                                    {if $field.required}<sup>*</sup>{/if}

                                                </label>

                                                <input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="form-control customization_block_input {if isset($pictures.$key)}filled{/if}" />

                                            </div>

                                        </li>

                                        {counter}

                                    {/if}

                                {/foreach}

                            </ul>

                        </div>

                    {/if}

                    {if $product->text_fields|intval}

                        <div class="customizableProductsText">

                            <h5 class="product-heading-h5">{l s='Text'}</h5>

                            <ul id="text_fields">

                            {counter start=0 assign='customizationField'}

                            {foreach from=$customizationFields item='field' name='customizationFields'}

                                {if $field.type == 1}

                                    <li class="customizationUploadLine{if $field.required} required{/if}">

                                        <label for ="textField{$customizationField}">

                                            {assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

                                            {if !empty($field.name)}

                                                {$field.name}

                                            {/if}

                                            {if $field.required}<sup>*</sup>{/if}

                                        </label>

                                        <textarea name="textField{$field.id_customization_field}" class="form-control customization_block_input" id="textField{$customizationField}" rows="3" cols="20">{strip}

                                            {if isset($textFields.$key)}

                                                {$textFields.$key|stripslashes}

                                            {/if}

                                        {/strip}</textarea>

                                    </li>

                                    {counter}

                                {/if}

                            {/foreach}

                            </ul>

                        </div>

                    {/if}

                    <p id="customizedDatas">

                        <input type="hidden" name="quantityBackup" id="quantityBackup" value="" />

                        <input type="hidden" name="submitCustomizedDatas" value="1" />

                        <button class="button btn btn-default button button-small" name="saveCustomization">

                            <span>{l s='Save'}</span>

                        </button>

                        <span id="ajax-loader" class="unvisible">

                            <img src="{$img_ps_dir}loader.gif" alt="loader" />

                        </span>

                    </p>

                </form>

                <p class="clear required"><sup>*</sup> {l s='required fields'}</p>

            </section>

            <!--end Customization -->

            {/if}

        {/if}

 

Jetzt ist natürlich die Frage wo das Eingabefeld erscheinen soll, nehmen wir mal an es soll unter der Kurzbeschreibung plaziert werden, dann verschiebst du den o.a. Code

unterhalb dieser Zeilen (ca Zeile205)

 

                    </div>

                            {/foreach}

                        </div>

                    {/if}-->

                </div> <!-- end short_description_block -->

            {/if}

Danach Smarty neu kompilieren und Cache löschen.

 

Dann sollte deine Produktseite nanach etwa so aussehen.

post-467854-0-84196100-1457528111_thumb.jpg

 

Grüsse

Whiley

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...