WP eCommerce
Change WP-Ecommerce variant dropdown selector to radio button? (2 posts)

  1. scrista
    Posted 2 years ago #

    I really like some of the features in WP-Ecommerce but I'm wondering if I can use buttons for variant selection instead of the dropdown selector? It seems like it would be possible but I haven't found any answers on the internet. Something like the Woocoomerce Variation Swatches and Photos plugin for WP-Ecommerce would be awesome.


  2. Rajan V
    Posted 1 year ago #

    Just Add this code on your theme JS file

    	$('.wpsc_variation_forms').append('<div class="new-variation-div"></div>');
    	var i = 0;
    	$( ".wpsc_variation_forms" ).each(function() {
    		var output = '';
    		var variation = '';
    			var name = $(this).attr('name');
    					var val = $(this).text();
    					var value = $(this).attr('value');
    					if( value != '0' ){
    						variation = variation + '<label class="new-variation-radio radio-variation" for="'+name+i+'"><input class="wpsc_select_variation" type="radio" id="'+name+i+'" name="'+name+'" value="'+value+'" rel=' + val +' />'+val+'</label>';
    				variation = '<div class="variation-variation">'+variation+'</div>';
    			output = color + variation;
    		$(this).find('.new-variation-div').html( output );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic