Fork me on GitHub






Olédrion Réductions
Aspirant
Inscrit: 10/03/2004 13:28
Messages: 27
Bonjour,

Je tourne sous xoops 2.4.1 et la dernière version du module Olédrion. J'ai des problèmes avec les réductions.

Déjà, le template de l'admin semble corrompu : dès la 3ème ligne, la première balise est un "elseif". Je suis une pipe en code, mais il me semble que cette balise n'existe pas ?

De plus, l'affichage de la page de gestion des réductions n'a pas l'air de fonctionner correctement, et s'affiche bizarrement sur fond blanc. Cependant, on peut rentre des règles de réductions, mais aucune d'elles ne semble vouloir s'appliquer..

Voici le code du template :

<{if $action == 'default'}>  <{elseif $action == 'edit'}>     <form method="post" action="<{$baseurl}>" name="frmdiscount" id="frmdiscount">         <input type='hidden' name='op' id='op' value='discounts' />         <input type='hidden' name='action' id='action' value='saveedit' />         <input type='hidden' name='disc_id' id='disc_id' value='<{$discount.disc_id}>' />         <div align="center"><h3><{$formTitle}></h3>         <table width='100%' class='outer' cellspacing='1'>         <tr>             <th colspan="2" align="center"><{$smarty.const._AM_OLEDRION_DISCOUNT_INFORMATION}></th>    <{* Informations sur la r&#65533;duction *}>         </tr>         <tr>             <td class='head'><label for="disc_title"><{$smarty.const._AM_OLEDRION_DISCOUNT_TITLE}></label></td>             <td class='even'><input type="text" name="disc_title" id="disc_title" value="<{$discount.disc_title}>" size="50" maxlength="255" /></td>         </tr>         <tr>             <td class='head' valign="top"><label for="disc_description"><{$smarty.const._AM_OLEDRION_DISCOUNT_DESCRIPTION}></label></td>             <td class='even'><{$editor}></td>         </tr>         <tr>             <td class='head'><label for="disc_pediod"><{$smarty.const._AM_OLEDRION_DISCOUNT_PERIOD}></label></td>             <td class='even'><input type="checkbox" name="disc_pediod" id="disc_pediod" value="1" <{$discount.disc_pediod_checked}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_PERFROM}> <{$discount.disc_date_from}> <{$smarty.const._AM_OLEDRION_DISCOUNT_PERTO}> <{$discount.disc_date_to}></td>         </tr>          <tr>    <{* A qui ou selon quoi appliquer la r&#65533;duction ? *}>             <th colspan="2" align="center"><{$smarty.const._AM_OLEDRION_DISCOUNT_WHOWHAT}></th>         </tr>         <tr>             <td class='head'><label for="disc_group"><{$smarty.const._AM_OLEDRION_DISCOUNT_XOOPS_GROUP}></label></td>             <td class='even'><select name="disc_group" id="disc_group"><{html_options options=$disc_groups_options selected=$disc_groups_selected}></select></td>         </tr>         <tr>             <td class='head'><label for="disc_cat_cid"><{$smarty.const._AM_OLEDRION_DISCOUNT_CATEGORY}></label></td>             <td class='even'><{$discount.disc_cat_cid_select}></td>         </tr>         <tr>             <td class='head'><label for="disc_vendor_id"><{$smarty.const._AM_OLEDRION_DISCOUNT_VENDOR}></label></td>             <td class='even'><select name="disc_vendor_id" id="disc_vendor_id"><{html_options options=$disc_vendor_id_options selected=$disc_vendor_id_selected}></select></td>         </tr>         <tr>             <td class='head'><label for="disc_product_id"><{$smarty.const._AM_OLEDRION_DISCOUNT_PRODUCT}></label><br /><span class='xoops-form-element-help'><{$smarty.const._AM_OLEDRION_DISCOUNT_HELP1}></span></td>             <td class='even'><{$disc_product_id}><!-- <select name="disc_product_id" id="disc_product_id"><{html_options options=$disc_product_id_options selected=$disc_product_id_selected}></select> --></td>         </tr>         <tr>             <td class='head' colspan="2"><span class='xoops-form-element-help'><{$smarty.const._AM_OLEDRION_DISCOUNT_HELP2}><br /><{$smarty.const._AM_OLEDRION_DISCOUNT_HELP3}><br /><{$smarty.const._AM_OLEDRION_DISCOUNT_HELP4}><br /><{$smarty.const._AM_OLEDRION_DISCOUNT_HELP5}><br /><{$smarty.const._AM_OLEDRION_DISCOUNT_HELP6}></span></td>         </tr>          <tr>    <{* R&#65533;duction sur le prix du produit ou le montant de la commande *}>             <th colspan="2" align="center"><{$smarty.const._AM_OLEDRION_DISCOUNT_REDUCTION_PRICE}></th>         </tr>         <tr>             <td class='head' valign="top"><{$smarty.const._AM_OLEDRION_DISCOUNT_REDUCTION_TYPE}></td>             <td class='even'>                 <table border="0">                 <tr>                     <td>                         <input type="radio" name="disc_price_type" id="disc_price_type" value="1" <{$discount.disc_price_type_checked1}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_DEGRESSIV}>                         <table border="0">                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_price_degress_l1qty1" id="disc_price_degress_l1qty1" value="<{$discount.disc_price_degress_l1qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_price_degress_l1qty2" id="disc_price_degress_l1qty2" value="<{$discount.disc_price_degress_l1qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_price_degress_l1total" id="disc_price_degress_l1total" value="<{$discount.disc_price_degress_l1total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_price_degress_l2qty1" id="disc_price_degress_l2qty1" value="<{$discount.disc_price_degress_l2qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_price_degress_l2qty2" id="disc_price_degress_l2qty2" value="<{$discount.disc_price_degress_l2qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_price_degress_l2total" id="disc_price_degress_l2total" value="<{$discount.disc_price_degress_l2total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_price_degress_l3qty1" id="disc_price_degress_l3qty1" value="<{$discount.disc_price_degress_l3qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_price_degress_l3qty2" id="disc_price_degress_l3qty2" value="<{$discount.disc_price_degress_l3qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_price_degress_l3total" id="disc_price_degress_l3total" value="<{$discount.disc_price_degress_l3total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_price_degress_l4qty1" id="disc_price_degress_l4qty1" value="<{$discount.disc_price_degress_l4qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_price_degress_l4qty2" id="disc_price_degress_l4qty2" value="<{$discount.disc_price_degress_l4qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_price_degress_l4total" id="disc_price_degress_l4total" value="<{$discount.disc_price_degress_l4total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_price_degress_l5qty1" id="disc_price_degress_l5qty1" value="<{$discount.disc_price_degress_l5qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_price_degress_l5qty2" id="disc_price_degress_l5qty2" value="<{$discount.disc_price_degress_l5qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_price_degress_l5total" id="disc_price_degress_l5total" value="<{$discount.disc_price_degress_l5total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         </table>                     </td>                 </tr>                 <tr>                     <td>                         <input type="radio" name="disc_price_type" id="disc_price_type" value="2" <{$discount.disc_price_type_checked2}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_AMOUNT_PERCENT}>                         <table border="0">                         <tr>                             <td width="5%"> </td>                             <td><input type="text" name="disc_price_amount_amount" id="disc_price_amount_amount" value="<{$discount.disc_price_amount_amount}>" size="5" maxlength="10" /> <input type="radio" name="disc_price_amount_type" id="disc_price_amount_type" value="1" <{$discount.disc_price_amount_type_checked1}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_PERCENT}> <input type="radio" name="disc_price_amount_type" id="disc_price_amount_type" value="2" <{$discount.disc_price_amount_type_checked2}> /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td>                                 <{$smarty.const._AM_OLEDRION_DISCOUNT_ON}> <input type="radio" name="disc_price_amount_on" id="disc_price_amount_on" value="1" <{$discount.disc_price_amount_on_checked1}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_THE_PRODUCT}>                                 <input type="radio" name="disc_price_amount_on" id="disc_price_amount_on" value="2" <{$discount.disc_price_amount_on_checked2}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_THE_CART}>                             </td>                         </tr>                         </table>                     </td>                 </tr>                 </table>             </td>         </tr>         <tr>             <td class='head' valign="top"><{$smarty.const._AM_OLEDRION_DISCOUNT_IN_WHICH_CASE}></td>             <td class='even'>                 <input type="radio" name="disc_price_case" id="disc_price_case" value="1" <{$discount.disc_price_case_checked1}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_ALL_CASES}><br />                 <input type="radio" name="disc_price_case" id="disc_price_case" value="2" <{$discount.disc_price_case_checked2}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_FIRST_PURCHASE}><br />                 <input type="radio" name="disc_price_case" id="disc_price_case" value="3" <{$discount.disc_price_case_checked3}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_NEVER_BOUGHT}><br />                 <input type="radio" name="disc_price_case" id="disc_price_case" value="4" <{$discount.disc_price_case_checked4}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_IS}> <select name="disc_price_case_qty_cond" id="disc_price_case_qty_cond"><{html_options options=$disc_price_case_qty_cond_options selected=$disc_price_case_qty_cond_selected}></select> <input type="text" name="disc_price_case_qty_value" id="disc_price_case_qty_value" value="<{$discount.disc_price_case_qty_value}>" size="3" maxlength="5" />             </td>         </tr>         <tr>             <th colspan="2" align="center"><{$smarty.const._AM_OLEDRION_DISCOUNT_SHIPPING_REDUCTIONS}></th>    <{* R&#65533;ductions sur les frais de port *}>         </tr>         <tr>             <td class='head' valign='top'><{$smarty.const._AM_OLEDRION_DISCOUNT_SHIPPINGS_ARE}></td>             <td class='even'>                 <table border="0">                 <tr>                     <td><input type="radio" name="disc_shipping_type" id="disc_shipping_type" value="1" <{$discount.disc_shipping_type_checked1}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_FULL_PAY}></td>                 </tr>                 <tr>                     <td>                         <input type="radio" name="disc_shipping_type" id="disc_shipping_type" value="2" <{$discount.disc_shipping_type_checked2}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_SHIPPING_FREE}>                         <table border="0">                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_ORDER_OVER}> <input type="text" name="disc_shipping_free_morethan" id="disc_shipping_free_morethan" value="<{$discount.disc_shipping_free_morethan}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         </table>                     </td>                 </tr>                 <tr>                     <td>                         <input type="radio" name="disc_shipping_type" id="disc_shipping_type" value="3" <{$discount.disc_shipping_type_checked3}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_REDUCED_FOR}>                         <table border="0">                         <tr>                             <td width="5%"> </td>                             <td><input type="text" name="disc_shipping_reduce_amount" id="disc_shipping_reduce_amount" value="<{$discount.disc_shipping_reduce_amount}>" size="5" maxlength="10" /> <{$currencyName}> <{$smarty.const._AM_OLEDRION_DISCOUNT_REDUCED_IF}> <input type="text" name="disc_shipping_reduce_cartamount" id="disc_shipping_reduce_cartamount" value="<{$discount.disc_shipping_reduce_cartamount}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         </table>                     </td>                 </tr>                 <tr>                     <td>                         <input type="radio" name="disc_shipping_type" id="disc_shipping_type" value="4" <{$discount.disc_shipping_type_checked4}> /> <{$smarty.const._AM_OLEDRION_DISCOUNT_DEGRESSIV}>                         <table border="0">                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_shipping_degress_l1qty1" id="disc_shipping_degress_l1qty1" value="<{$discount.disc_shipping_degress_l1qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_shipping_degress_l1qty2" id="disc_shipping_degress_l1qty2" value="<{$discount.disc_shipping_degress_l1qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_shipping_degress_l1total" id="disc_shipping_degress_l1total" value="<{$discount.disc_shipping_degress_l1total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_shipping_degress_l2qty1" id="disc_shipping_degress_l2qty1" value="<{$discount.disc_shipping_degress_l2qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_shipping_degress_l2qty2" id="disc_shipping_degress_l2qty2" value="<{$discount.disc_shipping_degress_l2qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_shipping_degress_l2total" id="disc_shipping_degress_l2total" value="<{$discount.disc_shipping_degress_l2total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_shipping_degress_l3qty1" id="disc_shipping_degress_l3qty1" value="<{$discount.disc_shipping_degress_l3qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_shipping_degress_l3qty2" id="disc_shipping_degress_l3qty2" value="<{$discount.disc_shipping_degress_l3qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_shipping_degress_l3total" id="disc_shipping_degress_l3total" value="<{$discount.disc_shipping_degress_l3total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_shipping_degress_l4qty1" id="disc_shipping_degress_l4qty1" value="<{$discount.disc_shipping_degress_l4qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_shipping_degress_l4qty2" id="disc_shipping_degress_l4qty2" value="<{$discount.disc_shipping_degress_l4qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_shipping_degress_l4total" id="disc_shipping_degress_l4total" value="<{$discount.disc_shipping_degress_l4total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         <tr>                             <td width="5%"> </td>                             <td><{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_FROM}> <input type="text" name="disc_shipping_degress_l5qty1" id="disc_shipping_degress_l5qty1" value="<{$discount.disc_shipping_degress_l5qty1}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_TO}> <input type="text" name="disc_shipping_degress_l5qty2" id="disc_shipping_degress_l5qty2" value="<{$discount.disc_shipping_degress_l5qty2}>" size="3" maxlength="5" /> <{$smarty.const._AM_OLEDRION_DISCOUNT_QUANTITY_INCLUDED}> <input type="text" name="disc_shipping_degress_l5total" id="disc_shipping_degress_l5total" value="<{$discount.disc_shipping_degress_l5total}>" size="5" maxlength="10" /> <{$currencyName}></td>                         </tr>                         </table>                     </td>                 </tr>                 </table>             </td>         </tr>         <tr>             <td class='head'> </td>             <td class='even'><input type="submit" name="btngo" id="btngo" value="<{$label_submit}>" /></td>         </tr>         </table>     </form> <{/if}>


Y'aurait pas des trucs à modifier ?

Posté le : 01/12/2009 11:00
Partager Twitter Partagez cette article sur GG+
Re: Olédrion Réductions
Aspirant
Inscrit: 10/03/2004 13:28
Messages: 27
Si ça peut simplifier ma demande, je veux juste pouvoir attribuer une réduction sur frais de port pour le(s) produit(s) d'un même "Vendeur".

A partir d'un certain montant d'achat réalisé chez un même producteur pour un ou plusieurs articles différents, les frais de port sont réduit ou offert.

Posté le : 01/12/2009 12:43
Partager Twitter Partagez cette article sur GG+
Re: Olédrion Réductions
Supporter Xoops
Inscrit: 09/01/2005 13:37
De Breizh
Messages: 16972
Citation :

guigoz a écrit:
Déjà, le template de l'admin semble corrompu : dès la 3ème ligne, la première balise est un "elseif". Je suis une pipe en code, mais il me semble que cette balise n'existe pas ?


Petite lecture --> http://www.phpsources.org/tutoriel-conditionnel-if-else-elseif.htm

Posté le : 01/12/2009 13:46

La connaissance s'accroît quand on la partage ...
Partager Twitter Partagez cette article sur GG+
Re: Olédrion Réductions
Aspirant
Inscrit: 10/03/2004 13:28
Messages: 27
Ca confirme bien que je suis une pipe et que j'aurais pu googleliser ma recherche..

Cependant, les règles de réductions fonctionnent très très mal, et y'a pas grand chose de logique dans ce qui fonctionne.

En théorie, les options de réductions permettent d'appliquer des réductions sur l'ensemble des produits soumis par un même vendeur. Le souci, c'est qu'on est obligé de selectionner un produit alors qu'à priori, il devrait y avoir l'option "Tous". En effet, l'option tous est présente sur tous les critères d'attribution de la réduction : Groupe, Catégorie, vendeurs, mais pas pour Produit..

Y'a-t-il quelqu'un dans le coin qui connaisse bien ce module ?

Je crois que c'est la dedans qu'il faut bidouiller :

// Produits         
$products $h_oledrion_products->getList();
         
$products[0] = _ALL;         ksort($products);
         
$xoopsTpl->assign('disc_product_id_options'$products);
         
$xoopsTpl->assign('disc_product_id_selected'$item->getVar('disc_product_id'));
          
$productsSelect $h_oledrion_products->productSelector(new oledrion_parameters(array('caption' => _AM_OLEDRION_DISCOUNT_PRODUCT'name' => 'disc_product_id''value' => $item->getVar('disc_product_id'), 'size' => 1'multiple' => false'values' => null'showAll' => true'sort' => 'product_title''order' => 'ASC''formName' => 'frmdiscount''description' => _AM_OLEDRION_DISCOUNT_HELP1'withNull' => _ALL)));
         
$xoopsTpl->assign('disc_product_id'$productsSelect->render());

Posté le : 01/12/2009 15:14
Partager Twitter Partagez cette article sur GG+
Re: Olédrion Réductions
Aspirant
Inscrit: 10/03/2004 13:28
Messages: 27
Personne ?

Posté le : 03/12/2009 10:36
Partager Twitter Partagez cette article sur GG+
Re: Olédrion Réductions
Newbie
Inscrit: 21/12/2004 03:02
Messages: 9
quelqu'un aurait une piste pour ces réductions
merci à tous

Posté le : 19/05/2010 01:06
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

297 Personne(s) en ligne (241 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 297 | Plus ...