0

I am seeing this after upgrading Assets to 2.0.5 - it was working perfectly before - I know everyone says that. Environment is EE2.5.5 Store 1.6.3 My template:

<tr>
    <th>Order Hash</th>
    <th style="width:14%;">Order ID</th>
    <th style="width:14%;">Order Date</th>
    <th style="width:14%;">Items</th>
    <th style="width:14%;">Total</th>
    <th style="width:14%;">Status</th>
    <th style="width:14%;">Download</th>

</tr>
{exp:store:orders member_id='CURRENT_USER' secure="yes" order_by='order_date' sort='desc'}

{if no_orders}
    <tr class="product_detail">
        <td colspan="4">Sorry, no matching orders were found.</td>
    </tr>
{/if}
    <tr class="product_detail">
        <td>{order_hash}</td>
        <td style="text-align: center;"><a class="onwhite" href="{path='products/order/{order_hash}'}">{order_id}</a></td>
        <td>{order_date format="%d/%m/%y %H:%m"}</td>
        <td>{items}{title}<br />{/items}</td>
        <td>{order_total}</td>
        <td>{order_status}</td>
        <td>
            {exp:store:download order_id="{order_id}" url="{software}" class="onwhite"}
                Download
            {/exp:store:download}
        </td>
    </tr>

{/exp:store:orders}

The file is visible in the EE file manager. This appears to be different from question 769 since it was working before, but stopped after upgrading Assets. Can anyone see what I am doing wrong?

2
  • There shouldn't be any link between an upgrade to Assets and Store so it's either a coincidence or the upgrade to Assets has caused a problem in the system which needs to be resolved first. What's the exact error you're getting and where? Is it just not returning anything at all?
    – Ian Young
    Apr 3, 2013 at 16:52
  • The only error is a Store error - "Unable to locate file ID" Apr 4, 2013 at 5:27

2 Answers 2

0

There shouldn't be an issue if you have uploaded the file via the native file browser from upgrading Assets. Try changing your template to the following:

<tr>
    <th>Order Hash</th>
    <th style="width:14%;">Order ID</th>
    <th style="width:14%;">Order Date</th>
    <th style="width:14%;">Items</th>
    <th style="width:14%;">Total</th>
    <th style="width:14%;">Status</th>
    <th style="width:14%;">Download</th>

</tr>

    {exp:store:orders member_id='CURRENT_USER' secure="yes" order_by='order_date' sort='desc'}

    {if no_orders}
        <tr class="product_detail">
            <td colspan="4">Sorry, no matching orders were found.</td>
        </tr>
    {/if}
        <tr class="product_detail">
            <td>{order_hash}</td>
            <td style="text-align: center;"><a class="onwhite" href="{path='products/order/{order_hash}'}">{order_id}</a></td>
            <td>{order_date format="%d/%m/%y %H:%m"}</td>
            <td>{items}{title}<br />{/items}</td>
            <td>{order_total}</td>
            <td>{order_status}</td>
            <td>
      {items}
                {exp:store:download order_id="{order_id}" url="{software}" class="onwhite"}
                    Download
                {/exp:store:download}
      {/items}
            </td>
        </tr>

    {/exp:store:orders}

This should allow Store to know which item to generate the downloads for.

10
  • Justin - thank you for your suggestion, but it makes no difference. FWIW, the Assets upgrade also seems to have had another effect on the EE file system, which is to prevent file manipulations from working. I originally reported these effects in a single question, but decided to separate them in case they were in fact a coincidence. I am waiting to hear from P&T about the other effect. Since it does not involve Store, it might be easier to isolate. Apr 4, 2013 at 5:38
  • You can also add a channel entries tag so you have {items}{exp:channel:entries entry_id="{entry_id}"}{exp:store:download ....}Download{/exp:store:download}{/exp:channel:entries}{/items} In some environments this can also help fix the problem. Apr 4, 2013 at 7:24
  • Hi Justin - I have tried both ways. Without the channel entries tags, I get the "Unable to locate file_id" error. If I use the channel entries tags, the URL renders multiple times, one for each downloadable product. What is worse, it assigns them all to every paid order regardless of whether the order included the product or not!! Apr 4, 2013 at 9:06
  • I am wondering why the Store manual does not mention the channel entries tags? Whatever the case, it is now clear that for whatever reason, bug or not, the URL does not render unless the entries tags are used, and when they are used, they are rendered regardless of the order to which they are attached. Still hoping that I am just doing something wrong. Apr 4, 2013 at 9:33
  • I did not notice this before because I was fixated on the download link, but the title is also missing from the display. This seems to make it clear that the channel entries tags are required, but even if I use them, I am still left with the fact that Store is not tying the order item to the channel entry. Apr 4, 2013 at 14:06
0

This problem turned out to be due to a database corruption that occurred during one of the software upgrades, most likely the Store upgrade. Since I corrected that, all is well again.

1
  • That old chestnut. Unfortunately they happen from time to time. Glad your got it sorted.
    – Ian Young
    Apr 9, 2013 at 12:02

Your Answer

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

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