• Resolved mobilewebexpert

    (@mobilewebexpert)


    This looks like a very handy plugin, but I am having problems creating the URL for my attribute name which contains a space.

    My attribute name is “Battery Unit” and the attribute values are “Single (up to 6 hours)” and “Dual (up to 12 hours)”

    I have tried these URLs…
    /my-product/?Battery+Unit=Single+(up+to+6+hours)
    /my-product/?Battery+Unit=Dual+(up+to+12+hours)
    …but they both take me to the default product page.

    Can you advise?

    Thanks,
    James

    https://www.ads-software.com/plugins/woocommerce-direct-variation-link/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mobilewebexpert

    (@mobilewebexpert)

    Contrary to the documentation for this plugin, you can work out the required name and value strings for the URL by inspecting the select and option HTML elements on your product page.

    In my example, the correct URLs I used are:
    /my-product/?attribute_battery-unit=6hr-single-battery-unit
    /my-product/?attribute_battery-unit=12hr-dual-battery-unit

    NB – My attribute values had changed since I asked my question.

    Also note the parameter names my contain both underscores and hyphens.

    Thanks mobilewebexpert for pointing out the correct way to find the name and value strings. That saved me a bit of a headache. Also remember to address the attribute by its name not its ID. This was a mistake I made at first as well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Space in attribute name?’ is closed to new replies.