Cannot add license product to cart using rules

Created on 15 November 2017, almost 8 years ago
Updated 19 August 2025, 5 days ago

I need a way to bulk VBO create licenses for imported users. However..

If I use a rules component to add a license product to the cart, it does not get added to the cart.

I tested it with a normal product and a license product. The normal product gets added, the license product not. Using admin, all permissions granted in the rule.

export:

{ "rules_add_license_product_to_the_cart" : {
"LABEL" : "Add License product to the cart",
"PLUGIN" : "rule",
"OWNER" : "rules",
"REQUIRES" : [ "commerce_cart" ],
"USES VARIABLES" : { "user" : { "label" : "user", "type" : "user" } },
"DO" : [
{ "commerce_cart_product_add_by_sku" : {
"USING" : {
"user" : [ "user" ],
"sku" : "1803078120",
"quantity" : "1",
"combine" : "1"
},
"PROVIDE" : { "product_add_line_item" : { "product_add_line_item" : "Added product line item" } }
}
},
{ "commerce_cart_product_add_by_sku" : {
"USING" : {
"user" : [ "user" ],
"sku" : "1233560491",
"quantity" : "1",
"combine" : "1"
},
"PROVIDE" : { "product_add_line_item" : { "product_add_line_item1" : "Added product line item1" } }
}
}
]
}
}

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Yuri

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024