protected void Page_Load(object sender, EventArgs e) { PopulatePaymentButtons(); if (CatalogUtilities.IsCatalogMode()) { //************ do something ***************** } }
protected bool IsBuyButtonVisible(object productID) { Product product = DataAccessContext.ProductRepository.GetOne( StoreContext.Culture, (string)productID, new StoreRetriever().GetCurrentStoreID()); if (!CatalogUtilities.IsCatalogMode() && !Vevo.CatalogUtilities.IsOutOfStock(product.SumStock, product.UseInventory) && IsAuthorizedToViewPrice(product.IsCallForPrice)) { return(true); } return(false); }
protected bool VisibleQuantity(int sumStock, bool useInventory) { if (!IsAuthorizedToViewPrice()) { return(false); } if (!CatalogUtilities.IsCatalogMode() && CatalogUtilities.IsOutOfStock(sumStock, useInventory)) { return(false); } else { return(true); } }
private void SetupGiftDetail() { Product product = DataAccessContext.ProductRepository.GetOne(StoreContext.Culture, ProductID, new StoreRetriever().GetCurrentStoreID()); if (!product.IsGiftCertificate || IsElectronicOnlyGiftCertificate(product) || CatalogUtilities.IsCatalogMode()) { uxNeedPhysicalGCP.Visible = false; uxRecipientTR.Visible = false; uxPersonalNoteTR.Visible = false; } else { uxGiftCertificateComponentsPanel.Visible = true; uxNeedPhysicalGCP.Visible = true; if (uxNeedPhysicalGCCheck.Checked) { uxRecipientTR.Visible = true; uxPersonalNoteTR.Visible = true; } else { uxRecipientTR.Visible = false; uxPersonalNoteTR.Visible = false; } } if (product.IsFixedPrice) { uxGiftAmountTR.Visible = false; if (!uxNeedPhysicalGCP.Visible && !uxRecipientTR.Visible && !uxPersonalNoteTR.Visible && !uxGiftAmountTR.Visible) { uxGiftCertificateComponentsPanel.Visible = false; } } else { uxGiftAmountTR.Visible = true; uxGiftCertificateComponentsPanel.Visible = true; } }
private void PopulateControls() { GiftRegistry giftRegistry = DataAccessContextDeluxe.GiftRegistryRepository.GetOne(GiftRegistryID); uxEventNameLable.Text = giftRegistry.EventName; uxEventDateLabel.Text = giftRegistry.EventDate.ToShortDateString(); if ((DataAccessContext.Configurations.GetBoolValue("PriceRequireLogin") && !Page.User.Identity.IsAuthenticated) || (CatalogUtilities.IsCatalogMode())) { uxGrid.Visible = false; uxAddToCartImageButton.Visible = false; } uxGrid.DataSource = DataAccessContextDeluxe.GiftRegistryItemRepository.GetAllByGiftRegistryID(GiftRegistryID); uxGrid.DataBind(); CheckCannotBuyItem(); }