Jump to content
Sign in to follow this  
blaknite

SOLVED: 1.6.1.17 - Add Dropdown Menu To Populate Wholesale Price

Recommended Posts

I am adding a card collection to my store. There are many different sets. Each set has its own price.

Considering I am adding thousands of cards that are mixed and not organized by their sets, rather than constantly referring to my excel sheet for the wholesale price, I would like to add a dropdown menu beside the wholesale price textbox to allow me to select the set name and put the price into the wholesale price textbox for me. This would save me a ton of time.

Where can I add this to the prices.tpl file?

Thank you

 

SOLUTION:

 

<select id="dropdown">
    <option value="">Card Set Price List</option>
    <option value="0.01">Card 1</option>
    <option value="0.02">Card 2</option>
    <option value="0.03">Card 3</option>
    <option value="0.04">Card 4</option>
</select>
<script type="text/javascript">
    var mytextbox = document.getElementById('wholesale_price');
    var mydropdown = document.getElementById('dropdown');

    mydropdown.onchange = function(){
          mytextbox.value = this.value; 
          //to appened
         mytextbox.innerHTML = this.value;
    }
</script>

Edited by blaknite
SOLVED (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More