Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I am creating a "sampler" of my different flavors of popcorn. I want the user to choose three different products then Add to Cart. Each flavor has a different price and a different weight (for use with Commerce UPS).
I added three product reference fields. The flavors all show up perfectly. However, when I choose three flavors and Add to Cart, the price and weight don't reflect those three flavors.
Is it not possible to add those three products via product reference fields?
Comments
Comment #1
griz CreditAttribution: griz commentedThis is done via the Rules module. On event 'calculate a price' you need to add an amount to the unit price.
Add the condition 'Entity has field' first to make the field accessible, then use data selection to get the price of your referenced product.
Comment #2
nvahalik CreditAttribution: nvahalik at Centarro commentedThis functionality would likely be better served by Commerce Bundle. This module handles customization of a single line item item. You're wanting to create multiple line items.