oc-shopaholic / oc-orders-shopaholic-plugin

🛒 Orders (cart) extension for Shopaholic plugin
https://octobercms.com/plugin/lovata-ordersshopaholic
GNU General Public License v3.0
27 stars 18 forks source link

Can't display order.secret_key #25

Closed philmarc closed 6 years ago

philmarc commented 6 years ago

I am using the latest update of the plugin, and I have checked that I have a column secret_key in the database (lovata_orders_shopaholic_orders table) that is not empty.

When I access my url example.com/account/order/265416079c0e42f4f1c131388cf366d1, my order info is displayed correctly, except for the secret_key

    {% set order = OrderPage.get() %}
    <p>{{ order.order_number }}</p> <!-- works fine -->
    <p>{{ order.secret_key }}</p> <!-- doesn't work -->

The reason I need the secret_key is to display a list of orders in the account dashboard:

{% set orders = obUser.order() %}
{% for order in orders %}
<a href="{{ 'account'|page({param1: 'order', param2: order.secret_key}) }}" data-push-state>#{{ order.order_number }}</a>
{% endfor %}

Why can't I display the order.secret_key , or what am I missing?

kharanenka commented 6 years ago

Fixed in version 1.9.1