Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

How to create a Private Shopping Club with ProductCart

Overview

“Private Sales” are typically time limited, heavily discounted sales that are restricted to registered customers only. It's a business model that is proving to work quite well. Head over to our official ProductCart blog for a quick article on private sales, small business e-commerce, and how ProductCart can help. Then, come back here for detailed instructions!

We'll show you how to create a private shopping club using ProductCart.

Creating a private shopping club with ProductCart

A private shopping store in 5 minutes

Turning your openly accessible storefront into a private e-commerce store, accessible only by registered customers, will take you less than 5 minutes. It's the beauty of using a flexible, customizable e-commerce system like ProductCart!

Restricting access at the store level

Small edits to header.asp

First, we'll make some small edits to pc/header.asp (one of the two main interface files in ProductCart). The edits will trigger the following behavior:

  • If a customer is registered with the store, they are allowed to browse the catalog and shop
  • If a customer is not registered with the store, they are shown a modal window to login. From there they can:
    • Login
    • Register a new account
  • If the customer clicks outside of the modal window, they are redirected to the main login page

To accomplish this:

  • Download the file “header.asp” from your storefront using your favorite FTP program
  • Make a back-up copy
  • Open it in Notepad or your favorite HTML editor
  • Locate the opening <BODY> tag and add the following line right below your main DIV:
    <!--#include file="inc_privateClub.asp"-->

  • For example, if you look at the source code of this demo store, you will notice the following code:

    <body>
    <div align="center" id="pcAddMain">
    	<!--#include file="inc_privateClub.asp"-->

  • Save the file.

Main DIV: if you don't have a DIV at the beginning of the body of your page, right below the opening <BODY> tag, add one now and assign the ID “pcAddMain” to it (you can use any unique ID, actually). If you do this - since you have added a DIV to the top of the code - you will now need to close it at the very bottom of pc/footer.asp, right above the closing </BODY> tag.

Small edits to inc_header.asp

  • Download the file “inc_header.asp” from your storefront using your favorite FTP program
  • Make a back-up copy
  • Open it in Notepad or your favorite HTML editor
  • Add the following to the end of the file:
    <%' START - Private Shopping Club %>
    <!--#include file="inc_privateClubCode.asp" -->
    <%' END - Private Shopping Club %>

  • Save the file.

New files

Upload to your storefront

Are you ready to turn your ecommerce store into a private shopping club?

  • Make sure that you have backed up the original versions of header.asp and inc_header.asp. If not, re-download the original files to a backup folder.
  • Upload the edited versions of the files to the “pc” folder, together with the 2 new files (inc_privateClub.asp and inc_privateClubCode.asp). So, to recap, you should be uploading the following 4 files to the “pc” folder:
    • header.asp
    • inc_header.asp
    • inc_privateClub.asp
    • inc_privateClubCode.asp
  • Load the storefront's home page: the modal window should load automatically

Turn off "Restore Cart" feature

To avoid an issue for returning customers, you need to turn off the store setting “Restore saved shopping cart on next visit”, which can be found under Settings > Store Settings > Miscellaneous.

Restricting access to "approved" customers only

Leveraging Customer Pricing Categories

In the “private shopping club” that you have created following the instructions listed above, any customer that registers with the store will be able to then access the storefront and purchase.

What if you wanted to “approve” customers? Easy to do in ProductCart.

With a simple code change, you can leverage Customer Pricing Categories and only allow access to the storefront if a customer belongs to a specific Customer Category. To implement this approach:

  • Decide which Customer Pricing Categories you will use
  • Locate the following code in “inc_PrivateClubCode.asp”:
    IF session("idCustomer")<> 0 THEN ' The customer has logged in. Don't show the modal.
    	pcShowLoginModal=0
    END IF

  • Replace:

    session("idCustomer")

  • With:

    session("customerCategory")

    … and change the number that you compare the variable with so that it uses the ID of that Customer Pricing Category.

Different prices once logged in

For example, let's assume that you want to allow the following customers to browse the store and purchase:

  • Silver Customer, 0% discount, ID of customer category = 2
  • Gold Customer, 15% discount, ID of customer category = 3
  • Platimum Customer, 20% discount, ID of customer category = 4

The code would now read…

IF session("customerCategory")<> 2 AND session("customerCategory")<> 3 AND session("customerCategory")<> 4 THEN ' The customer has logged in. Don't show the modal.
	pcShowLoginModal=0
END IF

If Mr. John Smith has been approved as a “Gold Customer”, when he logs in:

  • The code would recognize that he belongs to the “Gold Customer” category and set the corresponding session variable
  • Since the session is active, Mr. Smith would now have access to the storefront
  • Since he belongs to the “Gold Customer” category, he would enjoy an additional 15% discount

Restricting Access at the product/price level

Customers that have registered with the store are now able to log in, browse your catalog, and make purchases. You can further restrict access to products/prices and provide certain customers with additional benefits (e.g. frequent shoppers or customers that have purchased a certain amount of goods from you over a certain period of time).

Restricting Access at the product/price level

Please note that we do not provide technical support on the implementation of the Private Shopping Club feature so if you need additional help implementing this, please contact a ProductCart Reseller.


QR Code
QR Code How to create a Private Shopping Club with ProductCart (generated for current page)