Exclude Item Image from Email
- Road Rider
- Commander (CMDR)
- Posts: 144
- Joined: Sat Jan 26, 2008 12:43 pm
- Contact:
Exclude Item Image from Email
They say a picture is worth a thousand words:
This is my confirmation email. How do I eliminate certain SKU's from returning an image in the email as no image exists for discounts or coupons and items of that nature. I would obviously then want to apply the same logic to the "review this product" link so that does not display for items with a certain SKU.
This is my confirmation email. How do I eliminate certain SKU's from returning an image in the email as no image exists for discounts or coupons and items of that nature. I would obviously then want to apply the same logic to the "review this product" link so that does not display for items with a certain SKU.
Re: Exclude Item Image from Email
By checking their type. For example
Code: Select all
#if (($orderItem.OrderItemType == "Product"))
//then image here
#end
- Road Rider
- Commander (CMDR)
- Posts: 144
- Joined: Sat Jan 26, 2008 12:43 pm
- Contact:
Re: Exclude Item Image from Email
So I am clear, here is my current code:
You are thinking I should change it to this:
Code: Select all
#if ($orderItem.product.ThumbnailUrl.Substring(0,2) == "~/") <a href="${store.StoreUrl}/Product.aspx?ProductId=${orderItem.ProductId}"> <img src='$store.StoreUrl/$orderItem.product.ThumbnailUrl.Substring(2)' border="0" /> </a> #else Image Not Available #end
Code: Select all
#if (($orderItem.OrderItemType == "Product"))
($orderItem.product.ThumbnailUrl.Substring(0,2) == "~/") <a href="${store.StoreUrl}/Product.aspx?ProductId=${orderItem.ProductId}"> <img src='$store.StoreUrl/$orderItem.product.ThumbnailUrl.Substring(2)' border="0" /> </a> #else Image Not Available #end
Re: Exclude Item Image from Email
Yes your are right
- Road Rider
- Commander (CMDR)
- Posts: 144
- Joined: Sat Jan 26, 2008 12:43 pm
- Contact:
Re: Exclude Item Image from Email
Hmmm. Doesn't work. Any other ideas?
Re: Exclude Item Image from Email
Give a try by checking if there is no thumbnail available then no need of image.
Code: Select all
#if ($orderItem.product.ThumbnailUrl != "")
#if ($orderItem.product.ThumbnailUrl.Substring(0,2) == "~/") <a href="${store.StoreUrl}/Product.aspx?ProductId=${orderItem.ProductId}"> <img src='$store.StoreUrl/$orderItem.product.ThumbnailUrl.Substring(2)' border="0" /> </a> #else Image Not Available #end
#end
- Road Rider
- Commander (CMDR)
- Posts: 144
- Joined: Sat Jan 26, 2008 12:43 pm
- Contact:
Re: Exclude Item Image from Email
Ok..... Maybe I am going the wrong direction and trying to solve the wrong problem.
I am good with the current setup I have for product and items that are not products other than I do not want the "Review this product" image link displayed for things that are not products.
My current code for displaying the Review Link is:
I am trying to figure out how to not display the review link when the item is certain SKU's or not products. I like the idea of certain SKU's as I can manage this by listing which SKU's I do not want the link to display.
I am good with the current setup I have for product and items that are not products other than I do not want the "Review this product" image link displayed for things that are not products.
My current code for displaying the Review Link is:
Code: Select all
<a </a href="${store.StoreUrl}/ProductReview.aspx?ProductId=${orderItem.ProductId}">
<img border="0" src="http://www.bikeauthority.com/ablecomm/app_themes/bikeauthority/images/btn-review-this-product.gif" width="118" height="22"></a>