1

I need to show a text area custom field inside the checkout>details just if the order contains a product with a certain category ID. How to do it?

this is the scenario: for example, in my store i sell prints and illustrations. (prints are shipped by post and illustrations are downlodable only) if the details page (next step after checkout) contains an illustration (category_id XX) I want to show a text area where customer write down all specs, instructions and comments.

for other products, prints and other common items i don't want to show this custom field inside the checkout page

Please advice me! thank you ;)

1

In the checkout and order tags, you can access the {items} loop. Inside the {items} loop you can use the {entry_id} variable to access entry custom fields and categories:

{items}
  {exp:channel:entries entry_id="{entry_id}"}
    <!-- you can access category tags here -->
  {/exp:channel:entries}
{/items}

Then inside the channel entries tag you can access the regular {categories} loop.

See:

https://exp-resso.com/docs/checkout_tag.html#checkout_tag_variables

http://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_entries.html#categories

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.