The product manager overview is rather messy with three languages and even no indication which languages you are viewing.
Added in this patch as a start:
- A filter select box with the languages, refreshing the page with a simple get parameter.
- When the filter is set to all languages, the title is extended with the language string.

Comments

nylin’s picture

Hi Stalski,

Thank you for your contribution to the project, I think this would be a great improvement when dealing with a multi-lingual store.

I applied your patch, but it doesn't seem to work as it should for me... I have only one language in my installation, and that' is English. But when I select "en" in the select list it returns no results for my, however the "All" option works as before.

I would love to get into this some more but I'm very busy with work ATM though I'll do my best to go though your changes ASAP!

If you'd like, you can test your patch on an installation that have only one language, and see if you get the same result as me! And when I think about it, maybe the select list shouldn't appear at all when the installation doesn't have more than one language.

Thank you again!!!

/m

Stalski’s picture

Ok, fine.
It was not meant to work in all cases, just indicating that it should be available if you want a easy-to-work with listing. I'll do my best to come up with something generic.
the code above was more of a proposition to check if my hours spent wouldn't be for nothing ;)

regards.

nylin’s picture

Hey Stalski!

I appreciate your work so feel free to continue your work and I will put in the module =).

I'm currently looking for a co-maintainer for the module since I'm kinda short of time ATM. So if you'd like I could promote you, just let me know!

/m

Stalski’s picture

Status: Needs review » Needs work

You may :)
My boss at Krimson has a rather easier to work with thing in mind. I'll sum up the things I can think of right now.

  • Add filters like on the node content list, including the session behavior to remember filters. Language and type would be the first implementations.
  • Add "add product" functionality in general and maybe attached to each product display to take an argument, setting the reference immediately.
  • Build in functionality to override the current product list page and making sure that all crud actions default to the product manager page.
  • Smart pager
nylin’s picture

Title: Get filters like language into the product view to avoid a messy overview. » There you go

There you go, I've added you as a co-maintainer! This should be fun since I've never developed in a "team" before :). I think this module can grow pretty quick as the need for it's functionality is quite high.

It will bee very interesting to see what you can come up with, welcome to the team ;).

/m

Stalski’s picture

Great :)

nylin’s picture

Title: There you go » Get filters like language into the product view to avoid a messy overview.
Stalski’s picture

StatusFileSize
new18.27 KB

Can people try out this patch? I think it is a big improvement already.
If ok, I'll do some small modifications and push it to git.

Stalski’s picture

Status: Needs work » Needs review

Also added:
- Add product link on top of the manager.
- Add @type to immediately save a product in the correct Product Display. (works with GET parameter).
- Added redirect to the display manager form

The patch and newly added functionality is tested and pushed to git.

nylin’s picture

Nicely done Stalski!

I'm just a little confused by one thing, why should one want to filter by product type?
If one does, it sort of invalidates the feature of re-ordering products in a display node, doesn't it?
Shouldn't this be a filter for the Display Node Type?

My list says "Your store does not yet contain any product display nodes.", I guess there is something wrong when you don't have more than one language on your Drupal installation, I'll see if I can find it!

Also, the "Note that the product language will not be filtered, only the language of the product display node." text should not be visible if the language filter is not present, I'll look at this to!

/m

nylin’s picture

Gaah, cannot see why the nodes query for the display manager returns no results, everything seems fine when I step through the code. Will see if I can find this out next time =).

Does anyone have this issue?

/m

Stalski’s picture

No :(
cache clear or something? can't think of anything. Any special things I can set-up to reproduce it?

Stalski’s picture

Status: Needs review » Needs work

Your remarks about the language is justified. I'll fix this asap. (status needs work)

I'm just a little confused by one thing, why should one want to filter by product type?

I cannot imagine I would want to put a t-shirt with the rucksacks, no? A product display is only a wrapper of products that resemble the same "Product", or am I wrong?

So, I am currently using the filters language and product type at all time! It is now possible to do so, if your site set-up does not require such things (I can imagine you use product displays like product kits than or so? if you are storing multiple product type products in it?)

svendecabooter’s picture

Status: Needs work » Needs review

Seems to be working mostly fine for me.
I have tested with a fresh Commerce Kickstart installation.

Tested scenario's:
* 1 product entity type and 1 product display type with only English language enabled
(didn't get the error "Your store does not yet contain any product display nodes")

* 1 product entity type and 1 product display type with both English & Dutch languages enabled

Might test some more things and see if that breaks anything :)

svendecabooter’s picture

Status: Needs review » Needs work

Oops, waiting too long to submit my reply messed up the status. Setting back :)

svendecabooter’s picture

Found a bug while testing: http://drupal.org/node/1220286

Nice job on the improvements by the way Stalski!
Good to see this module mature

Stalski’s picture

Thx :)
I'll look at it asap.

Stalski’s picture

Status: Needs work » Fixed

Some checks were added on the language, I saw.
I tested this again in 2 languages and a site language und :) and no errors so far.

Thx for the feedback.

Status: Fixed » Closed (fixed)

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