VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Emma Iana on October 11, 2023, 10:27:05 AM

Title: the order of buttons on edit page
Post by: Emma Iana on October 11, 2023, 10:27:05 AM
Hi,
can you advise me where I need to make changes to change the order of the buttons?

I want the first button to be "save" on product edit page.

Screen: https://app.screencast.com/6nj3ohc4UlTK3

(https://app.screencast.com/6nj3ohc4UlTK3)
Title: Re: the order of buttons on edit page
Post by: Emma Iana on October 12, 2023, 13:37:59 PM
I found it in \administrator\components\com_virtuemart\helpers\vmviewadmin.php


if ($view == 'product' and vmAccess::manager('product.create')) {
if (vmAccess::manager('product.create')) {
JToolbarHelper::custom( 'createchild', 'new', 'new', vmText::_( 'COM_VIRTUEMART_PRODUCT_CHILD' ), false );
JToolbarHelper::custom( 'cloneproduct', 'copy', 'copy', vmText::_( 'COM_VIRTUEMART_PRODUCT_CLONE' ), false );
}
if (vmAccess::manager('ratings.edit')) {
JToolbarHelper::custom('addrating', 'default', '', vmText::_('COM_VIRTUEMART_ADD_RATING'), false);
}
}

JToolbarHelper::divider();
if (vmAccess::manager($view.'.edit')) {
JToolbarHelper::save();
JToolbarHelper::apply();
}
JToolbarHelper::cancel();
self::showHelp();
self::showACLPref($view);


is there a way to safely overwrite it?