1

I am looking to use simple commerce price variable inside a standard channel entries tag. Using the following code, it is not parsing the {item_regular_price} and simply displaying the tag.

{exp:channel:entries channel="membership_packages" dynamic="no"}
  <li><a href="{page_url}">{title} - {item_regular_price}</a></li>
{/exp:channel:entries}

Any ideas on how I can get the information from the simple commerce item to display in channel entries?

2

Figured this out, you need to wrap the simple commerce tags with in the simple commerce purchase tags like so...

{exp:channel:entries channel="membership_packages" dynamic="no"}
     <li><a href="{page_url}">{title} - {exp:simple_commerce:purchase entry_id="{entry_id}" success="site/success" cancel="site/index"} {item_regular_price}{/exp:simple_commerce:purchase}</a></li>
{/exp:channel:entries}

It's important to note that the "success" and "cancel" parameters are required and it will not work without them.

| improve this answer | |

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.