Jump to content

Product.tpl customisation inversion Text et Picture bouton enregistrer


Ecom

Recommended Posts

Bonjour,
Pour des raisons de présentation j'ai du inverser 2 blocs de customisation TEXT en premier et PICTURES en second dans product.tpl.
Mais je n'arrive pas rendre fonctionnel le bouton enregistrer (SAVE) car je veux le placer en bas de Pictures c'est plus logique. Si quelqu'un à la bonne syntaxe. Merci d'avance.


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

Informations
{l s='After saving your customized product, do not forget to add it to your cart.'}
{if $product->uploadable_files}

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



{l s='Texts'}



  • {counter start=0 assign='customizationField'}
    {foreach from=$customizationFields item='field' name='customizationFields'}
    {if $field.type == 1}
  • {assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
    {if !empty($field.name)}{$field.name}{/if}<input type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" value="{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}" class="customization_block_input" />{if $field.required}*{/if}

    {counter}
    {/if}
    {/foreach}

{/if}


<input type="hidden" name="quantityBackup" id="quantityBackup" value="" />
<input type="hidden" name="submitCustomizedDatas" value="1" />
<input type="button" class="button" value="{l s='Save'}">

{if $product->uploadable_files|intval}

{l s='Pictures'}



  • {counter start=0 assign='customizationField'}
    {foreach from=$customizationFields item='field' name='customizationFields'}
    {if $field.type == 0}
  • {assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
    {if isset($pictures.$key)}{/if}
    <input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="customization_block_input {if isset($pictures.$key)}filled{/if}" />{if $field.required}*{/if}
    {if !empty($field.name)}{$field.name}{else}{l s='Please select an image file from your hard drive'}{/if}


    {counter}
    {/if}
    {/foreach}

{/if}

{if $product->text_fields|intval}

</form>
Link to comment
Share on other sites

bonjour,

je suis pas certain que ce soit plus logique. car si tu mets ton bouton save au dessus des champs texte, le risque c'est que le client sauvegarde sa personnalisation sans les avoir rempli. et si tes champs textes ne sont pas requis, tu ne sauras même pas que tes clients ont voulu ajouter un texte !

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