0

I'm using Expresso Store 2.3.1 and EE 2.9.2. I can't get the shipping same as billing address to work. I tick the box, put in a different address, but on the next page, it just says Shipping same as billing, it won't show the second address.

Billing Details Page:

    {exp:store:checkout
form_class="form--checkout"
next="cart/confirm"
error_handling="inline"
error_delimiters='<span class="help-inline">|</span>'
require="name|address1|city|country|order_email|billing_phone|shipping_phone"}
<section class="section">
    <div class="">
        <div class="order_details">
            {if no_items}
            {redirect="cart/index"}
            {/if}
            <fieldset id="billing_details" class="billing-details">
                <h3 class="section__title">Billing Details</h3>
                <div class="control-group {if error:billing_name}error{/if}">
                    <label class="control-label" for="billing_name">Name *{error:billing_name}</label>
                    <div class="controls">
                        {field:billing_name}
                    </div>
                </div>
                <div class="control-group {if error:billing_address1}error{/if}">
                    <label class="control-label" for="billing_address1">Address *{error:billing_address1}</label>
                    <div class="controls">
                        {field:billing_address1}
                    </div>
                </div>
                <div class="control-group {if error:billing_address2}error{/if}">
                    <div class="controls">
                        {field:billing_address2} {error:billing_address2}
                    </div>
                </div>
                <div class="control-group {if error:billing_city}error{/if}">
                    <label class="control-label" for="billing_city">City *{error:billing_city}</label>
                    <div class="controls">
                        {field:billing_city}
                    </div>
                </div>
                <div class="control-group {if error:billing_postcode}error{/if}">
                    <label class="control-label" for="billing_postcode">Postcode</label>
                    <div class="controls">
                        {field:billing_postcode} {error:billing_postcode}
                    </div>
                </div>
                <div class="control-group {if error:billing_state}error{/if}">
                    <label class="control-label" for="billing_state">County</label>
                    <div class="controls">
                        {field:billing_state} {error:billing_state}
                    </div>
                </div>
                <div class="control-group {if error:billing_country}error{/if}">
                    <label class="control-label" for="billing_country">Country</label>
                    <div class="controls">
                        {field:billing_country} {error:billing_country}
                    </div>
                </div>
                <div class="control-group {if error:billing_phone}error{/if}">
                    <label class="control-label" for="billing_phone">Phone *{error:billing_phone}</label>
                    <div class="controls">
                        {field:billing_phone}
                    </div>
                </div>
                <div class="control-group {if error:order_email}error{/if}">
                    <label class="control-label" for="order_email">Email *{error:order_email}</label>
                    <div class="controls">
                        {field:order_email}
                    </div>
                </div>
            </fieldset>
            <fieldset class="shipping-details">
                <h3 class="section__title">Shipping Details</h3>
                <label for="shipping_same_as_billing" class="checkbox">
                    {field:shipping_same_as_billing} Tick to use the same address as Billing Details
                </label>
                <div id="shipping_details_drawer">
                    <div class="control-group {if error:shipping_name}error{/if}">
                        <label class="control-label" for="shipping_name">Name *{error:shipping_name}</label>
                        <div class="controls">
                            {field:shipping_name}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_address1}error{/if}">
                        <label class="control-label" for="shipping_address1">Address *{error:shipping_address1}</label>
                        <div class="controls">
                            {field:shipping_address1}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_address2}error{/if}">
                        <div class="controls">
                            {field:shipping_address2} {error:shipping_address2}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_city}error{/if}">
                        <label class="control-label" for="shipping_city">City *{error:shipping_city}</label>
                        <div class="controls">
                            {field:shipping_city}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_postcode}error{/if}">
                        <label class="control-label" for="shipping_postcode">Postcode</label>
                        <div class="controls">
                            {field:shipping_postcode} {error:shipping_postcode}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_state}error{/if}">
                        <label class="control-label" for="shipping_state">County</label>
                        <div class="controls">
                            {field:shipping_state} {error:shipping_state}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_country}error{/if}">
                        <label class="control-label" for="shipping_country">Country</label>
                        <div class="controls">
                            {field:shipping_country} {error:shipping_country}
                        </div>
                    </div>
                    <div class="control-group {if error:shipping_phone}error{/if}">
                        <label class="control-label" for="shipping_phone">Phone *{error:shipping_phone}</label>
                        <div class="controls">
                            {field:shipping_phone}
                        </div>
                    </div>
                </div>
            </fieldset>
            <div class="form-actions-container">
                <div class="form-actions">
                    <span class="order_button"><a href="{path='cart/index'}" class="button--solid">Back</a></span>
                    <span class="order_button"><input type="submit" name="next" value="Review Order" class="button--solid" /></span>
                </div>
            </div>
            {/exp:store:checkout}

Payment Details Page:

