• coderb

    (@coderb)


    Does anyone know how to add an attribute (type: text) to a product ?
    I’m using woocommerce version 1.5.1
    Under the products menu, if you create an new attribute, type: text, which has a nice explanation of how a text attribute is used and this is exactly how I want to use it.
    However, when you attempt to use that attribute on the Variations tab while editing a variable product, for some reason it expects you add values, so it seems to be incorrectly treating a text attribute as a select. If you dont enter any value, the attribute is simply not added when you update the product.

    I know there is a woo extension that can be bought to extend these attributes, but I cannot see why that would be needed considering the text attribute exists and should work as described.

    Also, if I look in the tempate file ../templates/single-product/add-to-cart/variable.php
    there is not even any code defined to handle an input text field, unless I am looking in the wrong place?
    Any help would be appreciated thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m having the same exact problem. If I choose “text” as the attribute type, nothing shows up on the product page. If I put a “value” in the attribute it will show up as a select menu.

    This was my first project using Woocommerce. To be honest, it’s been an absolute nightmare. Their documentation is garbage. They obviously only truly support their paid for themes, which I understand. It’s just unfortunate in an open source community that the support is this poor. I don’t buy themes, because it’s my job to custom build/design them myself.

    I, for one, will probably never use Woocommerce again.

    Thread Starter coderb

    (@coderb)

    been ages since I looked at it, but from memory, that attribute option refers ONLY to the way its presented in the admin section (so whether or not it allows items as a piped ‘text’ list when you set that product up). Has nothing to do with displaying it as a text input to the front end user, where its always a <select>.
    I agree though, the explanation/docs are(were) crap and so was the exclusion of that simple option.
    And its soooo easy to add a better (in place) description of that field, but my guess is, since they have not improved it after all this time, either they are blind to it or maybe they want us to be confused after spending time installing / configuring it etc.. so that we just end up buying the extension, who knows…
    From memory too, someone had created a simple fix to the template file to convert that <select> to a text input, depending on the option, but you’ll have to google it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce – Product Attribute : text’ is closed to new replies.