Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am not sure if the is the correct place to post this, however, I am trying to get a flat rate shipping rate to be calculated differently based on the product.
My thinking was to create a custom field called "flat rate price" where I enter in the products shipping cost for example "250" would be the flat rate shipping.
I cannot figure out how in the world to get that 250 data into rules for the flat rate shipping calculation.
Comments
Comment #1
Simon Georges CreditAttribution: Simon Georges commentedComment #2
rszrama CreditAttribution: rszrama commentedThat's one possibility, but what do you do if there are multiple products in the order? And what if they have competing rates? If you create a flat rate that has a base rate of $0, you could use a system similar to what I describe in #1598096-5: How to define a flat rate service that gets incremented per product (i.e. $10 + $4 per product) to loop over the line items on the order and then tweak the conditions a bit to get at the product information from the line item.