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

Login to view store

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-14-2011, 08:14 AM
 
ccsventura ccsventura is offline
 

Newbie
  
Join Date: Jan 2011
Posts: 2
 

Default Login to view store

Hello,

I am attempting to use xcart to handle transactions for my wholesale customers. I have a link to the store from my main consumer site. Her is what I would like to do:

When someone clicks on the STORE link from the main site, I want to show a page that asks the user to login or register before seeing the store. Once they are logged in, the store becomes available.

I tried wrapping the entire home.tpl with the following:

{if $login ne ""}

ALL CODE FROM MAIN.TPL

{else}
<div align="center"><br /><br /><br />You must be logged in to your wholesale account to access the store. <br /><br />Dont have an account? Register Here<br /><br />{include file="customer/main/login_form.tpl"}</div>


This almost does the job. I get the challenge page and the login works, but if a user clicks on register or reset password, nothing happens.

Thanks for your help!

Garry
__________________
4.2
Quick Order
Reply With Quote
  #2  
Old 01-14-2011, 08:55 AM
 
balinor balinor is offline
 

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

Default Re: Login to view store

Just a quick comment on this - if you do this, the search engines won't be able to see your store either, thus eliminating a HUGE SEO opportunity. You sure you want to do this? You can just as easily hide the add to cart buttons and prices from non-logged in customers and still get the SEO benefit as well as potential new wholesale clients.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-14-2011, 09:10 AM
 
ccsventura ccsventura is offline
 

Newbie
  
Join Date: Jan 2011
Posts: 2
 

Default Re: Login to view store

Yes, we really only use the store as a tool for our wholesale customers. Thanks for the heads up though. Any suggestions for making the reset password and register links work?

Thanks,

Garry
__________________
4.2
Quick Order
Reply With Quote
  #4  
Old 01-20-2011, 05:18 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Login to view store

Try this code in "skin1/customer/home_main.tpl":
Code:
{else} {if $main eq "register"} {include file="customer/main/register.tpl"} {elseif $main eq "help" and $help_section eq "Password_Recovery"} {include file="customer/help/Password_Recovery.tpl"} {else} <div align="center"><br /><br /><br />You must be logged in to your wholesale account to access the store. <br /><br />Dont have an account? Register Here<br /><br />{include file="customer/main/login_form.tpl"}</div> {/if} {/if}
instead of:
Code:
{else} <div align="center"><br /><br /><br />You must be logged in to your wholesale account to access the store. <br /><br />Dont have an account? Register Here<br /><br />{include file="customer/main/login_form.tpl"}</div> {/if]
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
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 03:52 PM.

   

 
X-Cart forums © 2001-2020