X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Login to view store (https://forum.x-cart.com/showthread.php?t=57526)

ccsventura 01-14-2011 08:14 AM

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

balinor 01-14-2011 08:55 AM

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.

ccsventura 01-14-2011 09:10 AM

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

qualiteam 01-20-2011 05:18 AM

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]



All times are GMT -8. The time now is 03:48 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.