Shipping Options item placeholder

Hi
I would like to include conditional text in my listing using control/IF statements in my template.

Examples

  • Display text “Free shipping” if the selected shipping profile includes free shipping
  • Display conditional text describing the shipping packaging based on the shipping profile.

Something like this based on the selected shipping profile

[[if item.shippingOptions.Profile=="Satchel 500g Free"]]
	<p>Free shipping<p>
 [[endif]]

My issue is that I can’t find an item ID for shipping options profile that works.
Thanks in advance!

I don’t think there’s way to get the packaging details of a shipping profile but finding out what profile ID is used should be possible.

  1. Find out what the profile ID of your “Satchel 500g Free” profile is. To do so make sure the desired profile is selected, then enter the following macro language command in Editor mode:
    [[item.shippingOptions.shippingProfileID]]
    Next, switch to Preview mode and copy the shown profile ID.

  2. Switch back to Editor mode and enter the follwowing code (replace “123456789” with your profile ID):

[[if item.shippingOptions.shippingProfileID=="123456789"]]
<p>Free shipping<p>
[[endif]]

  1. Check the result in Preview mode.

Hope this helps,
Kristian

Hi Kristian
Thank you – exactly what I was hoping for! This works perfectly :+1:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.