Jump to content

AshAb

Member
  • Posts

    1
  • Joined

  • Last visited

AshAb's Achievements

Level 1

Level 1 (1/20)

2

Reputation

  1. <script> function setValue() { document.querySelectorAll('div.variant-option select').forEach(function(dropdown){ dropdown.selectedIndex = '1'; Y.one(dropdown).simulate('change'); }); } window.onload = setValue ; </script> The above code can put in `Page Header Code Injection` and it will select the first variant option and displays its price as well I modified @DomBrady answer to work with any product variant without having to specify variant details in code
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.