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.

 

Hide virtuemart categories

Hide virtuemart categories

Dear Sir\Madam,

I would like to change the Virtuemart frontpage for a specific country.

Joomla version: 2.5
VM version : 2.6.6
Metamod version  : 1.5

I successfully added a module for a specific country on the virtuemart FrontPage. I still see the categories overview at the bottom however. For one specific country I only want to show and altenative virtuemart shop front (basically only a text).

Can you help me out ?

gsc
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Hide virtuemart categories

Hi Gsc,

That's not necessarily an easy thing to do but I can suggest an approach you can take. It's not easy because MetaMod is mostly about showing different modules on a page, not changing the entire page which I think is what you are trying to do.

One way to approach it however is to use the MetaMod to do a redirect to a different page (URL) if someone is coming from a certain country.

When you do this it is important to ensure that you don't make an infinite loop. That is, make sure that if the person lands on the destination page they don't get redirected back to the same destination page again. Therefore, you need to assign the MetaMod to ONLY the exact page that you want to "restrict".

If the VM front page is also your site's front page, then assign the MetaMod to only the "home" menu item. Then set up an alternative menu item (possibly in a hidden menu) that contains the content that you want to show for country "X". For now I'll call that example.com/country_x

Then in your MetaMod PHP code, you can do the following:

if ($fromCountryId == 'XX') {
  JFactory::getApplication()->redirect('http://example.com/country_x');
}

Do you think that will be a good option for you?
Best regards,
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:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
168

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