Page 1 of 1

Make 'Hide Price' really hide the price!

Posted: Tue Mar 03, 2009 6:23 pm
by martinhenze
Nothing looks more like a mistake than a price of $0.00! Yet some vendors disallow the showing of pricing on the web and don't allow direct online ordering of certain items. They do, however, allow these items be displayed online without pricing and ordered by phone.

Checking 'Disable purchase' removes the 'Add to Basket' button, which is good. The 'Add to Wishlist' is also removed, which is not necessarily good.

Checking 'Hide Price' does hide the price -- BUT it replaces it with 'Click for pricing' link which displays the supposedly hidden price in a popup. This makes no sense!

I tried replacing the prices with 'CALL', but being a numeric field, it displays as $0.00.

Checking 'Hide Price' should totally hide the price and optionally replace it with text (Call 800-123-4567).

Checking 'Disable purchase' should give me the option to leave 'Add to Wishlist' enabled.

Martin

Re: Make 'Hide Price' really hide the price!

Posted: Sat Apr 18, 2009 11:23 am
by bemara579
I agree... AbleCommerce has got to be have most wackiest interpretation of "hide prices". If the admin is trying to hide a price, how does a popup link still mean hiding the price???

Re: Make 'Hide Price' really hide the price!

Posted: Sat Apr 18, 2009 11:40 am
by bemara579
by the way, you can disable the link in /ConLib/Utility/ProductPrice.acsx.cs

Add to the end of Page_Init:
ShowPriceLink.Enabled = false;

Re: Make 'Hide Price' really hide the price!

Posted: Sun Apr 19, 2009 9:08 am
by jmestep
I think the reason they did it that way is because it will allow a price to show when the merchant is not supposed to show on with a MAP pricing agreement, but they can show one if they don't "advertise" it.

Re: Make 'Hide Price' really hide the price!

Posted: Sun Apr 19, 2009 10:12 am
by afm
jmestep wrote:I think the reason they did it that way is because it will allow a price to show when the merchant is not supposed to show on with a MAP pricing agreement, but they can show one if they don't "advertise" it.
I think so too. This is the way Amazon displays 1000's of prices that are "hidden" due to MAP pricing rules. In my personal travels through the e-commerce world, I cannot recall ever seeing "call for price" in a situation that looked like MAP rules...or if I did, I left in such a hurry it left no lasting impression. I have seen many "call for price" products that require a quote because they have complicated pricing rules or the vendor is open to negotiation.

It makes sense to have an option to display text instead of price.

Re: Make 'Hide Price' really hide the price!

Posted: Thu Jul 09, 2009 1:02 pm
by RichWendrock
Is it possible to modify the code to check for a price of zero and display CALL FOR PRICING?

Re: Make 'Hide Price' really hide the price!

Posted: Tue Jul 14, 2009 10:10 am
by mazhar
RichWendrock wrote:Is it possible to modify the code to check for a price of zero and display CALL FOR PRICING?
Yes possible, you need to handle this in ConLib/Utilit/ProductPrice.ascx control

Re: Make 'Hide Price' really hide the price!

Posted: Tue Jul 14, 2009 10:12 am
by mazhar
RichWendrock wrote:Is it possible to modify the code to check for a price of zero and display CALL FOR PRICING?
Something like this
viewtopic.php?f=44&t=11519

Re: Make 'Hide Price' really hide the price!

Posted: Mon Jun 07, 2010 1:05 am
by AnthonyD
Hello.

I'm not a developer and I'm new to the ablecommerce cart. I need to hide the product prices to anonymous users and visible only to registered users. I don't know how to go about this, as I mentioned I'm very new to development work. So any assistance you could supply would be most appreciated.

Big thanks.

Re: Make 'Hide Price' really hide the price!

Posted: Mon Jun 07, 2010 3:17 am
by s_ismail
Where you want to show/hide products prices if in CategoryGridPage.ascx then locate this code

Code: Select all

<uc:ProductPrice ID="Price" runat="server" Product='<%#Container.DataItem%>' ShowRetailPrice="true" />
and replace with this code

Code: Select all

<uc:ProductPrice ID="Price" runat="server" Visible='<%# !Token.Instance.User.IsAnonymous %>' Product='<%#Container.DataItem%>' ShowRetailPrice="true" />
.

Re: Make 'Hide Price' really hide the price!

Posted: Mon Jun 07, 2010 9:35 am
by AnthonyD
@s_ismail: Many thanks!

