- Posts: 99
- Thank you received: 0
Custom vendor page, Remove back button and "Add User", change Save...
- ChristopheMG
-
Topic Author
- Offline
Less
More
9 years 3 months ago #272248
by ChristopheMG
-- HikaShop version -- : 3.1.1
-- HikaMarket version -- : 1.7.3
-- Joomla version -- : 3.7.2
-- PHP version -- : 7.1.4
-- Browser(s) name and version -- : CHROME 59.0.3071.104
Hello,
On a "HikaMarket » Vendor edition" page showing my user (vendor) profile, I would like to remove the "back" button.
Also to change the "Save" button by a personalized button (create a new button with onclick="return window.hikamarket.submitform('save','hikamarket_vendor_form');")
It's probably in Display > views but I can't find the file.
Regards,
-- HikaMarket version -- : 1.7.3
-- Joomla version -- : 3.7.2
-- PHP version -- : 7.1.4
-- Browser(s) name and version -- : CHROME 59.0.3071.104
Hello,
On a "HikaMarket » Vendor edition" page showing my user (vendor) profile, I would like to remove the "back" button.
Also to change the "Save" button by a personalized button (create a new button with onclick="return window.hikamarket.submitform('save','hikamarket_vendor_form');")
It's probably in Display > views but I can't find the file.
Regards,
Please Log in or Create an account to join the conversation.
9 years 3 months ago #272250
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom vendor page, Remove back button and "Add User", change Save...
Hello,
The toolbar is displayed directly via the HikaMarket core.
The content is set in the "view.html.php" and then HikaMarket call the view "toolbar / default" for the display.
You can see to perform an override of that view and dynamically change the content depending the current "ctrl" and "task".
It is also possible to use a plugin and a trigger ; but in your case the view override would be easier.
www.hikashop.com/support/documentation/1...-display.html#layout
About the icons ; that is something you can directly change via CSS.
They already are displayed via the hikamarket "frontend_default" CSS file ; you can see to have your own rules in your template CSS or create an override for the HikaMarket file.
www.hikashop.com/support/documentation/1...the-display.html#css
Regards,
The toolbar is displayed directly via the HikaMarket core.
The content is set in the "view.html.php" and then HikaMarket call the view "toolbar / default" for the display.
You can see to perform an override of that view and dynamically change the content depending the current "ctrl" and "task".
It is also possible to use a plugin and a trigger ; but in your case the view override would be easier.
www.hikashop.com/support/documentation/1...-display.html#layout
About the icons ; that is something you can directly change via CSS.
They already are displayed via the hikamarket "frontend_default" CSS file ; you can see to have your own rules in your template CSS or create an override for the HikaMarket file.
www.hikashop.com/support/documentation/1...the-display.html#css
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- ChristopheMG
-
Topic Author
- Offline
Less
More
- Posts: 99
- Thank you received: 0
9 years 3 months ago - 9 years 3 months ago #272361
by ChristopheMG
Replied by ChristopheMG on topic Custom vendor page, Remove back button and "Add User", change Save...
Thank you Jerome,
I found the file HikaMarket - toolbar / default.php
I can make both buttons or texts ("back", "save") disappeared but I have hard time to just remove the back button and text "back"
Can you help please?
I found the file HikaMarket - toolbar / default.php
Code:
if(!empty($tool['icon'])) { $content .= '<span class="btnIcon iconM-32-'.$tool['icon'].'"></span>'; } /* here the buttons */
if(!empty($tool['name'])) { $content .= '<span class="btnName">' . $tool['name'] . '</span>'; } /* here the text */
I can make both buttons or texts ("back", "save") disappeared but I have hard time to just remove the back button and text "back"
Can you help please?
Last edit: 9 years 3 months ago by Jerome. Reason: removing the content of the full view ; please be sure that we already have that content
Please Log in or Create an account to join the conversation.
9 years 3 months ago #272364
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom vendor page, Remove back button and "Add User", change Save...
Hello,
In the toolbar default view, you have a loop on each button.
And as you saw, the variable $tool is an array with different elements, like the icon, the name and the url.
The variable $key contains logically the namekey of the button, but unfortunately, in HikaMarket 1.7.3, some views do not have namekeys set properly.
So you have to edit the file "components/com_hikamarket/vendormarket/view.html.php" and replace
By
So you will be able to use the variable $key to know what is the button exactly.
And please do not forget to use $this->getLayout() and $this->getName() to only apply your modification on the vendormarket form.
Regards,
In the toolbar default view, you have a loop on each button.
Code:
foreach($data as $key => $tool) {
The variable $key contains logically the namekey of the button, but unfortunately, in HikaMarket 1.7.3, some views do not have namekeys set properly.
So you have to edit the file "components/com_hikamarket/vendormarket/view.html.php" and replace
Code:
$this->toolbar = array(
array('icon' => 'back', 'name' => JText::_('HIKA_BACK'), 'url' => hikamarket::completeLink('vendor')),
array(
'url' => '#save',
'linkattribs' => 'onclick="return window.hikamarket.submitform(\'save\',\'hikamarket_vendor_form\');"',
'icon' => 'save',
'name' => JText::_('HIKA_SAVE'), 'pos' => 'right'
)
);
Code:
$this->toolbar = array(
'back' => array('icon' => 'back', 'name' => JText::_('HIKA_BACK'), 'url' => hikamarket::completeLink('vendor')),
'save' => array(
'url' => '#save',
'linkattribs' => 'onclick="return window.hikamarket.submitform(\'save\',\'hikamarket_vendor_form\');"',
'icon' => 'save',
'name' => JText::_('HIKA_SAVE'), 'pos' => 'right'
)
);
And please do not forget to use $this->getLayout() and $this->getName() to only apply your modification on the vendormarket form.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.168 seconds