| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
View Only - Until logged in | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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 |
|||||||
#3
|
|||||||
|
|||||||
![]() done it thanks
__________________
Cheers Stuart ----------------------- X-Cart Version Gold 5.4.2 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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 |
|||||||
#5
|
|||||||
|
|||||||
![]() 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 |
|||||||
#6
|
|||||||
|
|||||||
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#7
|
|||||||
|
|||||||
![]() 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 |
|||||||
#8
|
|||||||
|
|||||||
![]() 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 |
|||||||
#9
|
|||||||
|
|||||||
![]() 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 |
|||||||
#10
|
|||||||
|
|||||||
![]() May need to clear your template cache to see the changes.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|