Am I correct in thinking that in Commerce 8-2.x, Product types are essentially a replacement for Product Displays in 7.x?

If so - how can I add "promote to front page" options to a product in the same way that i would on a 7.x product display?

Thanks

Comments

Leo Pitt created an issue. See original summary.

mglaman’s picture

You could add your own custom boolean field which marks it as a "promoted" product.

bojanz’s picture

Status: Active » Fixed

#2 is correct. "Manage fields" for your product type, boolean field.

Leo Pitt’s picture

Okay - it'd be nice if the Product display mirrored the options available on a standard node in this respect, out of the box, for ease-of-use. Granted it is easy to set up the workaround.

bojanz’s picture

"Promoted to frontpage" is a leftover from the early Drupal days, with configurable fields there is no point in predefining such options, a site can have any number of featured/promoted flags.

Leo Pitt’s picture

But they are still present on nodes in Drupal 8 "out of the box" - I don't think it can be characterised as just a leftover.

rszrama’s picture

Status: Fixed » Closed (fixed)
bojanz’s picture

@Leo Pitt
Thanks for the feedback. We'll revisit the decision in 6-12 months based on total community feedback.

Leo Pitt’s picture

Thanks :)

13jupiters’s picture

Though this is marked fixed, I'll weigh in based on the remark that "We'll revisit the decision in 6-12 months based on total community feedback." So, twelve months on...

Promotion to front page is not necessarily a "drupal archaism" (as referred to by bojanz on drupal.stackexchange). The benefit of a promote/unpromote flag is that bulk promotions/demotions can be made from the admin->content page.

Without a Boolean that ties into bulk operations on the admin->content or (in the Commerce 2 case) admin/commerce/products page, a site administrator will have to individually open, edit, and save each product that is being promoted/demoted. Boo hoo, you say.

Well, consider a common enough scenario: a storefront featuring 3 groups of 6 products each on the front page. These are rotated frequently for reasons of commerce. In other words somebody is going to have to edit as many as 36 products, weekly. Unless there is a Boolean - let's call it 'spotlighter' - that can be changed in bulk.

Sure, I suppose we can a) create our own 'promote' Boolean, b) create admin-only view of products, c) with a checkbox on each line for our Boolean, and maybe even d) add a multiple-select-and-submit capability (it's been a while - can't remember if such a thing is possible).

I foresee many commerce 2 developers being obliged to re-invent this wheel.

/end community feedback (and thanks for the heroic work on commerce 2 in general)

bojanz’s picture

Sure, I suppose we can a) create our own 'promote' Boolean, b) create admin-only view of products, c) with a checkbox on each line for our Boolean, and maybe even d) add a multiple-select-and-submit capability (it's been a while - can't remember if such a thing is possible).

b/c/d are already handled for you, admin/commerce/products is a view and supports selecting and submitting multiple rows.
We don't have an action yet for changing arbitrary fields (the views_bulk_operations contrib might have written something we can steal) ,but it's definitely worth doing regardless of this specific use case.

13jupiters’s picture

All I hoped to see was a way forward on this, and of course I should have known it's there. I'll try to follow VBO progress and dig out the necessary action, when it arrives on the scene.

Thanks, bojanz!