Jump to content

AWR

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • First Name
    Carlo
  • Last Name
    Rughi

AWR's Achievements

Newbie

Newbie (1/14)

3

Reputation

  1. Fornisco il mio adattamento per la versione Prestashop 1.6. In questa soluzione se premi Invia e ci sono degli errori (es. manca il messaggio), la casella della Privacy rimane abilitata e quindi non occorre ricliccarla. Modifiche da fare nel file themes/NOME_TEMA/contact-form.tpl 1) Prima della riga: {include file="$tpl_dir./errors.tpl"} aggiungere: <script type="text/javascript"> // variabile per mantenere abilitato il checkbox privacy var privacy_checked = ''; </script> {if isset($errors) && $errors} <script type="text/javascript"> // imposto la variabile a yes se ho premuto INVIA e ci sono degli errori privacy_checked = 'yes'; </script> {/if} 2) Modificare la riga: <form action="{$request_uri}" method="post" class="contact-form-box" enctype="multipart/form-data"> aggiungendo l'attributo name: <form action="{$request_uri}" method="post" class="contact-form-box" enctype="multipart/form-data" name="DG_FormContactForm"> 3) In fondo sostituire: <div class="submit"> <button type="submit" name="submitMessage" id="submitMessage" class="button btn btn-default button-medium"><span>{l s='Send'}<i class="icon-chevron-right right"></i></span></button> </div> con questo codice: <div class="submit"> <button type="submit" name="submitMessage" id="submitMessage" class="button btn btn-default button-medium" onclick="return DG_valida_ContactForm(); $(this).hide();"> <span>{l s='Send'}<i class="icon-chevron-right right"></i></span></button> </div> <br /> <fieldset class="account_creation customerprivacy"> <div style="width:21px; float:left;"><div class="required checkbox"><div class="checker" id="uniform-customer_privacy"><span class=""> <input type="checkbox" value="1" id="DG_terms" name="DG_terms" autocomplete="off"></span> </div></div></div> <div style="width: 92%; float: left; "> <!-- per allineare la casella, togliere o aggiungere da style: margin-top: 8px; --> <label for="DG_terms" style="font-weight: normal;"> <p>Dichiaro di aver letto ed accetto l'<a title="Leggi l'Informativa sulla Privacy" href="{$base_dir}it/content/8-privacy" onclick="window.open(this.href); return false;" >Informativa sulla Privacy</a> <br />I agree to the <a title="Read the Privacy Terms" href="{$base_dir}en/content/8-privacy" onclick="window.open(this.href); return false;" >Privacy Terms</a></p></label> </div> </fieldset> <script type="text/javascript"> function DG_valida_ContactForm ( ) { /* Funzione per convalida privacy */ valid = true; if ( document.DG_FormContactForm.DG_terms.checked == false ) { alert ( "\nSi prega di leggere ed accettare l'Informativa sulla Privacy.\n\nPlease read and check the Privacy Terms box." ); valid = false; } return valid; } /* DG_ fine funziona aggiunta */ // mantiene abilitato il checkbox privacy if ( privacy_checked == 'yes' ) { document.DG_FormContactForm.DG_terms.checked = true; } </script> NB: Cambiare i riferimenti (it/content/8-privacy) e (en/content/8-privacy) con i link alla vostre pagine della privacy. ----->>> Prima di qualsiasi modifica fate un backup del file originale <<<-----
  2. Guide to "UNSELECT ALL" carriers for all products Simply you have to access the db and empty the ps_product_carrier table (do not delete it). From phpMyAdmin run the SQL command: TRUNCATE TABLE ps_product_carrier (Note: first make a backup of the table).
×
×
  • Create New...