NVelocity For Images/Links

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
User avatar
clevername
Lieutenant (LT)
Lieutenant (LT)
Posts: 54
Joined: Tue Jan 11, 2011 8:54 am

NVelocity For Images/Links

Post by clevername » Mon Jan 17, 2011 5:43 pm

I am editing an Email template and I am having trouble getting the correct NVelocity code for the Product Image. Actaully I would like to replace the SKU with the Image that links back to that link on my page. Can you help?

Code: Select all

       #foreach($orderItem in $order.Items.FilterByShipmentAndSort($shipment.OrderShipmentId))
#beforeall 

        <tr>
            <td style="background: none repeat scroll 0% 0% rgb(204, 204, 204); text-align: center;"><strong>SKU</strong></td>
            <td style="background: none repeat scroll 0% 0% rgb(204, 204, 204); text-align: center;"><strong>Description</strong></td>
            <td style="background: none repeat scroll 0% 0% rgb(204, 204, 204); text-align: center;"><strong>Quantity</strong></td>
            <td style="background: none repeat scroll 0% 0% rgb(204, 204, 204); text-align: center;"><strong>Price</strong></td>
        </tr>
                                                                        #each
#if (($orderItem.OrderItemType == "Product") || ($orderItem.OrderItemType == "Discount") || ($orderItem.OrderItemType == "GiftWrap") && !$orderItem.IsHidden)

        <tr class="Email">
            <td style="text-align: center;" class="Email">#if (($orderItem.OrderItemType == "Product")) $orderItem.Sku #elseif (($orderItem.OrderItemType == "Discount")) DISCOUNT #elseif (($orderItem.OrderItemType == "GiftWrap")) GIFTWRAP #end</td>
            <td class="Email">$orderItem.Name #if ($orderItem.VariantName.Length > 0) ($orderItem.VariantName) #end #foreach($orderItemInput in $orderItem.Inputs) #if (!$orderItemInput.IsMerchantField) <br />
            <b>$orderItemInput.Name:</b> $orderItemInput.InputValue #end #end #if ($orderItem.WrapStyle) <br />
            Gift-Wrap: $orderItem.WrapStyle.Name #end</td>
            <td style="text-align: center;" class="Email">$orderItem.Quantity</td>
            <td style="text-align: right;" class="Email">$orderItem.ExtendedPrice.ToString("ulc")</td>
        </tr>
                                                                        #end
#end

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: NVelocity For Images/Links

Post by mazhar » Tue Jan 18, 2011 5:00 am

Something similar was discussed in this thread
viewtopic.php?f=44&t=7553

Post Reply