Should we remove the "overview" summary pages from the admin settings in D7, and replace them with vertical tabs implementations? I think this would look a bit nicer, fit better with D7UX in general, and involve less clicking between pages when reviewing and changing settings.

This isn't quite straightforward as some settings should be combined into a single page, and others should remain in subtabs I think, but I figured maybe we could start some discussion about this in here.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Title: Store settings user experience: vertical tabs? » Store settings user experience: vertical tabs, simpler settings pages

Related to this, should we simplify the store settings pages for D7? For example, at /admin/store/settings/payment/edit, do we need any of these settings at all?

- Enable payment tracking.

Would you ever want to disable this?

- Allow payments to be deleted by users with permission.

This should surely just be a permission setting.

- Log payments entered and deleted to order log.

Would you ever want to disable this?

- Default payment details message

This should be handled with translations or string overrides.

longwave’s picture

Another idea: Move "Store" further to the left in the toolbar, as sticking it between Configuration and Reports makes it seem far less important than it is. Between Content and Structure? Or even before Content?

longwave’s picture

We should build some default Views for the D7 dashboard as well.

longwave’s picture

Status: Active » Needs review
FileSize
8.63 KB

Attached patch makes a start on this, for the country settings page:

- Summary page has been removed
- Tabs are now "Countries" and "Address formats"
- Country import box is collapsed by default
- Address formats page uses vertical tabs to simplify editing

longwave’s picture

Similar patch for store settings. The summary page has been removed, and the settings are grouped into the following vertical tabs on a single page:

- Basic information (store name, email, etc)
- Store address
- Currency format
- Weight format
- Length format
- Date format
- Display settings

Perhaps "date format" should be removed in favour of using Drupal's built in date formats, and the billing/delivery address selector in display settings should be in the order settings instead, as it is mostly used there.

longwave’s picture

Committed #4.

TR’s picture

Can you re-roll #5? I can't get it to apply. Almost 200 lines in the reject file.

longwave’s picture

longwave’s picture

FileSize
853 bytes

This somewhat more trivial patch moves Store between Dashboard (if enabled) and Content on the admin toolbar, and makes the menu item description a bit better.

TR’s picture

Status: Needs review » Reviewed & tested by the community

#8 works great and looks very nice. #9 works too. What do you think of moving the Store status to the top of the page? Right now it's below the fold, so store errors and warnings are not apparent unless you go looking for them.

longwave’s picture

Status: Reviewed & tested by the community » Active

Committed #8 and #9. #8 could do with some extending to show things like the store name and current currency and other formats in the tab previews, but that can be done later.

Setting back to active, as I think this should be done for all settings pages, and then we can remove uc_store/includes/summaries.*.

longwave’s picture

Oh, and regarding moving store status to the top, not so sure about that; when you've got a lot of modules installed you may have many items there showing only information, pushing the links you will use day to day such as Orders and Customers below the fold. Perhaps show a warning at the top if there are errors listed in the store status?

TR’s picture

