Change Add Value

Hi

Is there a way to change an addon default value from a product page?

I'll explain, I have the fowling setting under my_changes


I've inserted that code to dispatch=products.m_add but when I press save, it doesn't change the value with the above code.

Can anyone help me with it.

What is your code in your controller? You should probably be using "product_data" rather than "addon_data" But if you have a pre controller that is looking specifically for "addon_data" you should be okay. You many need to mark your variable as "safe" by using fn_trusted_vars().

Another thing to do is to verify that you are posting your data and storing it properly. Without seeing what you're doing with the setting of the smarty variables as well as the handling of the POST variables, it's hard to advise accurately. Can only give broad suggestions to check.

As far as I can see, the m_update mode takes into account only product_data array (not addon_data one). So you should create products.post.php controller and process the $_REQUEST['addon_data'] array there