Hi!
When I click on an order number in frontend order list, the order is loaded below via AJAX.
I do not want this, because if the list is long, the user does not see the order loaded and just thinks, nothing happened.
In the code of list.php I noticed a VM config setting 'ajax_order'.
But I can find this setting neither in VM backend config nor in virtuemart.cfg file.
Sure, I could create an own list layout without the AJAX loading code and add a hidden config 'layout_order_list=mylist'.
But to me it seems this is a VM config setting.
So where can I disable AJAX loading in order list?
Thank you very much in advance for any useful hints!
Kind regards,
Gerald
No one any idea?
Even not VM team?
???
Are you using any 3rd party template? Check using a standard template like Protostar, Beez3 etc.
Hi!
Thank you for your reply.
The 3rd party template is not relevant in this case.
As I wrote, the list.php of VM itself (/components/com_virtuemart/views/orders/tmpl/) contains the config setting mentioned.
For example at line 25:if(VmConfig::get ('ajax_order', TRUE)){
$ajaxUpdate = 'data-dynamic-update="1"';
}
I just need to find the config setting 'ajax_order'.
But where?
Kind regards,
Gerald
Change
if(VmConfig::get ('ajax_order', TRUE)){
$ajaxUpdate = 'data-dynamic-update="1"';
}
To
if(VmConfig::get ('ajax_order', FALSE)){
$ajaxUpdate = 'data-dynamic-update="1"';
}
This is then deactivate by default.
Hi!
;D
Thank you for your code.
What exactly do you recommend me - hacking the core, what will be overwritten by the next VM update, or creating an override using the hidden config I mentioned at the very beginning of this thread?
Actually I asked for the place where I can deactivate that setting itself - not deactivating code that uses this setting.
Kind regards,
Gerald
See https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html
Hi!
Thank you for that link (actually the list of hidden config parameters is not up-to-date).
I addedajax_order=false
to virtuemart.cfg and saved the VM configuration in the backend.
Now 'ajax_order' has the default value I set.
But it is a string. How can I set a boolean in the hidden config?
Kind regards,
Gerald
EDIT:
I found out now: Instead of ajax_order=false
I need to add ajax_order=0
to the hidden config file.