Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

View Only - Until logged in

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-02-2007, 01:40 PM
 
stuartn stuartn is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 48
 

Default View Only - Until logged in

I bet thas been covered but I can't seem to find a thread for it.

What I want to achieve is that people can view and see the pricing, but cannot buy until they log in.

Has someone got a link for a thread that achieves this ?

Thanks in advance for your help.
__________________
Cheers
Stuart
-----------------------
X-Cart Version
Gold 5.4.2
Reply With Quote
  #2  
Old 04-02-2007, 01:57 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: View Only - Until logged in

Hi Stuart, can you please update your signature with your X-Cart version? Each version is completely different and the answers you receive depend on the version you have. Thanks!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-02-2007, 05:11 PM
 
stuartn stuartn is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 48
 

Default Re: View Only - Until logged in

done it thanks
__________________
Cheers
Stuart
-----------------------
X-Cart Version
Gold 5.4.2
Reply With Quote
  #4  
Old 04-02-2007, 06:27 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: View Only - Until logged in

Ok, just surround the buy now and add to cart buttons with an {if} statement like this:

{if login ne ""}

code for button

{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-03-2007, 03:31 AM
 
stuartn stuartn is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 48
 

Default Re: View Only - Until logged in

Thanks do you know which templates this relates to....

off the top of my head as I'm at work.

Products Detailed & Buy Now
__________________
Cheers
Stuart
-----------------------
X-Cart Version
Gold 5.4.2
Reply With Quote
  #6  
Old 04-03-2007, 03:52 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: View Only - Until logged in

All the info you need is right here:

http://forum.x-cart.com/showthread.php?t=21529
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 04-03-2007, 02:19 PM
 
stuartn stuartn is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 48
 

Default Re: View Only - Until logged in

Had a look at your thread which makes sense....altered

customer/main/product.tpl - I have made some minor changes to the templates in the past in terms of positioning and coding I can cope with at a minor level at the beginning and then I seem to pick it up quick.

So I opened the template with Notepad ++ and found the code for Add to Cart and pasted you code top and bottom.

{if login ne ""}
<form name="orderform" method="post" action="cart.php?mode=add" onsubmit="javascript: return FormValidation();">
{/if}

Still the add to cart is showing..Its looks okay to me but maybe I'm missing something here.
__________________
Cheers
Stuart
-----------------------
X-Cart Version
Gold 5.4.2
Reply With Quote
  #8  
Old 04-03-2007, 02:28 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: View Only - Until logged in

You need to surround the button, you surrounded the form line only. The button on product.tpl is this:

{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 04-03-2007, 03:27 PM
 
stuartn stuartn is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 48
 

Default Re: View Only - Until logged in

Did it...

<td>
{if login ne ""}{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}{/if}</td>

But still not working.
__________________
Cheers
Stuart
-----------------------
X-Cart Version
Gold 5.4.2
Reply With Quote
  #10  
Old 04-03-2007, 03:52 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: View Only - Until logged in

May need to clear your template cache to see the changes.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:16 AM.

   

 
X-Cart forums © 2001-2020