Re: Make 'Hide Price' really hide the price!

Posted: Mon Jun 07, 2010 6:09 pm
by AnthonyD
s_ismail wrote:Where you want to show/hide products prices if in CategoryGridPage.ascx then locate this code

Code: Select all

<uc:ProductPrice ID="Price" runat="server" Product='<%#Container.DataItem%>' ShowRetailPrice="true" />
and replace with this code

Code: Select all

<uc:ProductPrice ID="Price" runat="server" Visible='<%# !Token.Instance.User.IsAnonymous %>' Product='<%#Container.DataItem%>' ShowRetailPrice="true" />
.
Hello.

I did as instructed but it still shows the price somehow. Could I have missed something?

Again, thanks.

Re: Make 'Hide Price' really hide the price!

Posted: Mon Jun 07, 2010 8:44 pm
by AnthonyD
The store has a one-page anonymous checkout. Does this need to be disabled or removed, in order to have the prices show only for registered users?

Re: Make 'Hide Price' really hide the price!

Posted: Tue Jun 08, 2010 3:39 am
by s_ismail
You need to put this Check

Code: Select all

Visible='<%# !Token.Instance.User.IsAnonymous %>' 

everywhere manually where product price is displayed.
But if you need only in OnePageCheckout.ascx
locate this code

Code: Select all

<asp:GridView ID="BasketGrid" runat="server" AutoGenerateColumns="False"
                                    ShowFooter="False" Width="100%" SkinID="PagedList">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Shipment">
                                            <ItemStyle HorizontalAlign="Center" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# GetShipmentNumber(Container.DataItem) %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="SKU">
                                            <ItemStyle HorizontalAlign="Center" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# ProductHelper.GetSKU(Container.DataItem) %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Item">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <ItemTemplate>
                                                <asp:PlaceHolder ID="ProductPanel" runat="server" Visible='<%#((OrderItemType)Eval("OrderItemType") == OrderItemType.Product)%>'>
                                                    <uc:BasketItemDetail id="BasketItemDetail1" runat="server" BasketItem='<%#(BasketItem)Container.DataItem%>' ShowAssets="true" ShowSubscription="true" LinkProducts="false" /><br />
                                                </asp:PlaceHolder>
                                                <asp:PlaceHolder ID="OtherPanel" runat="server" Visible='<%#((OrderItemType)Eval("OrderItemType") != OrderItemType.Product)%>' EnableViewState="false">
                                                    <%# Eval("Name") %>
                                                </asp:PlaceHolder>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Tax">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" Width="50px" />
                                            <ItemTemplate>
                                                <%#TaxHelper.GetTaxRate((BasketItem)Container.DataItem).ToString("0.####")%>%
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Price">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" Width="80px" />
                                            <ItemTemplate>
                                                <%#TaxHelper.GetInvoicePrice(Token.Instance.User.Basket, (BasketItem)Container.DataItem).ToString("ulc")%>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Qty">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# Eval("Quantity") %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Total">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" Width="80px" />
                                            <ItemTemplate>
                                                <%#TaxHelper.GetInvoiceExtendedPrice(Token.Instance.User.Basket, (BasketItem)Container.DataItem).ToString("ulc")%>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
then replace by this one

Code: Select all

<asp:GridView ID="BasketGrid" runat="server" AutoGenerateColumns="False"
                                    ShowFooter="False" Width="100%" SkinID="PagedList">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Shipment">
                                            <ItemStyle HorizontalAlign="Center" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# GetShipmentNumber(Container.DataItem) %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="SKU">
                                            <ItemStyle HorizontalAlign="Center" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# ProductHelper.GetSKU(Container.DataItem) %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Item">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <ItemTemplate>
                                                <asp:PlaceHolder ID="ProductPanel" runat="server" Visible='<%#((OrderItemType)Eval("OrderItemType") == OrderItemType.Product)%>'>
                                                    <uc:BasketItemDetail id="BasketItemDetail1" runat="server" BasketItem='<%#(BasketItem)Container.DataItem%>' ShowAssets="true" ShowSubscription="true" LinkProducts="false" /><br />
                                                </asp:PlaceHolder>
                                                <asp:PlaceHolder ID="OtherPanel" runat="server" Visible='<%#((OrderItemType)Eval("OrderItemType") != OrderItemType.Product)%>' EnableViewState="false">
                                                    <%# Eval("Name") %>
                                                </asp:PlaceHolder>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Tax">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" Width="50px" />
                                            <ItemTemplate>
                                                <%#TaxHelper.GetTaxRate((BasketItem)Container.DataItem).ToString("0.####")%>%
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Price">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" Width="80px" />
                                            <ItemTemplate>
                                            <asp:Panel ID="PricePanel" runat="server" Visible='<%# !Token.Instance.User.IsAnonymous %>'>
                                                <%#TaxHelper.GetInvoicePrice(Token.Instance.User.Basket, (BasketItem)Container.DataItem).ToString("ulc")%>
                                                </asp:Panel>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Qty">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# Eval("Quantity") %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Total">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" Width="80px" />
                                            <ItemTemplate>
                                            <asp:Panel ID="ExtendedPricePanel" runat="server" Visible='<%# !Token.Instance.User.IsAnonymous %>'>
                                                <%#TaxHelper.GetInvoiceExtendedPrice(Token.Instance.User.Basket, (BasketItem)Container.DataItem).ToString("ulc")%>
                                           </asp:Panel>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>

