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

Password protect register

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-16-2009, 07:49 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Password protect register

I need direction from the experts to get this working. I'm creating a X-Cart login page that will be redirected from our website menubar link. Within the new login page I want to password protect the register link on that page. I've found the javascript to password protect, though the instructions are to put the script within the <body> tags of my webpage. Since X-Cart uses the .tpl and .php files to compile a webpage I believe I would add the .js link in my new login template, but I need help to get the Smarty tags to call out the password protect .js file for the register.php. Any suggestions?

Christine
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #2  
Old 02-04-2009, 11:34 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Password protect register

Anyone have suggestions? Does anyone have a password protect script suitable for X-Cart?
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #3  
Old 02-04-2009, 11:11 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Password protect register

are you using a static page for the new log in page?
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 02-05-2009, 05:43 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Password protect register

Thanks for the reply Ashley. Static page, I haven't tried that avenue. I got the mod working now from the "My Account Login" as a separate login page. Because we sell wholesale to approved dealers and resellers, we have a need to keep registration to those who complete the approval process. I tried a free javascript password protect form, but I couldn't get that script to work in an html page that I tested from our website with using the register.php as the url. Do you have something that will work in Xcart?

Quote:
Originally Posted by Ashley
are you using a static page for the new log in page?
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #5  
Old 02-05-2009, 06:28 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Password protect register

No I really don't. Was just going to try and help you get the other one working.
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 02-06-2009, 10:50 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Password protect register

I appreciate you trying to help with this. This is what I've started with to get the form layout; and once the username and password are typed in, my page does go to a blank page, however, it doesn't open the url designated in the passwdprotect.php. Obviously I haven't used the right code to make it happen. Any suggestions?

this is what I've added to my auth_mod.tpl:
<div style="padding-top:30px"></div>
<div id="RegisterSection">
<p id="RegisterText">If you are an approved Dealer and have not completed the Online Dealer Store registration process, please enter access code below.</p>

<form action="{$form_url}/include/passwdprotect.php" method="post" name="form">
<p style="padding-top:8px"></p>
<p id="RegisterText"><strong>Username:</strong><b style="padding-right:13px"></b><input type="text" title="Username" name="txtUsername2" /></p>
<p style="padding-top:8px"></p>
<p id="RegisterText"><b style="padding-left:31px"></b><strong>Code:</strong><b style="padding-right:14px"></b><input type="password" title="Password" name="txtPassword2" /></p>
<p style="padding-bottom:12px"></p><br /><br /><br />
<p id="RegisterText"><strong>Register:</strong><b style="padding-right:14px"></b><br /><input type="submit" name="Register" value="Register" /></p>
</form>

</div>
</td>

</TABLE>
</div>
{/capture}
{ include file="menu_mod.tpl" menu_title=<!--$lng.lbl_authentication--> menu_content=$smarty.capture.menu }

this is what I've tried to tweak in the passwdprotect.php file:
<?php


// Define your username and password

$username2 = "someusernamehere";

$password2 = "somepasswordhere";


if ($_POST['txtUsername2'] != $username || $_POST['txtPassword2'] != $password) {


?>


<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

<p id="RegisterText"><label for="txtUsername2">Username:</label>

<br /><input type="text" title="Username" name="txtUsername2" /></p>

<p id="RegisterText"><label for="txtpassword2">Code:</label>

<br /><input type="password" title="Password" name="txtPassword2" /></p>

<p><input type="submit" name="Register" value="Register" /></p>

</form>

("Location: "http://www.webaddress.com/");

<?php


}

else {


?>


<?php


}


?>


Quote:
Originally Posted by Ashley
No I really don't. Was just going to try and help you get the other one working.
Attached Thumbnails
Click image for larger version

Name:	Register.jpg
Views:	166
Size:	100.5 KB
ID:	1352  
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #7  
Old 02-07-2009, 07:46 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Password protect register

I am having a hard time figuring out why you are doing all of this. It appears that you want only "approved" dealers to purchase from you.

Can you not just create a membership level and then in admin - general options "Enable sign-up for membership"? By making all of your products (and/or categories) a certain membership level they will not be visible except to "members" of that membership level once they have logged in.

You can have them directed to a page where they can download your "Application.pdf" and once they have completed your process you can approve their membership and place them accordingly.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #8  
Old 02-07-2009, 11:20 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Password protect register

Yes, already done all of what you mentioned. I have implemented no price showing unless they login, membership levels and in the admin. made it so that anyone who registers are automatically suspended until they are approved so that a.) no one can select a membership level and b.) unless they have completed the credit approval process, they will not have access to the pricing of our store. I have also created an editable downloadable (pdf) application, which is part of the image that I attached in my previous post.

The reason why we would want to have the register.php password protected is because it would be a waste of time for myself as admin. to weed through those who register and will never complete the credit process to those who have completed the process and are now waiting to have full access to our store. Because we sell CCTV products for security/surveillance, the everyday person and small business owner may want our products, though they will need to go through an authorized dealer/reseller to make the purchase as we sell wholesale only. We want to reach potential new customers, dealers and resellers with showcasing our products in our store, but no pricing will show unless they login (which means they must be approved, and register to view the pricing online). Because of our unique business, why wouldn't we want to have the "register" for a store account to view pricing as an invite only after a new customer has gone through the credit process?

Quote:
Originally Posted by JWait
I am having a hard time figuring out why you are doing all of this. It appears that you want only "approved" dealers to purchase from you.

Can you not just create a membership level and then in admin - general options "Enable sign-up for membership"? By making all of your products (and/or categories) a certain membership level they will not be visible except to "members" of that membership level once they have logged in.

You can have them directed to a page where they can download your "Application.pdf" and once they have completed your process you can approve their membership and place them accordingly.
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #9  
Old 02-11-2009, 06:36 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Password protect register

Got this working with the help from balinor (Padraic). See his answer here:
http://forum.x-cart.com/showthread.php?p=247095#post247095

I used a free password protect javascript and form found online. With the custom My Account Login mod, I created the custom auth_mod.tpl to include register.php. I copied the entire javascript and form and paste it into my custom auth_mod.tpl. The final step was to add {literal} {/literal} before and after the free javascript.
{literal}
<script>
script code
</script>
{/literal}

With the script, there's a pop-up message alerting a correct login is needed for the register portion. This allows us to direct newly approved customers to the custom Login - Apply - Register page with a username and password to create an account for online shopping.

Thank you all for your input and suggestions.
Christine
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #10  
Old 03-22-2009, 06:45 PM
 
DISTINCT Corp DISTINCT Corp is offline
 

Newbie
  
Join Date: Mar 2009
Location: Australia
Posts: 6
 

Default Re: Password protect register

Quote:
Originally Posted by ChristineP
made it so that anyone who registers are automatically suspended until they are approved so that a.) no one can select a membership level and b.) unless they have completed the credit approval process, they will not have access to the pricing of our store.

Can someone explain to me how to set this up?

I'd like people to be able to sign up freely, but not be able to do anything until they have been 'approved' ie an admin setting their account to enabled.
__________________
XCart 4.2.1
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 05:25 PM.

   

 
X-Cart forums © 2001-2020