0

Seem to have something in-correct. As soon as I add a product to the side cart all stock levels disappear from the front end. So your unable to tell if any ticket stock levels of other tours are available.

I have 4 tours, each with an Adult and Child Ticket available with 10 stock each. Limit stock is ticked in the channel's field.

Here is what I have...

 {exp:store:product 
  entry_id="{entry_id}"
 }

     <ul>
        <li><strong>Tickets available:</strong> <span class="store_product_stock"><!-- automatically set --></span>
        <li><strong>Price:</strong>
            {if on_sale}
                <del>{regular_price}</del><br />
                {price}
                <span class="label label-success">Save {you_save} ({you_save_percent}%)</span>
            {if:else}
                {regular_price}
            {/if}
        </li>
     </ul>

    {modifiers}

            <label class="control-label" for="{modifier_input_name}"><strong>{modifier_name}: </strong></label>
                {if modifier_type == 'var' OR modifier_type == 'var_single_sku'}
                        {modifier_options}
                                    <label><input type="radio" name="{modifier_input_name}" value="{option_id}" /> {option_name} {if price_mod_val} ({price_mod}) {/if}</label>
                        {/modifier_options}
                {if:else}
                    <input type="text" id="{modifier_input_name}" name="{modifier_input_name}" value="" />
                {/if}
                {if modifier_instructions}<p class="help-block">{modifier_instructions}</p>{/if}

    {/modifiers}

        <label for="item_qty"><strong>Quantity: </strong></label>
        <input type="text" id="item_qty" name="item_qty" class="input-mini" value="{min_order_qty}" />

       <input type="submit" name="submit" value="Purchase Tickets" class="button expand" />

{/exp:store:product}   

1 Answer 1

0

Update to this, Brad pointed me in the right direction...

The javascript method can only be used on a single product page. Try using {total_stock} instead.

Worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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