admin管理员组

文章数量:1122846

I create my own way of displaying the list of available variants on the product page. I display individual variants on the main page of the store so that when the customer goes to the product page, he already has the selected variant automatically selected.

The standard JS mechanism works fine here, but I don't know how to give the appropriate CSS class depending on the variant indicated in the URL? How to universally retrieve the variant information from the URL and give the corresponding option the class "selected"?

I mean the parameters from the address: /?attribute_color=blue

本文标签: pluginsHow to get selected variation from URL