Author Topic: Customizing an extension page: create tabs  (Read 10613 times)

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Customizing an extension page: create tabs
« 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 ?
« Last Edit: January 10, 2014, 12:20:03 PM by gob33 »

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4332
  • Karma: +294/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Creating tabs on an extension page
« Reply #1 on: December 24, 2013, 07:55:24 PM »
Technically it is possible. Do you suggest this for core extension settings interface?
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Creating tabs on an extension page
« Reply #2 on: December 24, 2013, 08:11:40 PM »
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.
« Last Edit: December 24, 2013, 08:15:19 PM by gob33 »

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4332
  • Karma: +294/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Creating tabs on an extension page
« Reply #3 on: December 26, 2013, 07:42:27 AM »
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

Code: [Select]
        <custom_settings_template>pages/extension/default_pp_standart_settings.tpl</custom_settings_template>
and
Code: [Select]
$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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Creating tabs on an extension page
« Reply #4 on: December 27, 2013, 08:13:01 AM »
gob33. I wonder if this worked for you
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Creating tabs on an extension page
« Reply #5 on: January 04, 2014, 06:26:06 PM »
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.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4332
  • Karma: +294/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Creating tabs on an extension page
« Reply #6 on: January 06, 2014, 08:24:25 AM »
Controller pages are for admin or storefront templates and response controllers are for AJAX
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Creating tabs on an extension page
« Reply #7 on: January 06, 2014, 01:02:15 PM »
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 ?

« Last Edit: January 06, 2014, 01:03:54 PM by gob33 »

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Creating tabs on an extension page
« Reply #8 on: January 07, 2014, 09:17:26 AM »
It is the same problem with shipping by weight: extensions_edit.tpl takes over the default_weight.tpl
« Last Edit: January 08, 2014, 05:14:34 AM by gob33 »

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Creating tabs on an extension page
« Reply #9 on: January 08, 2014, 05:14:56 AM »
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.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4332
  • Karma: +294/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Creating tabs on an extension page
« Reply #10 on: January 10, 2014, 08:15:30 AM »
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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Creating tabs on an extension page
« Reply #11 on: January 10, 2014, 12:00:12 PM »
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 ???
« Last Edit: January 10, 2014, 12:20:37 PM by gob33 »

Online llegrand

  • Hero Member
  • *****
  • Posts: 1703
  • Karma: +493/-4
    • View Profile
Re: Customizing an extension page: create tabs
« Reply #12 on: January 10, 2014, 02:58:03 PM »
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



Offline gob33

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Customizing an extension page: create tabs
« Reply #13 on: January 10, 2014, 05:07:10 PM »
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.
« Last Edit: January 10, 2014, 05:14:17 PM by gob33 »

 

Powered by SMFPacks Social Login Mod