323 lines
4.3 KiB
Plaintext
323 lines
4.3 KiB
Plaintext
|
|
|
|
Offir un cadeau
|
|
|
|
|
|
|
|
Description
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Permet d'associer un cadeau (image thelia) à une commande.
|
|
|
|
L'information est soumise par mail à l'administrateur et disponible dans l'administration ainsi que dans le compte client.
|
|
|
|
Le cadeau n'est pas un produit Thelia.
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
|
|
|
Standard :
|
|
|
|
- upload de l'archive décompressée dans "client/plugins/".
|
|
|
|
- activation depuis l'administration Thelia.
|
|
|
|
|
|
|
|
|
|
|
|
Boucle cadeau
|
|
|
|
-------------
|
|
|
|
|
|
|
|
Description :
|
|
|
|
|
|
|
|
Cadeaux associés aux commandes.
|
|
|
|
|
|
|
|
Paramètre entrée :
|
|
|
|
|
|
|
|
commande : Identifiant (numérique) de la commande
|
|
|
|
etat : Etat (numerique) de soumission du cadeau
|
|
|
|
- 0 : Commande passée, attente paiement
|
|
|
|
- 1 : Commande payée, attente envoi
|
|
|
|
- 2 : Envoyé (manuellement)
|
|
|
|
- 3 : Annulé
|
|
|
|
|
|
|
|
Paramètre sortie :
|
|
|
|
|
|
|
|
id : Identifiant ligne base de donnée
|
|
|
|
image : Identifiant de l'image associée
|
|
|
|
etat : Etat d'envoi du cadeau
|
|
|
|
commande : Identifiant commande à laquelle est rataché le cadeau
|
|
|
|
|
|
|
|
Exemple :
|
|
|
|
|
|
|
|
<T_commandes_d_un_client>
|
|
|
|
<table id="table-panier">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>::numcommande:: </th>
|
|
|
|
<th>Date</th>
|
|
|
|
<th>::montant::</th>
|
|
|
|
<th>::statut::</th>
|
|
|
|
<th>::cadeau::</th>
|
|
|
|
<th>::voircommande::</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<THELIA_commandes_d_un_client type="COMMANDE" client="#CLIENT_ID">
|
|
|
|
<tr>
|
|
|
|
<td class="ligne">#REF</td>
|
|
|
|
<td class="ligne">#DATE</td>
|
|
|
|
<td class="ligne">#TOTCMDPORT €</td>
|
|
|
|
<td class="ligne">#STATUT</td>
|
|
|
|
<THELIA_cadeau_d_une_commande type="CADEAU" commande="#ID">
|
|
|
|
<THELIA_image_cadeau type="IMAGE" id="#IMAGE" largeur="50">
|
|
|
|
<td class="ligne">
|
|
|
|
<img src="#IMAGE" alt="#TITRE" title="#TITRE" />
|
|
|
|
</td>
|
|
|
|
</THELIA_image_cadeau>
|
|
|
|
</THELIA_cadeau_d_une_commande>
|
|
|
|
<td class="ligne"><a href="#URLFOND(commande_detail,commande=#REF)">::voircommande::</a></td>
|
|
|
|
</tr>
|
|
|
|
</THELIA_commandes_d_un_client>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</T_commandes_d_un_client>
|
|
|
|
<h4>::nocommande::</h4>
|
|
|
|
<//T_commandes_d_un_client>
|
|
|
|
|
|
|
|
|
|
|
|
Formulaire de sélection d'un cadeau
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
A insérer par défaut dans le template commande.html (mais rien ne l'oblige)
|
|
|
|
Nous listons toutes les images d'une page contenu (dans l'exemple c'est le contenu 10).
|
|
|
|
Le client doit sélectionner une image et valider.
|
|
|
|
|
|
|
|
<T_choix_cadeau>
|
|
|
|
<form method="post" action="#URLFOND(commande)">
|
|
|
|
|
|
|
|
<input type="hidden" name="action" value="choix_cadeau" />
|
|
|
|
<ul>
|
|
|
|
<THELIA_choix_cadeau type="IMAGE" contenu="1" largeur="180">
|
|
|
|
<li>
|
|
|
|
<h4>#TITRE</h4>
|
|
|
|
<img src="#IMAGE" alt="#TITRE"/>
|
|
|
|
<p>
|
|
|
|
<label>::choisir::</label>
|
|
|
|
<input type="radio" name="cadeau" value="#ID" />
|
|
|
|
</p>
|
|
|
|
</li>
|
|
|
|
</THELIA_choix_cadeau>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
<input type="submit" value="Envoyer" />
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</T_choix_cadeau>
|
|
|
|
|
|
|
|
<//T_choix_cadeau>
|
|
|
|
|
|
|
|
Pour conditionner l'affichage de ce formulaire selon le montant de la commande (99 €) :
|
|
|
|
|
|
|
|
<TEST_afficher_formulaire_cadeau variable="#PANIER_TOTREMISE" test="superieurouegal" valeur="99">
|
|
|
|
afficher le formulaire ici
|
|
|
|
</TEST_afficher_formulaire_cadeau>
|
|
|
|
ne rien mettre ici
|
|
|
|
<//TEST_afficher_formulaire_cadeau>
|
|
|
|
|
|
|
|
|
|
|
|
Commande détail
|
|
|
|
---------------
|
|
|
|
|
|
|
|
A placer dans la boucle commande du template commande_detail.html.
|
|
|
|
|
|
|
|
<THELIA_cadeau_d_une_commande type="CADEAU" commande="#ID">
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<THELIA_image_cadeau type="IMAGE" id="#IMAGE" largeur="120">
|
|
|
|
<img src="#IMAGE" alt="#TITRE" title="#TITRE" />
|
|
|
|
</THELIA_image_cadeau>
|
|
|
|
</td>
|
|
|
|
<td style="width: 30px;">
|
|
|
|
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<TEST_etat_0 variable="#ETAT" test="egal" valeur="0">
|
|
|
|
::etat_envoi_cadeau_0::
|
|
|
|
</TEST_etat_0>
|
|
|
|
<TEST_etat_1 variable="#ETAT" test="egal" valeur="1">
|
|
|
|
::etat_envoi_cadeau_1::
|
|
|
|
</TEST_etat_1>
|
|
|
|
<TEST_etat_2 variable="#ETAT" test="egal" valeur="2">
|
|
|
|
::etat_envoi_cadeau_2::
|
|
|
|
</TEST_etat_2>
|
|
|
|
<TEST_etat_3 variable="#ETAT" test="egal" valeur="3">
|
|
|
|
::etat_envoi_cadeau_3::
|
|
|
|
</TEST_etat_3>
|
|
|
|
<//TEST_etat_3>
|
|
|
|
<//TEST_etat_2>
|
|
|
|
<//TEST_etat_1>
|
|
|
|
<//TEST_etat_0>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</THELIA_cadeau_d_une_commande>
|
|
|
|
|
|
|