I have set up CT to use a Matrix for pricing on products. Everything is adding to cart and checkout is OK. I have allow_user_price on as it is a multi-lingual site and I need to show different prices.
No matter what I tweak, I can't get the inventory to reduce once a sale as gone through.
In my Matrix field I have the following:
- option_value
- inventory
- uk_price
- eu_price
- us_price
I have also mapped inventory in to the name of he matrix field in products (pricing).
The multi_add_to_cart is wrapped round a bunch of products. When a customer clicks on more details, Jquery fetches the options - An EE template that loops through options.
Here is a highlight of the options:
{exp:cartthrob:item_options entry_id="{segment_6}" field="pricing"}
{options}
<input type="hidden" name="entry_id[{segment_6}{count}]" value="{segment_6}"/>
<input type="hidden" name="item_options[{segment_6}{count}][option_value]" value="{option_value}"/>
<input type="hidden" name="item_options[{segment_6}{count}][size]" value="{size}"/>
<input type="hidden" name="item_options[{segment_6}{count}][pack]" value="{pack}"/>
<input type="text" id="cart-qty" name="quantity[{segment_6}{count}]" value="">
<button type="submit" class="add_to_cart_submit btn btn-danger btn-small" >{phrase:add_to_cart}</button>
{/options}
{/exp:cartthrob:item_options}
I have omitted the price field and other styling for clarity.
Can anyone see if I am missing anything obvious?