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.

 

Using Metamod in PHP

Using Metamod in PHP

Hello,

I'm trying to use the Metamod functions in PHP in other modules, but I don't know how to do this.

Example, in ps_product_category from virtuemart I want to get the country of the user ($fromCountryId), bu doesn't exists. Perhaps it is not posible.

Thank you.

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

Re: Using Metamod in PHP

Yep, these special variables are only available in the MetaMod PHP box. You may be able to "send" them from a MetaMod to other modules, by assigning the $fromCountryId to a global variable in the MetaMod PHP box. But you would need to ensure that the MetaMod was evaluated before the other modules that you want to use the variable.

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:
1679
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10814
Newest User:
lloyd56785
Members Online:
0
Guests Online:
127

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