News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

If userfield value =

Started by alexanderflr, September 13, 2017, 16:22:14 PM

Previous topic - Next topic

alexanderflr

Hi,

I created in Shopper Fields a field named 'Test' and I'm trying to do something like:


$message = "example message";
if ($this->user->userFields->Test['value']=="30") echo "<script type='text/javascript'>alert('$message');</script>";?>

But it doesn't work  :-\
I want to add this code in shopping cart or somewhere else..

Does anyone know?

Thank you very much.
VM 3.2.8, Joomla 3.8.3, PHP 7.0.26

Studio 42

Hi,
Sorry but your explain are a little short.
When do you want display this alert?
When the user display the form, you can only check for the value by javascript not PHP.
If you want to verify it after, you need to write your own plugin(or modify Vm core)