Print Page | Close Window

Hide "Add To Cart" button until logged in

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=619
Printed Date: 25-February-2025 at 2:02pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hide "Add To Cart" button until logged in
Posted By: James
Subject: Hide "Add To Cart" button until logged in
Date Posted: 26-January-2007 at 5:47am
Hi, I wish the "Add To Cart" button to be unavailable until users have logged in.
Please can anybody tell me how to do this????



Replies:
Posted By: NWilliams
Date Posted: 28-January-2007 at 9:59pm
You need to make an if clause where the add to cart button is in the html and only write the html if session("idCusomter")<>"" or similar.  Check the code in the stock footer.asp file that determines whether it should show the 'account home' links and lift the determinant from there and apply it in the above case.


Posted By: James
Date Posted: 29-January-2007 at 6:43am

Can anyone help me with this code please... I need to modify it so that the Add To Cart button only shows when someone is logged in........

     ' // show add to cart
     
       '///////////////// ////////////////////////////////////////////
       '//  &nb sp;   ADD TO CART         &n bsp;//
       '///////////////// ////////////////////////////////////////////        
       '***************** ********************************************
       ' START: Add to Cart
       '***************** ********************************************
       pcs_AddtoCart
       '***************** ********************************************
       ' END: Add to Cart
       '***************** ********************************************



Posted By: netprofits
Date Posted: 29-January-2007 at 9:16am

As nwilliams mentioned above, you can use the code from footer.asp something like this...


if session("idCustomer")>"0" then
  pcs_AddToCart
end if



-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net