1

I'm trying to create a quantity field next to each one of my pricing modifier items, but none of them are coming up in the debug info. What in the world might I be doing wrong here?

Any help would be REALLY appreciated.

THANKS!

{exp:cartthrob:add_to_cart_form return="tours/cart"
                            entry_id="{entry_id}" 
                            return="tours/cart" 
                    }
                    {exp:cartthrob:item_options entry_id="{entry_id}"}
                        {tour_options}
                            <input type="input" name="quantity" size="3" value=""> {option_name} {price}<br />
                        {/tour_options}

                            <input type="hidden" name="item_options[tour_options]" value="{option_value}">
                     {/exp:cartthrob:item_options}

                        <input type="submit" name="submit" value="Add Tour to Cart">


                     {/exp:cartthrob:add_to_cart_form} 
  • Are you seeing anything? For example is the submit button showing? Also I'm not sure if there is an input attribute called "input", maybe this should be "text" (although most browsers will default to "text" if they don't understand the attribute). – Anthony Mellor Mar 12 '13 at 20:17
  • Oh geez. What a mistake! OK I've changed the type to "text" and now its adding an item to the cart, charging $5 (where that number comes from I don't know) and not showing the item selected in the cart. In the debug its showing the item now (yay) but not the options. Does this code look right? – Lisa Ellington Mar 13 '13 at 17:19
1

Try changing {tour_options} to simply {options} -- it's should loop through using CartThrob's options loop, not your custom field name's loop.

As for the $5, that's possibly due to a global shipping setting. Check your CT shipping settings and see if $5 is being added there.

Otherwise, it might also be a global tax thing possibly as well.

Does that help?

| improve this answer | |

Your Answer

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

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