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.

 

can't logout due to Redirect rule

can't logout due to Redirect rule

Hi.
I need to configure my site to show a specific template to a virtuemart shopper group and redirect these users to another page (virtuemart home page).

No problem for the first part, thanks to this post http://www.metamodpro.com/forums/topic?id=451

But the redirect rule still creates problems.
In the beginning I edited the previous rule adding the redirect to the specific menu item, without success. Then I created another rule in the chain but it doesn't work.

When this redirect rule is active, users can't log out from site

If it's necessary I can send you url and login to test it by yourself

thanks a lot, Francesco

Edited By: francesco.r
28-Oct-10 13:36:38

francesco.r
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: can't logout due to Redirect rule

Hi Francesco,

under what circumstances do you want to redirect people in that shopper group to the home page? And why are you doing that? Is it to prevent them from shopping?

I think that the risk is that you may be sending them to the home page no matter where they are on the site - so they can never ever move off the home page. Is that what's happening?

Cheers,
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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: can't logout due to Redirect rule

The site is a music store designed for normal customers and wholesale dealers.
My client wants that the template changes when dealers do the login (and that's ok) and redirect them to the virtuemart home page. Other users have no particular rules.

At the moment I've found a workaround setting that page as the destination page after login in the login module options. But I want it as my new home page.

I hope it's clearer now.
Thanks, Francesco

francesco.r
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: can't logout due to Redirect rule

ok, the operative thing there is "I want it as my new home page".

Recent versions of MTP have the ability to do 2 things:

1 - set a different page as the "default" page (ie. the home page, or "http://www.mysite.com/" with no other page mentioned in the URL)
2 - disabling other menu items.

SO I would add a new rule in MTP and make it your first rule. In this rule we're going to detect a particular shopper group. If we find it, we will set a new page to be the default page, and perhaps delete some of the other menu items (e.g. the old home page?)

In the PHP of the 1st rule, use this:

$vm = JomGenius("virtuemart");
if ( $vm->check("shopper_group = 2" ) ) return true;

Then in the SUCCEED rule, don't do a redirect, just use the dropdown for Site Default Menu Item to set the VM home page as the default.
If you want to you could also remove any menu items you don't want to have appearing for those users.
Also, set the SUCCEED action to "Process next rule in chain", so that any of your other rules will also get run. You also need that on your FAIL action.


Make sense? I think we're heading in the right direction now.

Cheers,
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
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10091
Newest User:
lamanaudio
Members Online:
3
Guests Online:
207


Forum Legend:

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