AbanteCart Community
AbanteCart Development => Extensions and Add-Ons => Topic started by: gob33 on December 24, 2013, 01:17:42 PM
-
I would like to know if it is possible to use JQuery UI tabs on an extension edit page ?
The purpose is to split extension infos on many tabs (general, settings, about, ...) on the same page.
Today "extensions_edit.tpl" is the template inside AbanteCart which displays the basic settings, the other settings are set with an "Additionnal' button on a new page (custom .tpl and controller).
Is it possible for a developper to modify/extend "extensions_edit.tpl" ?
Or does the extension edit page is fixed and always in the same table format for all AbanteCart extensions ?
-
Technically it is possible. Do you suggest this for core extension settings interface?
-
Say that it is more convenient way to have multiple tabs on the page of an extension than opening new window(s). And I do not see how I can work around "extensions_edit.tpl" as it is written and part of the admin. Each dev who writes an extension should have full control of how to show and present its diverse settings (tabs, accordion,...) on the edit page.
-
You can override the edit page. Check how it is done in PayPal extensions on version 1.1.7. Extension admin page is completely overridden by extension.
See set up in config and main of extension:
https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_pp_standart/config.xml
https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_pp_standart/main.php
<custom_settings_template>pages/extension/default_pp_standart_settings.tpl</custom_settings_template>
and
$templates = array(
'storefront' => array(
'responses/default_pp_standart.tpl' ),
'admin' => array(
'pages/extension/default_pp_standart_settings.tpl'
)
);
And template:
https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_pp_standart/admin/view/default/template/pages/extension/default_pp_standart_settings.tpl
If you manage tab approach, please share. We consider improving it on core level.
-
gob33. I wonder if this worked for you
-
For the moment, Im still reading your code and try to understand.
Yes, the extensions_edit.tpl can be overridden, but template datas always issuing from extensions.php (I dont know the role of controller/pages and responses).
Whereas the tabs you use, they are different from JQuery UI tabs by reloading the page each time you click one.
-
Controller pages are for admin or storefront templates and response controllers are for AJAX
-
Ah ok, i didnt find infos about that in the wiki.
Another point about customizing settings: is it normal that in UPS and USPS shipping extensions (that im using as exemples), i have only basic settings on 1.1.7 ?
Or is it due to config.xml and automatic fields creation ?
-
It is the same problem with shipping by weight: extensions_edit.tpl takes over the default_weight.tpl
-
That system of extensions with config.xml is no good.
It is supposed to simplify developping extensions by automatic creation of ressources but it lacks flexibility for designing custom pages. The page build process should be done inside each extension the way the dev wants it to be and not be done by the core which leads to uniformity and dependance.
-
I am not clear with your comment. Is this related to this post or something else? config.xml is not for building custom pages. This file to configure extension.
Please create new post related to this new topic and we will discuss. If improved process need we will build it.
-
Yeah, I deviated a little from the topic title.
Just do you agree many details settings are not displayed on 1.1.7 for some shipping modules (UPS, USPS, ...) but present in extension's code ?
Ex for USPS: https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_usps/admin/controller/pages/extension/default_usps.php
Where are these fields on page ?
Should i open a new thread ? Im asking why nobody report it ???
-
In your last post regarding settings for UPS USPS, etc, are you saying you think there are additional options in the code that do not show up on the Additional information pages? Or have you not found the additional info pages for the settings? Made a screen shot so you know where I am talking about.
Just curious as to what your issue is reporting.
Lee
-
Thx Ilegrand, your shot showed me the way.
I didnt see the additional button because i didnt put the extension "ON" and button stay hidden.
It's ok now, I mistaken because I used to see all settings on same page on other carts even when disabled. I didnt understood basic settings were done by the core and additionnals by extension controller.