+++ b/modules/label/commerce_pos_label.module
@@ -212,12 +212,21 @@ function...

Contribution Date
Technology
Contribution Project
Contribution Details
  1. +++ b/modules/label/commerce_pos_label.module @@ -212,12 +212,21 @@ function commerce_pos_label_attributes_string($product) { + $options = _options_get_options($field, $field_info, $properties, 'commerce_product', $product);

    We just need the available options. Do we still need to get the _options_properties(). Although we are hardcoding the widget type here, but I have tested this using radio buttons, and it worked alright. Which means, the widget type and its properties are not important here, and we can skip them.

  2. +++ b/modules/label/commerce_pos_label.module @@ -212,12 +212,21 @@ function commerce_pos_label_attributes_string($product) { + $attribute_value = array_map(function ($item) use ($options) {

    I thought, the idea was to make it compatible with commerce_cart_field_attribute_eligible(). But we are adding support for multivalued fields as well. Also, if we are adding multivalued field support, can you please put a comment here, the comment should tell the purpose of using array_map().

Other that that, the code looks alright to me.

Contribution Author
Files count
0
Patches count
0