Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Hiding gift cards at checkout (but not "special offers")

  1. #1
    maltschul is offline Junior Member
    Join Date
    May 2010
    Posts
    13

    Default Hiding gift cards at checkout (but not "special offers")

    I recently upgraded from AspDotNetStorefront from v8 to Multistore 9.3.1.1 and had problems hiding the "gift card" section of the checkout. On my store (www.cm4.com) my customers never use gift cards but often do have coupons (or promotions as they're now called). Many customers were confused as to which section to enter the promo/coupon code and often complained that the code didn't work (because they were entering it in the 'gift card' section). Because of this I wanted to hide just the gift card section.

    There is an appconfig called "DisallowCoupons", but that hides both the gift card and the promotion boxes. I still want the promotions boxes displayed.

    I don't have the source code or else I'd just comment out the lines and re compile.

    So to solve the problem (for now), I've used CSS to hide the gift card div with the following code in my CSS:

    /* Hiding gift card section of checkout via CSS */
    #ctl00_PageContent_pnlCoupon {
    display: none;
    }

    If anyone knows of a better solution to solving this problem, I'm all ears. Otherwise, maybe some of you will find this helpful.

    Cheers.

  2. #2
    bwarrior is offline Junior Member
    Join Date
    Mar 2013
    Posts
    15

    Default

    I would also like to know if there is a better solution. thanks.

  3. #3
    bwarrior is offline Junior Member
    Join Date
    Mar 2013
    Posts
    15

    Default

    I looked at this and it's rather easy, if you have the source code. You could do it with CSS as stated above but if you have the source code, why would you?

    If you go to shoppingcart.aspx.cs

    comment out: //pnlCoupon.Visible = pnlPromotion.Visible = true;

    then add below that line:
    pnlPromotion.Visible = true;
    pnlCoupon.Visible = false;

    Also find and comment out: //pnlCoupon.Visible = pnlPromotion.Visible = !cart.IsEmpty() && cart.CouponsAllowed;

    and add below:
    pnlPromotion.Visible = !cart.IsEmpty() && cart.CouponsAllowed;
    pnlCoupon.Visible = false;

    you could optionally leave out both pnlCoupon.Visible = false; lines and it will work fine. I added it to be a little more clear.

  4. #4
    maltschul is offline Junior Member
    Join Date
    May 2010
    Posts
    13

    Default

    Thanks for posting. A great solution for those of you who own source code. For rest of us, I guess we'll have to just use the CSS hack.