Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 ASP (Windows server) versions
 No price unless login
Author « Topic »  

cciknives
Advanced Member

Canada
243 Posts

Posted - 08/06/2025 :  15:44:18  
I would like to set one of my websites with no pricing unless the account is logged in.

On the help pages I found this and it does not work for me, perhaps due to changes in the templates or I have done something wrong.

Tweaks
If you want to hide pricing and add to cart options from non logged in customers, add this to vsadmin/includes.asp

if SESSION("clientUser")<>"" then noprice=FALSE else noprice=TRUE
if SESSION("clientUser")<>"" then nobuyorcheckout=FALSE else nobuyorcheckout=TRUE

That means only logged in customers will see the price and buy / checkout buttons and those will be hidden from regular visitors.

This tweak is available for any of the parameters in includes.asp that you only want to apply to customers who are not logged into the store.


Can someone help with this?

Thanks, Peter


CCI - Tools for the Discriminating Chef

dbdave
ECT Moderator

USA
10563 Posts

Posted - 08/06/2025 :  16:36:52  
You can do all kinds of things with this, right in your includes.asp file.

I do it a little different as we only let customers with login level 1+ to see pricing and checkout.
I also alter the layout with this and you can put a message in place of where the price would be, indicating they need to login to to purchase.
As a matter of fact, you can include a login button so they can login right there without having to hunt for the link.

The issue with your code is clientuser is not what you want - it's clientID

if SESSION("clientID")<>"" then noprice=FALSE else noprice=TRUE
if SESSION("clientID")<>"" then nobuyorcheckout=FALSE else nobuyorcheckout=TRUE

So with my website, if they are logged in, they get this
nopriceanywhere=FALSE
noprice=false
detailpagelayout="navigation,productimage,productid,productname,<div class=""customseven""><span style=""font-weight:bold;text-transform: capitalize;"">Sizing Info: </span>%custom7%</div>,<div class=""customsix""><span style=""font-weight:bold;text-transform: capitalize;"">Country of Origin: </span>%custom6%</div>,price,quantitypricing,custom3,reviewstarslarge,options,instock,quantity,addtocart,<div class=""customfive"">%custom5%</div>,description,reviews,socialmedia"

if not, they get this
detailpagelayout="navigation,productimage,productid,productname,custom3,reviewstarslarge,price,<div class=""detailquantity"" style=""text-align:center;font-size:18px;color:black;text-transform: capitalize;"">Account Registration Required to view Discounts and Purchase<br><button type=""button"" class=""ectbutton"" style=""text-transform: capitalize;"" onclick=""window.location.href='cust-signup.asp'"">Signup Here</button><br><br><button type=""button"" class=""ectbutton"" style=""text-transform: capitalize;"" onclick=""displayloginaccount()"">Login Here</button></div>,description,reviews"


Note, I have a custom signup page, but you can link to the create account like this - onclick="return displaynewaccount()"

Enjoy
Thanks,
David




Edited by - dbdave on 08/06/2025 16:38:42

cciknives
Advanced Member

Canada
243 Posts

Posted - 08/06/2025 :  17:05:33  
Thanks Dave, that is great information and I certainly will give it a try.

Question: Where would the onclick="return displaynewaccount()" go?

Best regards, Peter

CCI - Tools for the Discriminating Chef

dbdave
ECT Moderator

USA
10563 Posts

Posted - 08/06/2025 :  17:12:10  
quote:
Question: Where would the onclick="return displaynewaccount()" go?


We it depends if you want to use it and where?
I use it in place of the quantity discounts by inserting it in place of that and giving it the same class (detailquantity) so it has the same positioning.

In my example, it would go something like this

detailpagelayout="navigation,productimage,productid,productname,reviewstarslarge,<div class=""detailquantity"" style=""text-align:center;font-size:18px;color:black;text-transform: capitalize;"">Account Registration Required to view Discounts and Purchase<br><button type=""button"" class=""ectbutton"" style=""text-transform: capitalize;"" onclick=""return displaynewaccount()"">Signup Here</button><br><br><button type=""button"" class=""ectbutton"" style=""text-transform: capitalize;"" onclick=""displayloginaccount()"">Login Here</button></div>,description,reviews"

David



Edited by - dbdave on 08/06/2025 17:15:25
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000