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

#   Taxe montant fixe

##

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

Less More

- Posts: 46
- Thank you received: 1
-
-

9 years 9 months ago [\#259824](#259824) by [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")  *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#259824 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")* was created by *[fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")*

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.5
-- PHP version -- : 7

Bonjour à tous,

j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin "Global_Cart_Fee" qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)

Bref, applicable pour tout pays sauf France
Merci par avance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODg4MzY4LXRheGUtbW9udGFudC1maXhlP3RtcGw9bWFya2Rvd24=) 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: 4078
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#259829](#259829) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#259829 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonjour,

Cela va demander une modification du plugin afin de rajouter le support des zones.
Sachant que le plugin se base sur le trigger "onAfterCartProductsLoad", vous avez un accès au panier et vous avez la possibilité de lire l'adresse courante de l'utilisateur afin d'ajouter ou non le champs additionnel.
[ www.hikashop.com/support/documentation/6...fterCartProductsLoad](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onAfterCartProductsLoad)

Cordialement,

---

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

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

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

Less More

- Posts: 46
- Thank you received: 1
-
-

9 years 9 months ago [\#259887](#259887) by [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")  Replied by *[fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#259887 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Merci Jerome,

j'ai testé ça mais ça ne change rien et surtout je ne sais pas si je suis sur le bon chemin

if(!count($plugins) &amp;&amp; ($address\_country !=country\_France\_73)){
return;

Quel plugin natif utilisant le trigger "onAfterCartProductsLoad" pourrait m'aiguiller ?

Cdt
Phi

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14264
-
-

9 years 9 months ago [\#259903](#259903) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#259903 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonjour,

Il n'y a pas de variable $country dans le plugin. Donc c'est normal que cela ne fonctionne pas.

Vous trouverez le pays dans $cart-&gt;billing_address-&gt;address_country faites un var_dump de cette variable pour voir ce que vous avez dedans et faites votre if en fonction.

Le plugin global cart fee utilise déjà onAfterCartProductsLoad donc il n'y a pas besoin de regarder un autre plugin sur comment implémenter cela.

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

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

Less More

- Posts: 46
- Thank you received: 1
-
-

9 years 9 months ago -  9 years 9 months ago [\#260026](#260026) by [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")  Replied by *[fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#260026 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonjour Nicolas,

je ne trouve pas de billing_address avec un var_dump($cart); Code:

function onAfterCartProductsLoad(&amp;$cart) { $plugins = array(); $this-&gt;listPlugins($this-&gt;name, $plugins, false, true); $country = $cart-&gt;billing_address-&gt;address_country; if(!count($plugins) &amp;&amp; ($country != 'country_France_73')){ return; }

Rapport d'erreur Joomla :

Notice: Undefined property: stdClass::$billing_address in

Merci par avance

Last edit: 9 years 9 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODg4MzY4LXRheGUtbW9udGFudC1maXhlP3RtcGw9bWFya2Rvd24=) 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: 4078
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#260033](#260033) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#260033 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonjour,

C'est malheureusement normal ; vous utilisez HikaShop 2.6.3 et cela n'est disponible que depuis HikaShop 3.0
Dans HikaShop 2.x ; vous devez récupérer l'adresse ID via la session et vous devez ensuite charger l'adresse correspondante.

Cordialement,

---

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

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

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

Less More

- Posts: 46
- Thank you received: 1
-
-

9 years 9 months ago [\#260081](#260081) by [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")  Replied by *[fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#260081 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonjour,

par contre avec un var_dump($cart) je trouve un array "zone_namekey"

j'ai essayé :

$country = $cart-&gt;zone_namekey;
if(!count($plugins) &amp;&amp; ($country != 'country_France_73')){

Mais même message d'erreur de Joomla:

Notice: Undefined property: stdClass::$zone_namekey in

N'y aurait -il pas la possibilité de faire une condition sur zone_namekey

Merci

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

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

Less More

- Posts: 46
- Thank you received: 1
-
-

9 years 9 months ago -  9 years 9 months ago [\#260144](#260144) by [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")  Replied by *[fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#260144 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonsoir,

afin de test j'ai installé une version d'hika 3.0 et effectivement avec un var_dump $cart j'y trouve shipping_address-&gt;address_country

mais ma modif ne fonctionne pas Code:

function onAfterCartProductsLoad(&amp;$cart) { $plugins = array(); $this-&gt;listPlugins($this-&gt;name, $plugins, false, true); $country = $cart-&gt;shipping_address-&gt;address_country; if(!count($plugins) &amp;&amp; ($country != 'country_France_73')){ return; }

Qu'est ce que j'oublie ou fais de travers ?

Merci par avance

Last edit: 9 years 9 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14264
-
-

9 years 9 months ago [\#260083](#260083) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#260083 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Bonjour,

Comme Jérome l'a expliqué, avec une version antérieure à HikaShop 3, il faut charger l'adresse vous même et $cart-&gt;zone_namekey n'existe pas.

Il faut faire cela: Code:

$app = JFactory::getApplication(); $id = $app-&gt;getUserState('com_hikashop.billing_address'); $class = hikashop_get('class.address'); $address = $class-&gt;get($id); echo $address-&gt;address_country;

The following user(s) said Thank You: [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")

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

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

Less More

- Posts: 46
- Thank you received: 1
-
-

9 years 9 months ago -  9 years 9 months ago [\#260241](#260241) by [fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")  Replied by *[fifi84](/forum/user/8369-fifi84 "View fifi84's Profile")* on topic *[Taxe montant fixe](/forum/5-support-en-francais-french-support-/888368-taxe-montant-fixe#260241 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5 -- PHP version -- : 7  Bonjour à tous,  j'ai besoin de créer une taxe fixe par panier, j'ai installé le plugin &quot;Global&#95;Cart&#95;Fee&quot; qui fonctionne très bien mais il faudrait que j'exclue une zone pays (France)  Bref, applicable pour tout pays sauf France Merci par avance")*

Merci Nicolas

c'est nickel ! je mets le bout de code avec la condition si ça peut aider Code:

$app = JFactory::getApplication(); $id = $app-&gt;getUserState('com_hikashop.shipping_address'); $class = hikashop_get('class.address'); $address = $class-&gt;get($id); $country = $address-&gt;address_country; if ($country == 'country_France_73'){ if(!count($plugins)){ return; } } else {

Cordialement ![:)](/media/kunena/emoticons/8.png ":)")

Last edit: 9 years 9 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] IS NICE

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODg4MzY4LXRheGUtbW9udGFudC1maXhlP3RtcGw9bWFya2Rvd24=) 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.330 seconds

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

[](#top)
