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

#   $\_GET\["view"\] me ramene $\_GET\["ctrl"\]

##

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

Less More

- Posts: 2696
- Thank you received: 74
-
-

14 years 1 week ago [\#69699](#69699) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[$\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69699 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

J'ai un problème bizarre

sur une URL comme ça index.php?option=com_hikashop&amp;**ctrl=product**&amp;task=show&amp;cid=2389&amp;.....

si je fais **echo $\_GET\["view"\];** j'obtiens **product** alors que ça devrait être vide

que je fasse $_GET["view"] ou $_GET["ctrl"] j'obtiens toujours product

une idee ?

merci

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

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

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 1 week ago [\#69783](#69783) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69783 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

Bonjour,

En essayant avec la méthode de Joomla: Code:

JRequest::getString('view','');

Cela fonctionne t'il ?

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

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

Less More

- Posts: 2696
- Thank you received: 74
-
-

14 years 1 week ago [\#69808](#69808) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69808 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

merci

c'est la folie ce truc

url = index.php?option=com_hikashop&amp;view=product&amp;layout=listing&amp;Itemid=229

Code:

$sview = JRequest::getString('view' ,'', 'GET'); $sctrl = JRequest::getString('ctrl' ,'', 'GET'); echo ' ctrl = ' . $sctrl . ' &lt;&gt; view = ' . $sview . '&lt;br /&gt;' ;

et je recupere

ctrl = product &lt;&gt; view = product

je peux pas savoir dans mon url si c'est view ou ctrl qui passe

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

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

Less More

- Posts: 2696
- Thank you received: 74
-
-

14 years 1 week ago -  14 years 1 week ago [\#69829](#69829) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69829 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

est ce que quelqu'un peut essayer ?

echo '&lt;h1&gt;view = ' . JRequest::getString('view' ,'', 'GET') . '&lt;/h1&gt;';
echo '&lt;h1&gt;ctrl = ' . JRequest::getString('ctrl' ,'', 'GET') . '&lt;/h1&gt;';

dans un templates/TPL/html/com_hikashop/product/listing_div.php

il y a quelque part un JRequest::setVar('view', '?') et JRequest::setVar('ctrl', '?') qui modifie le get , une variable non nettoyée en sortie

avec

$url = $_SERVER;
$isctrl = strrpos($url, "ctrl");
$isview = strrpos($url, "view");
echo '&lt;h1 style="color:gray;padding:5px 0px;"&gt;' . $isctrl . ' -- ' . $isview . '&lt;/h1&gt;';

j'ai ma réponse juste à tous les coups

merci

Last edit: 14 years 1 week ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNjk2OTktZ2V0LXZpZXctbWUtcmFtZW5lLWdldC1jdHJsP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86284
- Thank you received: 14263
-
-

14 years 1 week ago [\#69891](#69891) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69891 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

C'est normal.

Nous utilisons ctrl et task dans HikaShop pour définir le controleur et la tache à effectuer.
Joomla de son coté utilise view et layout pour faire cela.
Lorsque nous créeons des menus HikaShop, c'est joomla qui génère l'URL du menu et elle utilise view/layout.
Nous avons donc un système qui converti ctrl/task et view/layout au chargement d'HikaShop.

Je ne sais pas pourquoi vous voulez faire la distinction mais vous n'y arriverez qu'avec la création d'un plugin système qui regardera dans $_GET/$_REQUEST avant que HikaShop ne soit chargé.

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

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

Less More

- Posts: 2696
- Thank you received: 74
-
-

14 years 1 week ago [\#69897](#69897) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69897 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

mais pour quelle raison n'utilisez vous pas view et layout selon les conventions de Joomla ?

avec $_SERVER j'ai mes valeurs

merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNjk2OTktZ2V0LXZpZXctbWUtcmFtZW5lLWdldC1jdHJsP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86284
- Thank you received: 14263
-
-

14 years 1 week ago [\#69898](#69898) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69898 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

Par exemple, il est d'usage d'utiliser view=XXX&amp;layout=add pour l'affichage d'un formulaire pour un nouvel élément. view ser réfère au nom de la vue/du controlleur. layout se réfère au nom de la tache du controlleur. Alors que le nom du layout qui sera appelé par joomla est form.
De toute façon cela ne change strictement rien pour l'utilisateur et HikaShop peut également utiliser les paramètres view et layout

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

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

Less More

- Posts: 2696
- Thank you received: 74
-
-

14 years 1 week ago [\#69899](#69899) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: $\_GET\["view"\] me ramene $\_GET\["ctrl"\]](/forum/5-support-en-francais-french-support-/69699-get-view-me-ramene-get-ctrl#69899 "J'ai un problème bizarre  sur une URL comme ça index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=show&amp;cid=2389&amp;.....  si je fais echo $&#95;GET&#91;&quot;view&quot;&#93;; j'obtiens product alors que ça devrait être vide  que je fasse $&#95;GET&#91;&quot;view&quot;&#93; ou $&#95;GET&#91;&quot;ctrl&quot;&#93; j'obtiens toujours product  une idee ?  merci")*

merci

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

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

[](#top)