Re: Make 'Hide Price' really hide the price!

Posted: Tue Jun 08, 2010 7:32 pm
by AnthonyD
Thanks, s_ismail. I appreciate all the help. :)

But I ran into a snag, the prices of recently viewed items don't show even when logged in. :(

Re: Make 'Hide Price' really hide the price!

Posted: Wed Jun 09, 2010 6:25 am
by AnthonyD
Hello again.

Could you also help me as to what I could add to this line of code so that the price could be seen only if you were logged in?

Code: Select all

<uc:ProductPrice ID="OurPrice" runat="server" EnableDefaultKitProducts="false" />  
My knowledge here is vastly insufficient but I've began some tutorials and classes but it's still way over my head. Really big thanks.

Re: Make 'Hide Price' really hide the price!

Posted: Wed Jun 09, 2010 8:18 am
by s_ismail
Replace with this one

Code: Select all

<uc:ProductPrice ID="OurPrice" runat="server" EnableDefaultKitProducts="false"  Visible='<%# !Token.Instance.User.IsAnonymous %>' /> 

Re: Make 'Hide Price' really hide the price!

Posted: Wed Jun 09, 2010 9:18 am
by AnthonyD
Hey, thanks.

I replaced the code with what you suggested and the price still shows:
Image
Any idea how I can hide it when the user is not logged in? I may have supplied the wrong code to fix.

Thanks again. Really appreciate it.

Re: Make 'Hide Price' really hide the price!

Posted: Sat Jun 12, 2010 7:09 am
by s_ismail
You need to control it everywhere where price is displayed..
Give a try by this one.
Locate this code in 'buyproductdialog.ascx.cs'

Code: Select all

  if (!_Product.UseVariablePrice)
                {
                    trOurPrice.Visible = true;
                    trVariablePrice.Visible = false;
                }
and replace with this one

Code: Select all

 if (!_Product.UseVariablePrice)
                {
                    trOurPrice.Visible = !Token.Instance.User.IsAnonymous; 
                    trVariablePrice.Visible = false;
                }
.

Re: Make 'Hide Price' really hide the price!

Posted: Wed Jun 16, 2010 12:35 am
by AnthonyD
@s_ismail

Thanks! That worked out just fine.

Re: Make 'Hide Price' really hide the price!

Posted: Mon Jul 05, 2010 2:20 am
by AnthonyD
Hello.

Is there a code i can add to hide all prices and show them when the user is logged in? i would need some other items' prices hidden even when logged in. Thanks in advance for the help.

Re: Make 'Hide Price' really hide the price!

Posted: Thu Oct 07, 2010 1:55 pm
by tariqjamil
Is there any way to enable/disabled Recently Viewed item.

Re: Make 'Hide Price' really hide the price!

Posted: Fri Oct 08, 2010 4:33 am
by s_ismail
tariqjamil wrote:Is there any way to enable/disabled Recently Viewed item.
Go to Edit Screen of your page and comment out the code like

Code: Select all

 <!---[[ConLib:RecentlyViewed]]-->

Re: Make 'Hide Price' really hide the price!

Posted: Sat Oct 09, 2010 10:35 am
by plugables
s_ismail wrote:
tariqjamil wrote:Is there any way to enable/disabled Recently Viewed item.
Go to Edit Screen of your page and comment out the code like

Code: Select all

 <!---[[ConLib:RecentlyViewed]]-->
Or better remove it altogether.