1

I've worked with CT previously but have never come across a scenario like this:

Each product has a set of price modifiers in place - Base, Color + Finish, all good, working as expected.

The issue comes when each item MAY have optional items, lets say "a Gold Toggle" or "an Extended Pole". These additional items should be checkboxes so the user can choose if they want it added along with the primary product and options - the qty is always 1.

These items are added at entry creation time. Using Matrix for the ability to add 0 - 100 different 1-of options rather then setting up 100 fields in the CP.

As you can imagine this isn't working out well as the Matrix is treated like a singular item with multiple options. I have the fields displaying as checkboxes but only the last item is added to the cart as it's not an array.

{matrix_wrapper}
<div class="controls">
    <label><input type="checkbox" name="item_options[matrix_name]" value="{option_value}" /> {option_label} / ${price}</label>
</div>
{/matrix_wrapper}

// ^This works well on the front end BUT only records one item if multiple selected
// Same Thing with array

{matrix_wrapper}
<div class="controls">
    <label><input type="checkbox" name="item_options[matrix_name][]" value="{option_value}" /> {option_label} / ${price}</label>
</div>
{/matrix_wrapper}

//^ Records the items checked but no price

{matrix_wrapper}
<div class="controls">
    <label><input type="checkbox" name="item_options[{row_id}][matrix_name]" value="{option_value}" /> {option_label} / ${price}</label>
</div>
{/matrix_wrapper}

//^ Add Matrix {row_id} to item_options name, it records the items but again, no price

All I want is a series of fixed options with the added ability to include none or several yes/no checkbox options and have it added to the price and cart_items_info.

UPDATE01 Front End View Field Setup

  • Any chance you can post screenshots of your fields and the mockup of the actual page showing what it "should" look like. I can't get my head around this. – Anna_MediaGirl Sep 3 '13 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.