One of the proposals I floated almost two years ago (http://drupal.org/node/455888#comment-1691796) was to add a "Store status" line to the Drupal site status page. Then if anything were wrong with the store configuration you would see it on the main status page with a link to take you to the store status page for details. Then it wouldn't really matter whether store status was on top or not, and more importantly if the store status was red the Drupal site status page would automatically display a message on *every* admin page saying "One or more problems were detected with your Drupal installation. Check the status report for more information." This would bring attention to problems with the store status and hopefully prevent many of the problems people have when they neglect to configure something like the store e-mail address.

longwave’s picture

This should happen now anyway, though I haven't tested it - all the store status items are listed in the Drupal site status page using hook_requirements(), so any errors should be flagged with the "One or more problems..." message. We should perhaps review all the store status messages as well, and decide whether more should be added or some should be upgraded to warnings/errors (unset site email address is one we should definitely add).

I think it's also possible to sort the items on the Drupal status page so we could have a separate Ubercart section there instead of mixing them with the main items, will put that on the list of things to consider when working on this issue,

longwave’s picture

Four more patches that convert the cart, checkout, order and payment settings pages to use vertical tabs.

The checkout settings patch removes the message filter formats (which currently do not work) in favour of using filter_xss_admin(). The payment settings patch removes "Allow payments to be deleted by users with permission." as I do not understand why this is needed separately from the permission that already exists!

TR’s picture

Re #15:

I like this. A couple of small comments:

With the cart settings, on the cart lifetime tab, the "Duration" and "Units" are not aligned vertically anymore. Looks bad. It would be nice to have the lifetime settings show up in small text below the tab title, like with the product edit tabs - that way you could see this at a glance without having to drill down. I don't think any of the other tabs on this page contain data that is amenable to showing on the tab like this.

With the checkout settings, I think the basic settings tab could show whether anonymous checkout is enabled.

With the payment settings, I think the vertical tabs for the gateways should show things like whether the gateway is enabled or not, is in test or production mode, and whether the API keys are set or not. Likewise for the payment methods vertical tabs - they should have a summary to show whether keys are set.

Since the Credit Card method is so important (used by *all* the gateways) it would be nice to have it stand out. Actually, even though it's a method, I think it makes more sense to have Credit Card show up in the *gateways* tab at the top. I don't know how that could be achieved without wiring in some statement like "if (method==credit_card)" in order to treat it differently than the other payment methods.

longwave’s picture

Will look at adding the extra text to the tabs when I get a chance to work on this again, but those are all good ideas. Adding test mode and API key settings for each payment method will be complicated, as they each have their own way of setting this up and each one would require separate JavaScript to handle this; but perhaps if we implement it for each of the core modules in a sensible way, contrib can follow this pattern.

I think the initial idea behind gateways was that other payment methods could use multiple gateways, but it hasn't really worked out like that - I think uc_credit is the only one that handles these, and there's some hard-coded dependencies and assumptions about this anyway in the uc_credit code. But perhaps this can be cleaned up a bit more, I'll have a think and see what I can come up with.

longwave’s picture

Committed the cart settings patch, with JS to show the cart lifetimes in the tab.

longwave’s picture

Committed the checkout settings patch, with some text changes to make the settings more descriptive, and JS to show whether checkout is disabled, or anonymous checkout is enabled/disabled, and also to hide irrelevant fields based on previous options.

longwave’s picture

Committed the order settings patch.

longwave’s picture

FileSize
5.94 KB

Some more proposed text changes for the cart settings page.

I also realised that perhaps the cart and checkout settings pages should be combined; they're both handled by uc_cart, and some of the things seem to be in the wrong place - "minimum order subtotal" is on the cart settings, when it affects checkout, for example. Also, I would like to remove custom text fields like "custom continue shopping link text" - then translations become easier and single language users can install string_overrides if they want to change text, just like with any other module. Thoughts on this are welcome.

longwave’s picture

...and here's a patch that combines cart and checkout settings.

Another realisation: the "address fields" tab should probably also be moved to the country settings page, as all other address stuff is configured there.

TR’s picture

The checkout-settings-vertical-tabs.patch that was committed in #15 broke the formatting of the checkout complete page cart/checkout/complete. In particular, this change:

-  foreach ($messages as $format => $message) {
-    $message = token_replace($message, array('uc_order' => $order));
-    $message = check_markup($message, variable_get($format, filter_default_format()));
+  foreach ($messages as $message) {
+    $message = filter_xss_admin(token_replace($message, array('uc_order' => $order)));

Checkout completion messages are entered in a textarea (just like this issue comment I'm writing now) , and default to something like this:

$messages['completion_new_user'] = t("Thank you for shopping at [store:name]. A new account has been created for you here that you may use to view your current order status.\n\n<a href=\"!user_url\">Login</a> to your new account using the following information:\n\n<strong>Username:</strong> !new_username\n<strong>Password:</strong> !new_password", array('!user_url' => url('user')));

You see that the message will contain a mixture of HTML tags and new lines. It used to be run through check_markup(), which converted all those new lines into paragraphs so that the result would display as typed.

With filter_xss_admin(), no conversion of new lines is made - everything is assumed to be HTML (where newlines are ignored). The result is the checkout completion messages are all strung together on one big wrapped line, which doesn't look very nice.

longwave’s picture

We have a number of options here:

1) Go back to the old method of allowing input formats on the various message textareas we have. But then we run into #820816: #type text_format not compatible with system_settings_form($automatic_defaults = TRUE) and so we need a bunch of extra code in the validate or submit handlers to set the right variables after submitting the settings form.

2) Force these messages to be formatted with the default input format. (but this may cause problems on some sites which have restrictive default filters)

3) Add an option for "Ubercart message input format" somewhere. (but this complicates things for administrators, and isn't really a standard way of doing things)

4) Keep the current method, changing it to filter_xss_admin(nl2br(...)) - in effect, a pseudo input filter which allows some basic tags and also converts newlines.

I am leaning towards the last option to try and keep things simple both in the code and from an admin point of view. Any input is welcome.

TR’s picture

How about something along the lines of #513050: Templatize checkout complete page?

longwave’s picture

Committed #21.

longwave’s picture

Status: Needs review » Active
FileSize
18.56 KB

Committed this patch which merges the product, product kit and product features settings into a single tabbed page.

longwave’s picture

The attribute settings page had a single lonely setting, so it seemed to make sense to merge it into the product settings page. Committed the attached patch.

longwave’s picture

Committed the attached patchset which removes the payment settings from #1. Tracking and logging is now always enabled, deleting is handled with permissions, and the default checkout message didn't work anyway in 7.x, but now works and can be changed or translated using locale or string overrides.

longwave’s picture

Status: Active » Needs review
FileSize
12.58 KB

First pass at simplifying the payment methods and gateway settings is attached. Payment method order is now handled by drag and drop, and each method has its own settings subpage instead of the cluttered multiple fieldset approach that was used previously. Gateway settings are shown directly on relevant method pages.

Google Checkout settings need work, and uc_credit will need some patching as well. I wonder if we should move all the gateway support into uc_credit, as only Google Checkout uses it otherwise, and it looks like that should work equally well as a plain payment method.

longwave’s picture

More things I think we can do here:

/admin/store/settings/orders
- move "number of orders" setting into Store settings: Display settings
- remove ability to disable order logging
- move "capitalise address" setting into Store settings: Display settings ("primary customer address" is already there!)

- convert "allow customer to view popup invoices" to a permission?
- move "on site invoice template" to Store settings: Display settings?

/admin/store/settings/reports
either:
- merge into a new Store settings: Report settings tab
or:
- merge with "number of orders" setting in Store settings: Display settings
- move "reported statuses" to Store settings: Display settings?

/admin/store/settings/countries
- move tabs into Store settings?

/admin/store/settings/cart
- move "minimum order subtotal" into checkout settings? (seems more appropriate)

/admin/store/settings/checkout/panes
- merge "Customer information settings" into main checkout settings

Island Usurper’s picture

I've taken out the gateway settings for Google Checkout and left it as just a payment method. It never really needed it, nor does anything but uc_credit, so I think it's a good idea to put that code in uc_credit instead of uc_payment.

longwave’s picture

Based on #32 this patch moves the gateway settings UI to uc_credit, and simplifies the change to uc_google_checkout_menu() so other payment methods can add tabs if necessary.

longwave’s picture

Status: Needs review » Active

Committed #33.

Future improvements could include: Refactoring uc_credit's settings form to reduce code weight. More gateway related code can be moved from uc_payment to uc_credit. The various payment settings forms can also be tidied up further (PayPal is particularly confusing).

This only leaves shipping quotes to convert, then we are rid of the legacy D5 settings summary pages.

longwave’s picture

Status: Active » Needs work

Oops. Forgot about the following, which now need work:

uc_authorizenet_form_uc_payment_gateways_form_alter()
uc_cybersource_form_uc_payment_gateways_form_alter()
uc_google_checkout_form_uc_payment_methods_form_alter()

longwave’s picture

Moved uc_credit's settings form to uc_credit.admin.inc, removing 330+ lines of code from uc_credit.module.

http://drupalcode.org/project/ubercart.git/commitdiff/fc393e57

longwave’s picture

Status: Needs work » Active

uc_authorizenet_form_uc_payment_gateways_form_alter() and uc_cybersource_form_uc_payment_gateways_form_alter() have been converted.

Express checkout methods could be handled a better way, I spawned a new issue for this: #1226602: Allow express payment (PayPal/Google) to be enabled directly in payment method settings (which also deals with uc_google_checkout_form_uc_payment_methods_form_alter())

longwave’s picture

Committed the attached patch which removes the summary page from shipping quotes.

longwave’s picture

summaries.inc and related code has been removed.

longwave’s picture

Status: Active » Needs review
FileSize
6.76 KB

Attached patch merges the cart panes into the main cart settings form, and the checkout panes into the main checkout settings form.

longwave’s picture

Attached patch removes the word "settings" from each of the settings menu entries and makes the descriptions a bit more useful.

Outstanding issues for this thread as I currently see it are #31, #40 and #41.

Island Usurper’s picture

Status: Needs review » Active

Committed 41. 40 looks like it's already been done. That leaves 31, which needs a patch.

longwave’s picture

Status: Active » Fixed

Committed most of the changes in #31, except the "minimum order subtotal" as I'm not really sure the best place to put it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.