I'm building a uCommerce site, and I want to display the bulk discounts for a product on it's product page. I have the campaign items working to provide the discount when the required quantity of that product is added to the cart. However, I'm having trouble finding documentation on how to display the content thats in the "Ad" tab of my campaign item.
I've found some forum posts on using xslt, but I'm relatively new and am using razor. If anyone can point me in the right direction, I'd greatly appreciate it!
How would I define campaignItem? And if I'm trying to get a property named "DiscountAdvertise", as I created a text string with that name underneath the "Default Campaign Item" child of "Definitions", would I be calling it like this?
I've got it displaying bulk order discounts available on the product page! I just need to figure out how to get the bulk order discounts displaying/advertised on the pages of the products that I gave the bulk order discounts to.
Display individual campaign items using razor
I'm building a uCommerce site, and I want to display the bulk discounts for a product on it's product page. I have the campaign items working to provide the discount when the required quantity of that product is added to the cart. However, I'm having trouble finding documentation on how to display the content thats in the "Ad" tab of my campaign item.
I've found some forum posts on using xslt, but I'm relatively new and am using razor. If anyone can point me in the right direction, I'd greatly appreciate it!
Hi Morgan
The campaingitems properties works just like the product and category counterpart.
So to get a multilingual property:
How would I define campaignItem? And if I'm trying to get a property named "DiscountAdvertise", as I created a text string with that name underneath the "Default Campaign Item" child of "Definitions", would I be calling it like this?
@campaignItem.GetProperty("DiscountAdvertise").GetValue()
Thank you for the quick response, by the way..
I would grap it from:
And make a FirstOrDefault with some parameters (DefinitionType etc.) to fetch the campaign you are looking for
I've got it displaying bulk order discounts available on the product page! I just need to figure out how to get the bulk order discounts displaying/advertised on the pages of the products that I gave the bulk order discounts to.
In order to do that you need to pick the right CampaignItem from TargetedCampaignItems, and use the first code sample i posted
is working on a reply...