Hello
I'm trying to find where is the place in code which generates sql UPDATE query which runs after you clicking SAVE button in product card.
I made changes in related products logic and now I have to change UPDATE sql-query that modifies #__virtuemart_product_customfields table after saving product card changes
Please help
Thank you
There are such strokes in "Save" function body which defined in administrator/.../vmcontroller.php:
...
$model = VmModel::getModel($this->_cname);
$id = $model->store($data);
...
I'd opened administrator/components/com_virtuemart/helpers/vmmodel.php, and found store function definition there. Due to debug I placed such code in its body:
...
var_dump($data);
die();
...
But when I click Save button in product card which runs Save function of vmcontroller.php and then as i think it has to run modified Store function. But it doesn't happens.
Can any tell me why there is no change in output? Why do I not see var_dump output?
The save function is very often customised. Check the custom and customfield model, but be aware that is not written by me. The code will be drastically enhanced in vm2.1. and use vmdebug, it easier then var_dump
Quote from: Milbo on June 07, 2013, 12:06:45 PM
The save function is very often customised. Check the custom and customfield model, but be aware that is not written by me. The code will be drastically enhanced in vm2.1. and use vmdebug, it easier then var_dump
thank you. where can i read about benefits of vmdebug and how to use it?
Read here http://dev.virtuemart.net/projects/virtuemart/wiki/Developing_a_module_or_plugin_for_VirtueMart_2
then use vmdebug('description',$values1, $value2,....)
Quote from: Milbo on June 07, 2013, 15:16:03 PM
Read here http://dev.virtuemart.net/projects/virtuemart/wiki/Developing_a_module_or_plugin_for_VirtueMart_2
then use vmdebug('description',$values1, $value2,....)
sorry, but there is no descripton of vmdebug usage in link you have suggested
just try it... use it somewhere in the code, just use what I gave you vmdebug('description',$values1, $value2,....)
you must load the vmconfig before, you can also read there about the function. helpers/config.php
I am in same place... i added a field to table jos_virtuemart_product_customfields but cant find where to add field to update statement on admin side... Somewhat frustrating...
Hoping someone can help...
thanks in Advance
Quote from: borro on May 27, 2013, 14:55:35 PM
I made changes in related products logic and now I have to change UPDATE sql-query that modifies #__virtuemart_product_customfields table after saving product card changes
What is a product card? Do you mean the product edit? If you want to change what is stored, you need to change the table file! in the folder "tables". Or take a look in customfields model. I still do not really understand what you are looking for.
Btw instead hacking the core, take a look on the textinput plugin and write a plugin.
Hello, friends.
I used the vmdebug function in code. Where should i look for its output?
I've found, right at the page