- Posts: 61
- Thank you received: 2
Trying to remove the Apply button
13 years 4 weeks ago - 13 years 4 weeks ago #120549
by xsbucks
Trying to remove the Apply button was created by xsbucks
I am trying to remove the 'APPLY' button on the new file upload . I wish to keep the save button.
Last edit: 13 years 4 weeks ago by Jerome.
Please Log in or Create an account to join the conversation.
13 years 4 weeks ago #120573
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Trying to remove the Apply button
Hi,
First you have to re-download HikaMarket 1.3.0, I update the package in order to allow a plugin to access to the toolbar (and activate a trigger).
After that, you will be able to use that little custom plugin.
It uses a special view trigger in order to access to the toolbar of the page and modify it.
In our case, it removes the button "apply". But you can also change a button or add new ones.
Regards,
First you have to re-download HikaMarket 1.3.0, I update the package in order to allow a plugin to access to the toolbar (and activate a trigger).
After that, you will be able to use that little custom plugin.
Code:
<?php
class plgHikamarketCustomtoolbar01 extends JPlugin {
public function onHikamarketBeforeDisplayView(&$view) {
$app = JFactory::getApplication();
$ctrl = JRequest::getCmd('ctrl', '');
$layout = $view->getLayout();
if(!$app->isAdmin() && $ctrl == 'product' && $layout = 'form' && isset($view->toolbar['apply'])) {
unset($view->toolbar['apply']);
}
}
}
In our case, it removes the button "apply". But you can also change a button or add new ones.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 99
- Thank you received: 0
9 years 6 days ago #278746
by ChristopheMG
Replied by ChristopheMG on topic Trying to remove the Apply button
Hi,
I'm trying to remove the Apply button too, Save is enough, I created the plugin with 3 files: xml, php with the code above and index.html.
I installed and activated it but I still see the button Apply.
I was wondering if I can use the override technique ? But I can't find the file in Views with the apply buton, it's not in HikaMarket - toolbar / default.php for sure...
www.hikashop.com/forum/19-hikamarket/890...ser-change-save.html
Regards,
I'm trying to remove the Apply button too, Save is enough, I created the plugin with 3 files: xml, php with the code above and index.html.
I installed and activated it but I still see the button Apply.
I was wondering if I can use the override technique ? But I can't find the file in Views with the apply buton, it's not in HikaMarket - toolbar / default.php for sure...
www.hikashop.com/forum/19-hikamarket/890...ser-change-save.html
Regards,
Please Log in or Create an account to join the conversation.
9 years 6 days ago #278782
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Trying to remove the Apply button
Hello,
The trick I gave 4 years ago was to remove the button for a specific view.
In 4 years, HikaMarket has evolve and now you can find a view to display the toolbar ; which allow you to perform a view override instead of a custom plugin.
That view process the "toolbar" variable to display the buttons ; in that view you can see to "skip" the buttons that you don't want to display.
Regards,
The trick I gave 4 years ago was to remove the button for a specific view.
In 4 years, HikaMarket has evolve and now you can find a view to display the toolbar ; which allow you to perform a view override instead of a custom plugin.
That view process the "toolbar" variable to display the buttons ; in that view you can see to "skip" the buttons that you don't want to display.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 99
- Thank you received: 0
9 years 5 days ago #278819
by ChristopheMG
Replied by ChristopheMG on topic Trying to remove the Apply button
Thank you Jerome,
Here is the line for all the buttons:
if(!empty($tool)) { $content .= '<span class="btnIcon iconM-32-'.$tool.'"></span>'; }
Then icon becomes "back", "apply" and "save"
How could I remove just apply please ?
Here is the line for all the buttons:
if(!empty($tool)) { $content .= '<span class="btnIcon iconM-32-'.$tool.'"></span>'; }
Then icon becomes "back", "apply" and "save"
How could I remove just apply please ?
Please Log in or Create an account to join the conversation.
9 years 5 days ago #278820
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Trying to remove the Apply button
www.hikashop.com/forum/19-hikamarket/890...ser-change-save.html
www.hikashop.com/forum/20-market-feature...-save-and-close.html
www.hikashop.com/forum/20-market-feature...-save-and-close.html
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: ChristopheMG
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 99
- Thank you received: 0
9 years 4 days ago - 9 years 4 days ago #278878
by ChristopheMG
Replied by ChristopheMG on topic Trying to remove the Apply button
Thank you,
I had forgotten my other post to remove the text below the buttons, a useful reminder.
Fixed:
I had forgotten my other post to remove the text below the buttons, a useful reminder.
Fixed:
Code:
if(!empty($tool['icon'])&&($tool['icon']!=='apply')) { $content .= '<span class="btnIcon iconM-32-'.$tool['icon'].'"></span>'; }
Last edit: 9 years 4 days ago by ChristopheMG.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.228 seconds