• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

toasty0621
#1 Posted : Friday, February 28, 2014 2:04:50 PM(UTC)
toasty0621

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
Aaron
#2 Posted : Friday, February 28, 2014 3:36:43 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,347
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 157 time(s) in 152 post(s)
Originally Posted by: toasty0621 Go to Quoted Post
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 Go to Quoted Post
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
toasty0621
#3 Posted : Friday, February 28, 2014 3:53:56 PM(UTC)
toasty0621

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!
Aaron
#4 Posted : Monday, March 3, 2014 5:27:26 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,347
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 157 time(s) in 152 post(s)
Originally Posted by: toasty0621 Go to Quoted Post
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 Go to Quoted Post
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
Steve95
#5 Posted : Tuesday, March 4, 2014 6:59:44 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 250

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

Aaron
#6 Posted : Tuesday, March 4, 2014 9:28:32 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,347
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 157 time(s) in 152 post(s)
Originally Posted by: Steve95 Go to Quoted Post
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
Steve95
#7 Posted : Thursday, March 13, 2014 6:37:35 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 250

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

RhinoGroup
#8 Posted : Wednesday, September 8, 2021 7:52:28 AM(UTC)
RhinoGroup

Rank: Member

Joined: 7/31/2013(UTC)
Posts: 15

Originally Posted by: Aaron Go to Quoted Post
Originally Posted by: Steve95 Go to Quoted Post
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?
Aaron
#9 Posted : Thursday, September 9, 2021 2:51:23 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,347
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 157 time(s) in 152 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.

©2021 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012