Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

display a module based on URL

display a module based on URL

Hi,

After payment of products, user is redirected to URL

Code:

index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=14&Itemid=403

so i display a particular module according to URL and parameters as following:

Code:

if

(
  $option == 'com_hikashop'
  and
  $task == 'after_end'
  and
  $ctrl == 'checkout'
) return 240;

however my module is not displayed.
if i write:

Code:

if

(
  $option == 'com_hikashop'
) return 240;

my module is correctly displayed...so where is my mistake ?
thx.

Edited By: rafnews
12-Oct-12 11:26:43

rafnews
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: display a module based on URL

ok i know now where is my mistake big_smile
i had to write:
if
(
  $option == 'com_hikashop'
  and
  JRequest::getVar("task") == 'after_end'
  and
  JRequest::getVar("ctrl") == 'checkout'
) return 240;

rafnews
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: display a module based on URL

That's it :-)

Glad you found it,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10746
Newest User:
victor1234
Members Online:
0
Guests Online:
118

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked