Most of the settings under admin/store/settings/catalog don't do anything. The only one that seems to work is making the title in the catalog block into a link. A problem that I think is related is that there are 'Add to cart' buttons in the list of products but the only modules that are enabled are Store, Product and Catalog. I did a fresh install of Drupal rc4 and the latest Ubercart dev.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Island Usurper’s picture

The catalog pages are now built by Views, so most of those settings are probably obsolete now. However, the add to cart button should be disabled or not shown when the Cart module isn't turned on. Slight oversight there in the Views definition.

longwave’s picture

Closed #1054966: Display products in a grid as duplicate.

So, should we keep these settings in case Views UI is disabled, and use them to alter the default view (and then disable the settings if the view is overridden), or just remove them and make users use Views UI to alter the catalog?

threewestwinds’s picture

My vote is for removing them and forcing people to use Views UI. Less duplicate code, easier maintenance, better performance.

The configuration pages also need an explanation that the catalog is handled by Views - it isn't obvious from admin/store/settings/catalog/edit/grid at all. Preferably with a link.

longwave’s picture

Assigned: Unassigned » Island Usurper

The problem with that is Views UI can be downright confusing if you've never used it before - I've had to talk a number of people through an explanation of the various options and buttons - and personally I would like to keep Ubercart fairly easy to use for newcomers, where they could alter their catalog with some basic settings and go for full blown Views UI if they want even more flexibility. There is also the upgrade path from D6 to consider, where ideally we should keep the previous catalog settings as closely as possible.

Your second point isn't really valid if we are to remove those config pages, but the new use of Views for the catalog should be documented somewhere.

Assigning to Island Usurper to make the final call on this.

threewestwinds’s picture

There does still need to be some way to indicate where the configuration can be done - I've seen other modules use mostly empty pages saying "Configuration is handled at xyz," which is what I had in mind.

Jednorozec’s picture

Views is indeed confusing at first because there are so many options. But having a bunch of options that don't do anything is even more confusing.

longwave’s picture

Status: Active » Needs review
FileSize
14.91 KB

Patch attached that removes most of the settings and adds links to Views instead.

TR’s picture

The patch works, and I think we should do something like this, but I think an all-or-nothing approach of removing all the settings and dumping the user into Views UI is a mistake. Specifically, I'm thinking of the use-case where the user wants a grid view, which I think will be used more than the default table view. Without the patch, you can just check a box. With the patch, many users are just going to see that Views UI page and give up. And that's a fairly simple change in the UI - what if they want something more complicated?

I'd like to see an intermediate step - I think there should be more than one pre-defined catalog view. One for table, one for grid, and a few variations of each. I think the Ubercart catalog settings page should allow the user to switch between pre-defined catalog views. This will IMO greatly reduce the need to go into the Views UI because it will provide the most commonly-needed catalog views in a select box. Note this does not prevent anyone from going in to Views UI and changing the views or from defining new catalog views entirely through the UI.

Another step would be a hook_help() for the Ubercart catalog settings page that would explain that the catalog can be completely customized via the Views UI, with a link to a tutorial page on d.o. or something similar and maybe a few simple example like changing the number of columns in the grid catalog. That would provide context before the drastic context switch that comes when you click "Edit catalog display" on the patched page.

The outstanding question would be how does Ubercart know which Views are catalog views. Ubercart needs to know this so it can provide a select box defaulting to the currently active catalog view.

longwave’s picture

I think that is a good idea. I did start building a separate grid view while keeping some of the options from UC2.x but ran out of time so deleted it for this patch.

Two options I can see: either we offer a list of displays only from the "uc_catalog" view, or add a new Views display plugin called "Catalog", which would be similar to Page without the menu and path options (as we already provide this for the catalog), then find and offer all displays that use the Catalog plugin.

Stealth’s picture

This patch didnt work.
File to patch: uc_catalog.admin.inc
patching file uc_catalog.admin.inc
Hunk #1 FAILED at 223.
Hunk #2 succeeded at 254 with fuzz 2 (offset -18 lines).
1 out of 2 hunks FAILED -- saving rejects to file uc_catalog.admin.inc.rej
(Stripping trailing CRs from patch.)
can't find file to patch at input line 216
Perhaps you used the wrong -p or --strip option?
The text leading up to this was: --------------------------
|diff --git a/uc_catalog/uc_catalog.module b/uc_catalog/uc_catalog.module
|index c2db288..e153448 100644
|--- a/uc_catalog/uc_catalog.module
|+++ b/uc_catalog/uc_catalog.module

TR’s picture

@Stealth: Well, *did* you use the wrong -p option? Patch applies cleanly against latest 7.x-3.x-dev using patch -p1, which is the Drupal standard.

Stealth’s picture

I installed the latest 7.x-3.x-dev using patch -p1 using cywgn. I didnt get any patching errors, but when I uploaded the new files and downloaded my website and clicked on catalog settings a white blank page appears, no good.

longwave’s picture

Did you run update.php and/or clear your caches after patching?

Stealth’s picture

FileSize
104.66 KB
104.5 KB

Thank you, with everbodys guidance I was able to update the the files with the patches and everthing seems to be working great. The purpose of patching the files was so my drupal 7 catalog products (example 4) would display lke my drupal 6 catalog products(example2). I did adjust all the table setting to grid, but that didnt seem to change anything.. If somebody could please advise, it will be much appreciated.. click on attachments

* note exmple4 attachment is on reply # 15

Stealth’s picture

FileSize
81.83 KB

example4 attachment for reply #13

Stealth’s picture

I played with it some more and everthing seems to be working. thank you for all the help!!!

longwave’s picture

Status: Needs review » Fixed

Committed this for now, let's discuss adding further default catalog views in another issue if it is deemed necessary.

juves’s picture

Catalog Block doesn't work too

Status: Fixed » Closed (fixed)

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