Hot to add Save & Close to frontend category edit

  • Posts: 634
  • Thank you received: 16
  • Hikashop Business
8 years 9 months ago #205416

-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.1

Is it possible to add Save&Close and Save&New buttons to the toolbar of category editing in frontend?

Has this to be a feature request or a simple code modification?


Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
8 years 9 months ago #205419

Hi,

To have an "apply" and "save", you have to edit the view "components/com_hikamarket/views/categorymarket/view.html.php" and modify the toolbar in the "form" function with that

$this->toolbar = array(
	'cancel' => array(
		'url' => hikamarket::completeLink('category&task=listing&cid=' . $category->category_parent_id),
		'icon' => 'back',
		'name' => JText::_('HIKA_BACK')
	),
	'apply' => array(
		'url' => '#apply',
		'linkattribs' => 'onclick="return window.hikamarket.submitform(\'apply\',\'hikamarket_categories_form\');"',
		'icon' => 'apply',
		'name' => JText::_('HIKA_APPLY'), 'pos' => 'right'
	),
	'save' => array(
		'url' => '#save',
		'linkattribs' => 'onclick="return window.hikamarket.submitform(\'save\',\'hikamarket_categories_form\');"',
		'icon' => 'save',
		'name' => JText::_('HIKA_SAVE'), 'pos' => 'right'
	)
);
But there is no management of "save & new" in the category controller so adding that button will require a new feature, yes.
About the "save" (save & close), you will see that when it close, you will be redirected to the category you have created, so you will see his content.
That effect was mostly why I didn't put "apply/save" before, because I'm not fan of it.

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.

  • Posts: 634
  • Thank you received: 16
  • Hikashop Business
8 years 9 months ago #205454

Ok,

so if I understand right beyond putting the buttons the way you suggest there would be not much effect as:

save & new would not work because not impleneted, right?

save & close would save, then close, and then bring me back to the open category, right?

I understand and accept that you (and everybody) might not be 'fan' of certain buttons/procedures, I'm sure you see the implications of every procedure far beyond the average user. But, isn't it a little strange to use the Back button to get out of the Category edition screen?

Please don't take it as bad criticism, just want to understand in the hope to make a better suggestion or my own implementation if i see something feasible to my skills.

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
8 years 9 months ago #205460

Hi,

1. That's right, the "save & new" button has to be added in the controller.
The task "save2new" already exists in HikaShop but the controller should be update to use it (and perform some tests).
More just than adding the task in the controller, the "store" function need some little modifications to handle the "save and new".
I'll update the HikaMarket controller for the next release ; I have to do various tests to be sure that it will work correctly, specially for the category part.

2. Yes, it will save and close.
But when the "back" button redirect you in the parent category of the category you just edit ; the "save and close" will redirect you to the category you just saved.
I don't say that it isn't strange to use the back button ; but the result of the "save and close" was confusing.
But if you don't think that it is confusing, we can see to propose it by default.

I don't take it as bad criticism ; it's a constructive criticism !
When I built the HikaMarket interfaces, I made it test by some people and analyze their reactions. So I know that the vision I got for the interface is just a small panel of "users" ; Having other feedback on these interfaces is still useful to improve them and update our vision.

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.

Moderators: Obsidev
Time to create page: 0.050 seconds
Powered by Kunena Forum