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

Properties methods access issue #189

Closed euge001 closed 9 months ago

euge001 commented 9 months ago

Hi!

When I use:

    {% set obPropertyList = obProduct.property %}
    <ul>
        {% for obProperty in obPropertyList %}
            <li>
                  {{ obProperty.name }}: {{ obProperty.property_value.getValueString() }} {{ obProperty.measure.name }} 
            </li>
        {% endfor %}
    </ul>

I can successfully see all the properties in my product slider.

However this piece of code:

              {% set obPropertyList = obProduct.property %}
              {% set obGroupList = obPropertyList.getGroupList() %}
              {% set obMainGroup = obGroupList.getByCode('main') %}

              {% set obPropertyList = obPropertyList.group(obMainGroup.id) %}

        <ul>
            {% for obProperty in obPropertyList %}
                <li>
                      {{ obProperty.name }}: {{ obProperty.property_value.getValueString() }} {{ obProperty.measure.name }}
                      {{ obMainGroup.name }}
               </li>
            {% endfor %}
        </ul>

returns nothing, even I have all the Properties and Property Sets in place. Main ('main') - is the code of existing set with products and properties inside.

kharanenka commented 9 months ago

Hi!

euge001 commented 9 months ago

thank you for your responce. Both of steps has been done. I did follow your youtube tutorial and did check several times I follow it properly. This is how my set is looks like: image

and btw, when I click on property from the list above I see this: image

where the field under Property groups label is inactive and make no any sense.

kharanenka commented 9 months ago

But you should see checkbox list in "Property grous" field. Why do you see "input text" field?

example

euge001 commented 9 months ago

sorry, but checkboxes are not visible in my case. I have fresh October installation + I got your plugins through "sync project" button (last coulpe of days).

image

kharanenka commented 9 months ago

Have you solved your issue?

euge001 commented 9 months ago

Yes, thank you.