Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Conditional rendering of .select options


Carolin_W

Question

Hi,

I am trying to remove certain variant options on the product page without removing them in them in the 'Pricing&Variants' section of the backend.
The reason for that is, that I am using the variants for a script I am running that helps me filter products according to variants.

i.e. 

variant 1: --> date: May 2021, language: English, location: London
variant 2: -> date: June 2021, language: English, location: London
variant 3: -> date: Jul 2021, language: English, location: London

In that particular example I would only want the user to select the date as the other variant parameters are the same.


So far I've only found a way to remove the entire variant section css class:
.ProductItem-details .variant-option {
    display: none;

}

Is there a way to render the html tag only on the condition of more than one option to select? as a potential solution?

Any help is appreciated. Thanks a lot.

 

Link to post
  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...