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

Notification

Icon
Error

Matt@9BallDesign
#1 Posted : Tuesday, January 29, 2008 3:53:04 PM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

Would like to be able to add links to the Add To Cart Message. Text can currently be modifed via the admin, however HTML cannot be added.


Currently Appears:



Item has been added to your cart.



Preferred:



Item has been added to your cart. [color=blue>Continue] | <FONT color=blue>View Cart[/color]



Continue Shopping link can do 1 of 2 things. Send user back to category page or close message (preferred).



Any suggestions?
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
birdsafe
#2 Posted : Tuesday, January 29, 2008 8:00:39 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

What happens when you try to add HTML -- I added HTML to my out of stock message and it works fine.
MitchA
#3 Posted : Tuesday, January 29, 2008 9:42:03 PM(UTC)
MitchA

Rank: Member

Joined: 3/3/2006(UTC)
Posts: 1,737

I tried a simple <B>... </B>. Yellow screen of death.
Optimists invent airplanes,
Pessimists buy parachutes.
Cliff
#4 Posted : Wednesday, January 30, 2008 3:44:51 AM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

Yeah, it won't take HTML. Tried the same thing. It's a glaring oversight because the message isn't very useful without an option to get to the cart.
Cliff
#5 Posted : Wednesday, January 30, 2008 3:58:43 AM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

There's a line in the product template VB files:
Code:
ItemAddedToCartLabel.Text = WebAppSettings.ItemAddedToCartText


Changing or deleting it does nothing, so I guess it's deeper in the app. Anyone know where?
Matt@9BallDesign
#6 Posted : Wednesday, January 30, 2008 11:10:58 AM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

I fiddled with that and it was too no avail. To be honest, I'm not having a fun time with the add to cart message, inventory notices &amp; error message as a whole....
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
Cliff
#7 Posted : Wednesday, January 30, 2008 2:21:51 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

No kidding. What do you need for inventory notices? I may have some code for you if it's as simple as In Stock/Out Of Stock/Backorder.
Matt@9BallDesign
#8 Posted : Wednesday, January 30, 2008 3:17:10 PM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

What I'm running into might be an oversight on my part. The add to cart message is being correctly styled via .AddedToCartMessage.

Making it 50% effective as the links to direct to cart, to checkout, continue shopping, etc... will complete the circle... (c'mon... it's all over ecommerce sites...needs to be OOTB, sorry marcus!!! just a vent..please consider for future SP)

I'm attempting to style the out of stock notices, however I'm dying to see the class or ID for them when anthem kicks in. I style with .outofstock but that's already on the page at page load so it's displaying the nice big yellow streak across the page... when anthem kicks in, it displays nice and clean. Trying to eliminate the initial styling on page load, knowing the class or ID on anthem display will solve it.

As too error messages... They're simply just not displaying... I add choices, I purposefully don't select them. Hit add to cart, where's the error message? I add quantity 0, where's the error messages? I'm no stranger to admitting it's the pilot and not the plane...LOL..

I'm working with the BVC5 template.
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
Cliff
#9 Posted : Thursday, January 31, 2008 1:30:08 AM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

OK, I think I can help with the out of stock messages. Don't know if this is the best way, but I created some classes and Site Terms and use anthem to switch to the appropriate one based on both products with and without options.

I did this in custom product template modules, so it may take some testing in yours.

Product.aspx
Code:
<div class="inventory">
<strong>Inventory:</strong>
<anthem:Label ID="InventoryLabel" CssClass="instock" runat="server" AutoUpdateAfterCallBack="true" />
</div>


Product.aspx.vb (I placed it just before the PageLoad sub)
Code:
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
Me.InventoryLabel.Text = Content.SiteTerms.GetTerm("InStock")
If Not WebAppSettings.DisableInventory Then
Dim prodPage As BaseStoreProductPage = DirectCast(Me.Page, BaseStoreProductPage)
Dim inventory As Catalog.ProductInventory = Catalog.ProductInventory.FindByProductId(prodPage.LocalProduct.Bvin)
If inventory.Bvin <> String.Empty Then
Select Case inventory.Status
Case Catalog.ProductInventoryStatus.NotAvailable
If prodPage.LocalProduct.OutOfStockMode = Catalog.ProductInventoryMode.OutOfStockAllowOrders Then
Me.InventoryLabel.Text = Content.SiteTerms.GetTerm("OutOfStockAllowPurchase")
Me.InventoryLabel.CssClass = "onbackorder"
ElseIf prodPage.LocalProduct.OutOfStockMode = Catalog.ProductInventoryMode.OutOfStockDisallowOrders Then
Me.InventoryLabel.Text = Content.SiteTerms.GetTerm("OutOfStockNoPurchase")
Me.InventoryLabel.CssClass = "outofstock"
ElseIf prodPage.LocalProduct.OutOfStockMode = Catalog.ProductInventoryMode.RemoveFromStore Then
Me.InventoryLabel.Text = Content.SiteTerms.GetTerm("OutOfStock")
Me.InventoryLabel.CssClass = "outofstock"
End If
Case Else
Me.InventoryLabel.Text = Content.SiteTerms.GetTerm("InStock")
Me.InventoryLabel.CssClass = "instock"
End Select
End If
End If
End Sub


Here are the site terms you'll need (some of them may exist, can't remember) and some example values:
    * InStock | In Stock - Ships Within 2 Days
    * OutOfStockAllowPurchase | On Backorder
    * OutOfStockNoPurchase | Out Of Stock
    * OutOfStock | Out Of Stock


You can see how each one has it's own class, so you can do something like this, roughly:
Code:
.inventory { font-size: 85%; color: #999; padding: 0 2px; }
.inventory .instock { color: green; }
.inventory .onbackorder { color: blue; }
.inventory .outofstock { color: red; }
Matt@9BallDesign
#10 Posted : Thursday, January 31, 2008 12:43:46 PM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

I'm fiddling cliff, thanks. check is in the mail...
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
sternyy
#11 Posted : Monday, February 18, 2008 5:00:14 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
anyone ever find a way to add html to the message? I was just trying to add the continue shopping | checkout links but no dice.
SStorhaug
#12 Posted : Wednesday, February 17, 2010 8:33:58 AM(UTC)
SStorhaug

Rank: Member

Joined: 11/20/2005(UTC)
Posts: 122

This is not a limitation of BVC, but a security precaution that is enabled by default in ASP.NET. The pages are set up this way by default to ensure no cross site scripting vulnerabilities can be introduced.



The workaround is to add ValidateRequest="False" to the &lt;%@ Page /&gt; directive on the affected page in the BVAdmin side, which will allow HTML and javascript to be posted through the form. This can be done on any page in the BVAdmin side to allow HTML or javascript input in text fields.



However, I strongly suggest that this not be disabled on the store side, as it will potentially open your site up for hacking.
shanplourde
#13 Posted : Sunday, October 3, 2010 10:47:58 AM(UTC)
shanplourde

Rank: Member

Joined: 9/19/2010(UTC)
Posts: 104

Hi there, obviously late to the thread but I was looking for exactly the same thing. A brute force way of doing this with BV Commerce 5.74 follows:

1. Open $/BVModules/Controls/AddToCartButton.vb
2. Change the line that reads:

args.ItemAddedToCartLabel.Text = WebAppSettings.ItemAddedToCartText

To:

args.ItemAddedToCartLabel.Text = WebAppSettings.ItemAddedToCartText + _
" <a href=""" + ResolveUrl("~/") + "Cart.aspx"">View Cart</a>"
Best regards,
Shan Plourde
www.pahsah.com
+1 (416) 628-1280
--------------------------------
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.

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