0

Trying to access price of some store items in a relationship field. The name of my store field is shop_product_settings

I'm trying to access the price variable without using the form tag, however, it doesn't seem to work when the items are being access through a relationship field.

  {class_recommended_products limit="2" }
    {class_recommended_products:title}"
    {class_recommended_products:shop_product_settings:price}
    {class_recommended_products:shop_main_image}
  {/class_recommended_products}
  • What version of Store and EE are you using? – Justin Long May 16 '14 at 22:42
1

I've used this:

{exp:channel:entries}
    {relationship_field parse="inward"}
        {exp:store:product entry_id="{relationship_field:entry_id}" disable_form="yes" disable_javascript="yes"}
            {price}
        {/exp:store:product}
    {/relationship_field}
{/exp:channel:entries}
0

That may not be possible. Store takes advantage of EE's internal parsing to display the special price variables inside the product details tag.

I have not tried this myself, but it may not be possible to use the fieldtype parameters inside a relationship tag like that. Instead, would need to use the {exp:store:product} tag to get the product details.

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.