Joomla.it Forum

Componenti per Joomla! => Gestione e-commerce => : trumpton 12 Oct 2007, 15:16:17

: Aggiungere un PHPSHOP_SHOPPER_FORM_EXTRA_FIELD_1 al order email.
: trumpton 12 Oct 2007, 15:16:17
Ho creato un campo ">_PHPSHOP_SHOPPER_FORM_EXTRA_FIELD_1" che uso per il codice fiscale.

nel file email_italian.html trovato qua:
components / com_virtuemart / html / templates / order_emails /

Ho aggiunto:

      <tr class="Stil1">
          <td>Partita IVA/Codice Fiscale :</td>
          <td>{_PHPSHOP_SHOPPER_FORM_EXTRA_FIELD_1}</td>
        </tr>

Però niete da fare.

Ho provato anche con PHP ECHO. NIENTE

qualcuno sa perchè

grazie.
: Re: Aggiungere un PHPSHOP_SHOPPER_FORM_EXTRA_FIELD_1 al order email.
: trumpton 12 Oct 2007, 17:46:19
Risolto:

Ho aperto ps_checkout.php
(administrator / components / com_virtuemart / classes /)

:
$html = str_replace('{phpShopSTCompany}', $dbst->f("company"), $html);
$html = str_replace('{phpShopSTName}', $dbst->f("first_name")." ".$dbst->f("middle_name")." ".$dbst->f("last_name"),$html);
$html = str_replace('{phpShopSTStreet1}', $dbst->f("address_1"), $html);
$html = str_replace('{phpShopSTStreet2}', $dbst->f("address_2"), $html);
$html = str_replace('{phpShopSTCity}', $dbst->f("city"), $html);
$html = str_replace('{phpShopSTState}', $dbst->f("state"), $html);
$html = str_replace('{phpShopSTZip}', $dbst->f("zip"), $html);
$html = str_replace('{phpShopSTCountry}', $dbst->f("country"), $html);
$html = str_replace('{phpShopSTPhone}', $dbst->f("phone_1"), $html);
$html = str_replace('{phpShopSTFax}', $dbst->f("fax"), $html);
[b] $html = str_replace('{phpShoptaxcode}', $dbst->f("extra_field_1"), $html);[/b]
$html = str_replace('{phpShopOrderItems}',$order_items,$html);

nota bene. "phpShoptaxcode" è l'etichetta che ho dato a questo campo. Dev'essere uguale al nome utilizzato nel prossimo passo.

Apro email_italian.html trovato qua:
administrator / components / com_virtuemart / html / templates / order_emails /


Localizo il punto dove vuoi che il contenuto del extra_field_1 deve apparire ed inserisco

        <tr class="Stil1">
          <td>Partita IVA/Codice Fiscale :</td>
          <td>{phpShoptaxcode}</td>
        </tr>

Può essere replicato per  gli altri fields, cosi:

         $html = str_replace('{yourlabel2}', $dbst->f("extra_field_2"), $html);
         $html = str_replace('{yourlabel3}', $dbst->f("extra_field_3"), $html);
         $html = str_replace('{youlabel4}', $dbst->f("extra_field_4"), $html);

Poi aggiungo al email_italian.html come prima.

Trumpton.
: Re:Aggiungere un PHPSHOP_SHOPPER_FORM_EXTRA_FIELD_1 al order email.
: giulio.wr 28 Jan 2011, 13:00:54
email_italian...

Perchè non lo trovo dove dite?

Uso VM 1.1.5