Sorry to keep posting. But this is the snippet of code I have for the menu in my template “single_body.php” file.
// affiliate prod?
elseif(is_it_affiliate()) { ?>
<span class="affili_prod"><?php _e('Purchase Options','wpShop');?></span>
<form name="jump">
<p align="center">
<select name="menu">
<option selected>Choose Style:</option>
<option value="http://www.printfection.com/activestatedesigns/Basic-Colorado-Flag--T-Shirt/_p_6051496">Standard</option>
<option value="http://www.printfection.com/activestatedesigns/Basic-Colorado-Flag--American-Apparel-T-Shirt/_p_6051494">American Apparel</option>
<option value="http://www.printfection.com/activestatedesigns/Basic-Colorado-Flag--Long-Sleeve-T-Shirt/_p_6051495">Standard Long-Sleeve</option>
<option value="http://www.printfection.com/activestatedesigns/Basic-Colorado-Flag--Womens-T-Shirt/_p_6051497">Women's T-Shirt</option>
<option value="http://www.printfection.com/activestatedesigns/Basic-Colorado-Flag--Kids-T-Shirt/_p_6051499">Kid's T-Shirt</option>
<option value="http://www.printfection.com/activestatedesigns/Basic-Colorado-Flag--Kids-Long-Sleeve-T-Shirt/_p_6051498">Kid's Long-Sleeve</option>
</select>
<input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
</p>
</form>
Now if I upload that, two things happen. It works, however only for this product: Basic Colorado Flag T-Shirt | ActiveState Designs But it also shows on any other product, because it is site wide, where I need those links to be called in via a custom field.
If you look at this code, this is the code for the current Buy Now button:
<?php } ?>
<input type="hidden" name="add" value="1" />
<div class="shopform_btn buy_now">
<a href="<?php get_custom_field('buy_now', TRUE); ?>" <?php if($OPTION['wps_affili_newTab']) { ?> title="<?php _e('Opens is new tab','wpShop'); ?>" target="_blank"<?php } ?>><?php _e('Buy Now','wpShop'); ?></a>
</div>
I do see where it calles in “get_custom_field(‘buy_now’, TRUE);” How do I add that command into my dropdown list?
Then how do I edit this code to call in my URLs from the dropdown into the Buy Now code?
<input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
Sorry for the mass of confusion and coding, but if I can get this working it’ll make my life sooooo much easier when adding hundreds of products and also make it a nicer experience for my visitors. (if you search ‘Denver’ in the search bar on my site you’ll get 6 of the same style shirt in 6 different posts. That’s what I’m trying to avoid, lots of visitors are getting confused).
Thanks so much for all your patience, any help would be tremendously appreciated!
Lorne