Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
I'm in need of a way to display the 'root' product title on the product page instead of the default selected product option's title. I also don't want it to change when another option is selected. Possible? |
|
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
Hi Cliff, This is going to be a difficult one for sure, but clear one thing up for me... do you want this to affect all of your products, or just one (or a few individual products)?
Thanks, Everett |
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Just need to do it in a product template. For example, instead of the title saying 'T-Shirt Small' because small is the default selection in the drop-down, I just want to pull from the original product name, 'T-Shirt'.
Do products with options no longer have access to the original product name? |
|
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
Hi Cliff, Sorry for the confusion. I initially thought you were looking for a much more involved solution. This is a simple mod that you should start by copying the template you would like to adapt. Rename the template folder to your name of choice and open up the product.aspx and the product.aspx.vb files. In the product.aspx file add the following orange code to the file (I am placing it underneath the current product name, but you can place it where ever you would like):
<h1> <span> <anthem:Label ID="lblName" runat="server" AutoUpdateAfterCallBack="true"></anthem:Label> <br /> [orange]<asp:Label ID="lblNew" runat="server"></asp:Label> [/orange] </span> </h1>
Save the file and insert the following orange code into the product.aspx.vb file:
Private Sub PageLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If LocalProduct IsNot Nothing Then
[orange]Me.lblNew.Text = Me.LocalProduct.ProductName[/orange]
' Page Title If LocalProduct.MetaTitle.Trim.Length > 0 Then
This should achieve the desired effect. Thanks, Everett |
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
Hi,
I may have misread your post Cliff, but I think you are just looking to replace the product name and not add a second label.
If that is correct, you basically follow Everett's instruction about copying the theme, however you then REPLACE the anthem label with a standard asp label and use the same name "lblName" and you should not have to make any changes to the codebehind file. |
Netriplex Corporation<br /> |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Yeah, but that helps. Basically, to grab the base product name, you just move: Code:Me.lblName.Text = LocalProduct.ProductName from: Code:Public Overrides Sub PopulateProductInfo to: Code:Private Sub PageLoad and it seems to work (i.e., no option name in the title). And, yeah, change to a regular label, or just set AutoUpdateAfterCallBack to false. Thanks! |
|
|
|
|
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.