Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to set up some sort of pizza shop in WP e-Commerce which needs about 20 checkboxes for pizza topping variations. I got the checkboxes running, but only the last selected variation ends up in the chart.

// Inside wpsc-single-product.php
<input type="checkbox" 
    name="variation[<?php echo wpsc_vargrp_id(); ?>]" 
    id="<?php echo wpsc_vargrp_form_id(); ?>" 
    value="<?php echo wpsc_the_variation_id(); ?>" 
/> <?php echo wpsc_the_variation_name(); ?>

I reckon I know what's going wrong, but have no clue how to fix it. It's surely a little thing - but the support forums at getshopped.org seem to have vanished. I just need a little push to get the motor running.

share|improve this question
1  
I guess you need to upgrade to the premium support option to get support. – kaiser Mar 2 at 21:44

1 Answer

From what I understand, you are assigning one (maybe two) variations to the product, say, Meats and Veggies. Inside each variation you have your actual choices for toppings. What your expecting is that by checking the box on the page you'll be able to get a full list of each topping ordered. The issue is that variations were never designed to hold multiple values. The variation is either peperoni or sausage, it can't be both.

The solution I'd propose is that you create a separate variation for each topping with options like none, left side, right side, or whole pizza. I think this will give you the effect your looking for without a ton of extra coding. (You can still display this as a grid of checkboxes rather than the drop down menu)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.