1

I'm looking to add the {order_status_message} when a customer views orders in their account. I see that you can use {order_status_message} in an email but I'm having issues having it appear after an item has been shipped and the {order_status_message} has been used. Here's the code I'm using:

{exp:store:orders
                    order_hash="{segment_3}"
                    member_id="CURRENT_USER"        
            }

{if no_orders}
    {redirect="/account/login"}
{/if}

<div class="row">
    <div class="span4">


        {order_status_message}

        <fieldset>
            <legend>Summary</legend>
            <div class="control-group">
                <b>Order ID:</b> {order_id}<br />
                <b>Date:</b> {order_date format="%j %M %Y"}<br />
                <b>Status:</b> {order_status}<br />
                <b>Total:</b> {order_total}<br />
                <b>Paid:</b> {if is_order_paid}Yes{if:else}No{/if}
            </div>
        </fieldset>
    </div>
    <div class="span4">
        <fieldset>
            <legend>Billing Details</legend>
            <div class="control-group">
                <div><b>{billing_name}</b></div>
                <div>{billing_address1}</div>
                <div>{billing_address2}</div>
                <div>{billing_address3}, {billing_region_name}, {billing_postcode}</div>
                <div>{billing_country_name}</div>
                <div>{billing_phone}</div>
                <div>{order_email}</div>
            </div>
        </fieldset>
    </div>
    <div class="span4">
        <fieldset>
            <legend>Shipping Details</legend>
            <div class="control-group">
                {if shipping_same_as_billing}
                    Same as Billing Details
                {if:else}
                    <div><b>{shipping_name}</b></div>
                    <div>{shipping_address1}</div>
                    <div>{shipping_address2}</div>
                    <div>{shipping_address3} {shipping_postcode}</div>
                    <div>{shipping_region_name}</div>
                    <div>{shipping_country_name}</div>
                    <div>{shipping_phone}</div>
                {/if}
            </div>
        </fieldset>
    </div>
</div>

<table class="table">
    <thead>
        <tr>
            <th style="width:60%">Product</th>
            <th style="text-align:right">Price</th>
            <th style="text-align:center">Qty</th>
            <th style="text-align:right">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 style="text-align:right">{price}</td>
                <td style="text-align:center">{item_qty}</td>
                <td style="text-align:right">{item_subtotal}</td>
            </tr>
        {/items}
        <tr>
            <th colspan="3">Subtotal</th>
            <th style="text-align:right">{order_subtotal}</th>
        </tr>
        {if order_shipping_val}
            <tr>
                <td colspan="3">Shipping</td>
                <td style="text-align:right">{order_shipping}</td>
            </tr>
        {/if}
        {if order_tax_val}
            <tr>
                <td colspan="3">{tax_name} ({tax_percent}%)</td>
                <td style="text-align:right">{order_tax}</td>
            </tr>
        {/if}
        <tr>
            <th colspan="3">Total</th>
            <th style="text-align:right">{order_total}</th>
        </tr>
    </tbody>
</table>

{/exp:store:orders} 
4
  • Just to confirm, have you entered in a message in the Order Detail page to update the status of the order? It will be this message that gets pulled in and it should be the most current. If so, what gets output? Is it the unprocessed tag {order_status_message}?
    – Ian
    Jun 27 '13 at 18:20
  • Yes, I have entered a message in the Order Detail and updated the status of the order. After doing that {order_status_message} is still blank using the code above. Jun 27 '13 at 22:01
  • I'll test this out to see if I can recreate. Just for the info what version of Store and EE are you using?
    – Ian
    Jun 28 '13 at 15:29
  • Using Store 1.6.4 and EE 2.6.1 (fresh install of both). Jun 28 '13 at 19:04
1

In Store 1.x, {order_status_message} was only available in the email templates, and not in the order tag.

In Store 2, this has been added to the order tag as well.

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.