• richardoe

    (@richardoe)


    I am using variable products and what I miss is the option to include attributes. In my case a product has Size, Color and Direction in most cases as option. How could i include these?

    Kind regards,
    Richard

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter richardoe

    (@richardoe)

    I added this code directly after the line “$linea = $linea.$quantity…….. etc.”

    This works for now, but will offcourse be overwritten with an update.

    I commented out the slug, becuase i don’t need the name of the attribute, i just want the attribute.

    
      foreach ($item->get_meta_data() as $metaData) {
        $attribute = $metaData->get_data();
    
        // attribute slug
        //$slug = $attribute['key'];
        //$linea = $linea .$slug.": ";
    
        // attribute value
        $value = $attribute['value'];
        $linea = $linea .$value." - ";
      }
    
Viewing 1 replies (of 1 total)
  • The topic ‘How to include Attributes’ is closed to new replies.