Imports CharterDotCom.CommonEntities.Library
Imports CharterDotCom.CommonEntities.Library.Enumerations
Imports CharterDotCom.CommonEntities.Library.EntityMemberServices
Imports CharterDotCom.CommonEntities.Library.EntityEBSServices
Imports CharterDotCom.CommonEntities.Library.EntitySupport
Imports CharterDotCom.CommonEntities.Library.EntitySearch
Imports CharterDotCom.CommonEntities.Library.EntityWebConfig
Imports CharterDotCom.CommonEntities.Library.EntityG2BServices
Imports CharterDotCom.WebSite.Library
Imports CharterDotCom.WebSite.Library.BLCommon

Partial Class Order_AffiliateShoppingCart
	Inherits CharterCMSPage	  'JPIRKEY 4-2010 Updating all pages to inherit from a single source.

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim acct As IAccount = AccountManager.Instance.GetAccount()
    If acct IsNot Nothing Then
            If (acct.AffliateID = CharterDotCom.CommonEntities.Library.Common.m_CHARTER_AFFLIATE_ID) Then
                Response.Redirect("ShoppingCart.aspx")
            End If
    End If
    If IsPostBack = False Then
            'ucHeader.SelectedItem = MenuItem.Unspecified
      'ucShoppingCart.NavigateFrom = Request.UrlReferrer.PathAndQuery
    End If
    'TODO: review (if we can retrive catalog only if not post back)
    Dim catalog As ICatalog
    catalog = AffliateCatalogManager.Instance.GetCatalog
    If catalog IsNot Nothing Then
      ' assign shopping cart's cart property
      ucShoppingCart.Cart = catalog.Cart
    Else
      ucShoppingCart.Cart = Nothing
    End If
  End Sub

  Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
    Me.ucShoppingCart.HBXInfo_PageName = "ShoppingCart"
    Me.ucShoppingCart.HBXInfo_MLC = "ShoppingCart"
  End Sub
End Class
