Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #2
mglamanYou could add your own custom boolean field which marks it as a "promoted" product.
Comment #3
bojanz CreditAttribution: bojanz commented#2 is correct. "Manage fields" for your product type, boolean field.
Comment #4
Leo Pitt CreditAttribution: Leo Pitt commentedOkay - 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.
Comment #5
bojanz CreditAttribution: bojanz commented"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.
Comment #6
Leo Pitt CreditAttribution: Leo Pitt commentedBut 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.
Comment #7
rszrama CreditAttribution: rszrama at Centarro commentedComment #8
bojanz CreditAttribution: bojanz commented@Leo Pitt
Thanks for the feedback. We'll revisit the decision in 6-12 months based on total community feedback.
Comment #9
Leo Pitt CreditAttribution: Leo Pitt commentedThanks :)
Comment #10
13jupiters CreditAttribution: 13jupiters commentedThough 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)
Comment #11
bojanz CreditAttribution: bojanz commentedb/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.
Comment #12
13jupiters CreditAttribution: 13jupiters commentedAll 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!