[Skip to main content](#vessel-content)

#   AUP / restriction d'utilisation des points

##

- **[emohk](/forum/user/7512-emohk "View emohk's Profile")**
- [![emohk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7512-emohk "View emohk's Profile") Topic Author
- [ Offline](/forum/user/7512-emohk)

Less More

- Posts: 332
- Thank you received: 4
-
-

13 years 11 months ago [\#77266](#77266) by [emohk](/forum/user/7512-emohk "View emohk's Profile")  *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77266 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")* was created by *[emohk](/forum/user/7512-emohk "View emohk's Profile")*

Bonjour,

Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit?
Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?

Merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#77278](#77278) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77278 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Bonsoir,

Le plugin HikaShopAUP permet de donner des points en fonction des produits (avec oui ou non l'utilisation de la quantité en coef multiplicateur) mais aussi des categories.
Dans le cas ou ces options ne suffisent pas, vous pouvez apporter des modifications au plugin dans la fonction getPointsEarned du plugin.
Pour cela, il est nécessaire de modifier le fichier /plugins/hikashoppayments/alphauserpoints/alphauserpoints.php

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[emohk](/forum/user/7512-emohk "View emohk's Profile")**
- [![emohk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7512-emohk "View emohk's Profile") Topic Author
- [ Offline](/forum/user/7512-emohk)

Less More

- Posts: 332
- Thank you received: 4
-
-

13 years 11 months ago [\#77476](#77476) by [emohk](/forum/user/7512-emohk "View emohk's Profile")  Replied by *[emohk](/forum/user/7512-emohk "View emohk's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77476 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Bonjour,
Le plugin HikaShopAUP permet de donner des points en fonction des produits, mais en définissant une valeur de points (Gain de points par catégories) et non en pourcentage tel que défini par la valeur "Taux" dans la rubrique "Gain de points".
Donc en fait, cela me conduit à modifier le plugin pour interdire à certaines catégories.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#77488](#77488) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77488 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Bonjour,

Oui, cette fonctionnalité n'est pas prise en compte dans le plugin actuel.
Si vous avez une modification générique, nous pourrons voir pour l'inclure dans notre plugin.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[emohk](/forum/user/7512-emohk "View emohk's Profile")**
- [![emohk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7512-emohk "View emohk's Profile") Topic Author
- [ Offline](/forum/user/7512-emohk)

Less More

- Posts: 332
- Thank you received: 4
-
-

13 years 11 months ago [\#77495](#77495) by [emohk](/forum/user/7512-emohk "View emohk's Profile")  Replied by *[emohk](/forum/user/7512-emohk "View emohk's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77495 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Oui, à mon sens, il s'agit d'une modification générique :
les gains de points par catégorie devraient fonctionner aussi si uniquement le gain est défini par le taux et non uniquement par un nombre de points. Cela revient à autoriser à ajouter les catégories comme actuellement, sans nombre de points (le laisser à zero) et donc c'est le taux défini (dans gain de points) qui est prix en compte.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#77516](#77516) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77516 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Bonjour,

Alors, si votre plugin AUP modifié peut intéresser d'autres personnes, et si vous êtes d'accord pour le partager, nous verrons pour l'inclure dans HikaShop.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[emohk](/forum/user/7512-emohk "View emohk's Profile")**
- [![emohk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7512-emohk "View emohk's Profile") Topic Author
- [ Offline](/forum/user/7512-emohk)

Less More

- Posts: 332
- Thank you received: 4
-
-

13 years 11 months ago [\#77594](#77594) by [emohk](/forum/user/7512-emohk "View emohk's Profile")  Replied by *[emohk](/forum/user/7512-emohk "View emohk's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77594 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Quand la modification du statut de la commande dans la partie admin (après envoi du mail au client pour l'avertir du changement du statut de sa commande), c'est le même plugin?

Pour les modifications sur le plugin AUP, en fait la catégorie de produit n'est pas suffisante car, pour ma part ma restriction concerne des variantes de produits, qui n'ont donc pas de catégories associées (permettant éventuellement de les distinguées parmi les variantes d'un produit père).
Il faut donc que je crée en premier lieu un custom field pour distinguer mes variantes puis tester le custom field dans le plugin pour qu'elles ne soient pas concernées par le gain de points.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#77610](#77610) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#77610 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Bonsoir,

Le plugin est appelé lorsqu'une commande est créée ou modifiée (onAfterOrderCreated / onAfterOrderUpdate).
Donc, oui. C'est le même plugin qui s'occupe de la gestion des points AUP dans le frontend et dans le backend.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[emohk](/forum/user/7512-emohk "View emohk's Profile")**
- [![emohk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7512-emohk "View emohk's Profile") Topic Author
- [ Offline](/forum/user/7512-emohk)

Less More

- Posts: 332
- Thank you received: 4
-
-

13 years 11 months ago -  13 years 11 months ago [\#78534](#78534) by [emohk](/forum/user/7512-emohk "View emohk's Profile")  Replied by *[emohk](/forum/user/7512-emohk "View emohk's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#78534 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

En fait, j'ai travaillé directement sur le plugin Alphauserpoints (fonction getPointsEarned) en ne sélectionnant pas des produits qui ont une caractéristique particulière. Ainsi, il faut recalculer le total de la commande à partir des ligne de commandes, donc de produit. Cela me permet de mettre en place ma restriction rapidement en attendant de faire les choses plus proprement (définition dans la configuration du plugin de la caractéristique à tester et ses valeurs).

Ci-joint le code modifié pour information (en fait j'ai ajouté un foreach pour tester product-&gt;order_product_options[1]-&gt;characteristic_id). Par contre, cela ne peut pas fonctionner si les points gagnés intègrent aussi les frais de livraison, car le détail des frais de livraison n'est pas ventilé par ligne de commande/produit.
Code:

//-- if(!empty($order-&gt;cart-&gt;products)) { $productsabo = &amp;$order-&gt;cart-&gt;products; } else { $productsabo = &amp;$order-&gt;products; } //-- if(!empty($cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax)) { if($method-&gt;payment_params-&gt;shippingpoints==1) { $calculatedPrice = $cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax - @$cart-&gt;coupon-&gt;discount_value; } else { $calculatedPrice = $cart-&gt;total-&gt;prices[0]-&gt;price_value_with_tax - @$cart-&gt;coupon-&gt;discount_value; } } else { if($method-&gt;payment_params-&gt;shippingpoints==1) { $calculatedPrice = $order-&gt;order_full_price; } else { //-- foreach ($productsabo as $productabo) { if ($productabo-&gt;order_product_options[1]-&gt;characteristic_id != "13") { $calculatedPrice += $productabo-&gt;order_product_total_price; } } //-- } }

Last edit: 13 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#78553](#78553) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[AUP / restriction d'utilisation des points](/forum/5-support-en-francais-french-support-/75903-aup-restriction-dutilisation-des-points#78553 "Bonjour,  Existe-il une manière simple lors du passage en caisse que les points de réduction acquis ne puissent pas être pris en compte pour un certain type de produit? Sinon, sur quelle fonction du plugin alphauserpoints.php faut-il intervenir?  Merci")*

Bonjour,

Merci pour le partage, nous verrons ce qui sera possible de faire afin de rendre cela plus flexible.
Je me suis permis de modifier votre post afin d'avoir le code avec l'indentation, plus facil à lire.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU5MDMtYXVwLXJlc3RyaWN0aW9uLWQtdXRpbGlzYXRpb24tZGVzLXBvaW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.078 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
