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 found the condition on item quantity to be missing from the module. In my case, what I was looking for is a condition such as "Quantity of all items in order is above 24" meaning that all order items were counted without any distinction on what they were. I am currently working on this feature which I think would be a fine addition to this module.
Issue fork commerce_shipping-3050162
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tbalkwill-vupar CreditAttribution: tbalkwill-vupar as a volunteer commentedThis patch adds a adjustable "Shipment quantity" condition to the already existing conditions in the Shipments tab of the Edit Shipping method page.
Comment #3
tamerzg CreditAttribution: tamerzg at Websolutions Agency commentedPatch works fine!
Comment #4
dwkitchen CreditAttribution: dwkitchen at Centarro for Liip commentedUpdating patch to align with #3170419: Move all Shipping Conditions to the Shipping Category
Needs tests before acceptance.
Comment #5
dwkitchen CreditAttribution: dwkitchen at Centarro for Liip commentedComment #6
jsacksick CreditAttribution: jsacksick at Centarro commentedLet's use the Calculator to sum up quantities.
Also, the patch has several coding standard issues (missing spaces between operators and $variables),
false
should beFALSE
.And as mentioned, we're missing a test. Let's write a unit test (similar to what we're doing for similar condition plugins (i.e OrderItemQuantityTest).
Comment #7
khiminrm CreditAttribution: khiminrm at Lemberg Solutions commentedComment #8
khiminrm CreditAttribution: khiminrm at Lemberg Solutions commentedI've created patch with code fixes and unit test.
Comment #9
khiminrm CreditAttribution: khiminrm at Lemberg Solutions commentedComment #10
jsacksick CreditAttribution: jsacksick at Centarro commentedI think this is good to go! @dwkitchen: could you confirm?
Comment #12
jsacksick CreditAttribution: jsacksick at Centarro commentedAdded the condition to the schema.yml and committed. Thanks everyone!