Rank: Member
Joined: 5/18/2005(UTC) Posts: 36
Thanks: 3 times
|
Greetings,
Is it possible to output a custom property tag in one of the templates?
As of now you can dump all type properties into a template using the[[Product.TypeProperties]] or [[Product.TypePropertiesDropShipper]] tag.
Is there a way to just dump one Property instead of all?
Thanks!
Jay
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: toasty0621 Is it possible to output a custom property tag in one of the templates? When you say "custom property", are you talking about the CustomProperties property of the Product object? Originally Posted by: toasty0621 As of now you can dump all type properties into a template using the[[Product.TypeProperties]] or [[Product.TypePropertiesDropShipper]] tag.
Is there a way to just dump one Property instead of all? Out-of-the-box, no. This should be a fairly simple customization to the Core, though. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 5/18/2005(UTC) Posts: 36
Thanks: 3 times
|
For our Admin Receipt Templates I want to display just one Type Property that is assigned to that product (example Shelf Location).
So it is just a mod that I will need to do to the system core?
Would it just be an addition to the "Available Tags" on the EmailTemplates_Edit.aspx page?
I know there will be more to it than that but to start :-)
Thanks Aaron!
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: toasty0621 For our Admin Receipt Templates I want to display just one Type Property that is assigned to that product (example Shelf Location).
So it is just a mod that I will need to do to the system core? Correct. Originally Posted by: toasty0621 Would it just be an addition to the "Available Tags" on the EmailTemplates_Edit.aspx page? The list of replacement tags is dynamically generated. Once your new tag is added to the Core it should display in the list automatically. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 4/29/2010(UTC) Posts: 256
Thanks: 4 times Was thanked: 11 time(s) in 10 post(s)
|
It might be best to create your own dll, which calls the core functionality plus then add any of your own custom tags at the end of your function. This allows you to upgrade the core without to many issues going forward however you will need to include the reference in multiple pages. @asherrick Would it be possible to allow developers to override/extend certain functions such as these going forward? Or alternatively use the workflow, as I end up having to do this for most stores. Edited by user Wednesday, March 5, 2014 12:13:50 PM(UTC)
| Reason: darn iphone autocorrect
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: Steve95 Would it be possible to allow developers to override/extend certain functions such as these going forward? Or alternatively use the workflow, as I end up having to do this for most stores. It would be nice to be able to add or override replacement tags. I'd have to give some thought to what that architecture might look like. I'm open to ideas. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 4/29/2010(UTC) Posts: 256
Thanks: 4 times Was thanked: 11 time(s) in 10 post(s)
|
Aaron Off the top of my head and assuming your willing to go down the IOC route in the core you could have something like a facade for the implementation e.g. Function ConvertToMailMessage(ByVal o As Orders.Order) ReplacementTagsGenerator = DependencyResolver.Resolve<IReplacementTagsGenerator>(); return ReplacementTagsGenerator.GetMessages(o) end Function you could then have a default implementation with an Overridable Property, and then you could create a custom class such as public Class MyCustomGenerator Inherits ReplacementTagsGeneratorr Protected Overrides Function GetMessages(ByVal o As Orders.Order) As String ''Add custom implementation here End Function End Class Then just change the mapping in an xml file or possible in a help method in the global.asax? No need to recompile the core but you can extend off it? Edited by user Thursday, March 13, 2014 6:39:02 AM(UTC)
| Reason: code tags not working
|
|
|
|
Rank: Member
Joined: 7/31/2013(UTC) Posts: 15
|
Originally Posted by: Aaron Originally Posted by: Steve95 Would it be possible to allow developers to override/extend certain functions such as these going forward? Or alternatively use the workflow, as I end up having to do this for most stores. It would be nice to be able to add or override replacement tags. I'd have to give some thought to what that architecture might look like. I'm open to ideas. Aaron, Has there been any movement on this front? Are we now able to add custom email template replacement tags?
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
No, this has not been high on our list as it's easy enough to customize the Core. That said, it is still on our list of improvements to make in the future. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.