{exp:store:checkout
form_class="form--confirm"
return="cart/order/ORDER_HASH"
error_handling="inline"
payment_method="stripe"
error_delimiters='<span class="help-inline">|</span>'}
<section class="section">
<div>
    <div class="section__inner">
        <h3 class="section__title">Order Summary</h3>
        <table class="table--cart">
            <colgroup>
            <col span="1" style="width: 41%;">
            <col span="1" style="width: 25%;">
            <col span="1" style="width: 16%;">
            <col span="1" style="width: 16%;">
            </colgroup>
            <thead>
                <tr>
                    <th></th>
                    <th>Price</th>
                    <th>Qty</th>
                    <th>Total</th>
                </tr>
            </thead>
            <tbody>
                {items}
                <tr>
                    <td>
                        <h4><a href="{path='store_example/product'}/{url_title}">{title}</a></h4>
                        <p><small>
                        <b>SKU:</b> {sku}<br />
                        {modifiers}
                        <b>{modifier_name}</b>: {modifier_value} {if price_mod_val}({price_mod}){/if}<br />
                        {/modifiers}
                        </small></p>
                    </td>
                    <td class="price">{price}</td>
                    <td><input name="items[{key}][item_qty]" value="{item_qty}" class="input-mini" /></td>
                    <td>{item_subtotal}</td>
                </tr>
                {/items}
                <tr>
                    <th class="middle" colspan="1"><input type="submit" name="update_cart" value="Update Totals" class="button--solid" /></th>
                    <th class="middle text--right" colspan="3">Subtotal: <span class="price">{order_subtotal}</span></th>
                </tr>
            </tbody>
        </table>
        <div class="table--cart extra">
            <table class="table--cart">
                <tr>
                    <td class="middle">Promo Code</td>
                    <td colspan="2" class="middle">{field:promo_code}</td>
                    <td class="middle">{order_discount}</td>
                </tr>
                {if order_handling_val}
                <tr>
                    <td>Handling</td>
                    <td>{order_handling}</td>
                </tr>
                {/if}
                {if tax_name}
                <tr>
                    <td>{tax_name} ({tax_percent}%)</td>
                    <td>{order_tax}</td>
                </tr>
                {/if}
                <tr>
                    <th class="price text--right" colspan="4"><h4>Total:</h4> {order_total}</th>
                </tr>
            </table>
        </div>
        <div class="order_details" style="clear: both;">
            {if no_items}
            {redirect="shop-online/index"}
            {/if}
            <div class="row">
                <div class="columns medium-12 large-12">
                    <div class="row">
                        <div class="columns medium-6 large-6">
                            <fieldset>
                                <h3 class="section__title">Billing Details</h3>
                                <div class="control-group">
                                    <p><b>{billing_name}</b><br/>
                                    {billing_address1}<br/>
                                    {billing_address2}<br/>
                                    {billing_city} {billing_postcode}<br/>
                                    {billing_state_name}<br/>
                                    {billing_country_name}<br/>
                                    {billing_phone}<br/>
                                    {order_email}</p>
                                </div>
                            </fieldset>
                        </div>
                        <div class="columns medium-6 large-6">
                            <fieldset>
                                <h3 class="section__title">Shipping Details</h3>
                                <div class="control-group">
                                    {if shipping_same_as_billing}
                                    <p>Same as Billing Details</p>
                                    {if:else}
                                    <p><b>{shipping_name}</b><br/>
                                    {shipping_address1}<br/>
                                    {shipping_address2}<br/>
                                    {shipping_city} {shipping_postcode}<br/>
                                    {shipping_state_name}<br/>
                                    {shipping_country_name}<br/>
                                    {shipping_phone}</p>
                                    {/if}
                                </div>
                            </fieldset>
                        </div>
                    </div>
                    <fieldset class="columns medium-6 large-6">
                        <h3 class="section__title">Payment</h3>
                        {if error:payment_method}
                        <div class="alert alert-error">{error:payment_method}</div>
                        {/if}

                        <input type="hidden" id="payment_method" name="payment_method" value="Stripe">

                        <div>
                            <label for="payment_name">Name</label>
                            <input type="text" id="payment_name" data-stripe="name" value="" />
                        </div>

                        <div>
                            <label for="payment_card_no">Card No</label>
                            <input type="text" id="payment_card_no" data-stripe="number" value="" />
                        </div>



                        <div class="col">
                            <label for="payment_exp_month">Expiry</label>
                            <select id="payment_exp_month" data-stripe="exp-month" style="width:auto">
                                <option value=""></option>
                                {exp_month_options}
                            </select>
                            <select id="payment_exp_year" data-stripe="exp-year" style="width:auto">
                                <option value=""></option>
                                {exp_year_options}
                            </select>
                        </div>

                        <div class="col">
                            <label for="payment_csc">CSC</label>
                            <input type="text" id="payment_csc" value="" data-stripe="cvc" class="input-mini" />
                        </div>

                        <input type="hidden" id="payment_token" name="payment[token]" value="" />
                        <input type="hidden" id="order_custom1" name="order_custom1" value="" />
                    </fieldset>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <span class="order_button"><a href="{path='shop/checkout'}" class="button--solid">Back</a></span>
            <span class="order_button"><input id="checkout_submit" type="submit" name="submit" value="Place Order" class="button--solid" /></span>
        </div>
    </div>
</div>
</section>
{/exp:store:checkout}
3
  • Can you make sure that in Store > Settings > General > Default Shipping Address is set to "None". You will also need to clear your cart for changes to be applied Commented Dec 22, 2014 at 17:09
  • Hi Justin, thanks for your help. I've changed that to none, but it's still happening
    – Mark
    Commented Jan 5, 2015 at 9:19
  • If anybodies still looking at this, the system does appear to be recording the different shipping address in the backend of Store, it's just not showing up on the front end.
    – Mark
    Commented Feb 3, 2015 at 11:29

2 Answers 2

1

I see the issue, in 2.9.2 the conditionals have changed. To test for the conditional you need to do this:

{if shipping_same_as_billing == 1}

Brad

1
  • Hi Parscale, Brad that looks like it's done it. Thanks a million.
    – Mark
    Commented Feb 9, 2015 at 17:14
0

First, I would update to the current release designed for EE 2.9.2. The current release is Store 2.4.1. The version you are using should work, but I recommend using the current version so we can do proper debugging.

1
  • Hi Parscale, thanks for your help. I've updated Store to the latest version, still no change.
    – Mark
    Commented Feb 9, 2015 at 11:40

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.