WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Mar 31 2011

How to Make a Private eCommerce Store Using Shopp

So one person asked if I could make Shopp available for users who have a registered customer login that they control. So the first thing you have to do is setup Shopp on the backend by allowing Customer Accounts via Shopp > Settings > Checkout. I always select Enable Account Logins integrated with WordPress Accounts just in case the person wants to move towards some sort of Client Portal as well.

Then in Shopp > Settings > Presentation, I used Enable theme templates, which enables me to edit some files without having to worry about hacking core (never hack core!) to customize the way I want it. So then I open my catalog.php template file. As you can see the catalog.php template consists of only one line.

[php]<?php shopp('catalog','catalog-products'); ?>[/php]

Then I open login.php template file, which contains the login information I need for a private ecommerce store for my customers, or my invite-only elite customers. I copy the entire file and paste it with my catalog.php. Then I add one line ahead of the login.php file:
[php]if( ! shopp('customer','loggedin')) {
//login.php login form code
}
else
shopp('catalog','catalog-products');
[/php]

Don't forget that you may also want to hide/unregister your sidebars, or if you are using a genesis theme you can force a content only layout.

So now my store page which calls the shortcode [ catalog ] will now refer to my edited template forcing customers to login before they can see anything. Since I have my customers connected to WordPress accounts, I could also refer customers to the WordPress login screen. Since my store was a bit more complicated as I used a secondary menu system (full of custom links referring to Shopp Categories), connecting customers to WordPress accounts made making the menu system workable. For the front page, I created a fake WordPress custom menu and upon login, the menu system was replaced with a live custom menu, which I talk about here.

Written by Travis Smith · Categorized: Plugins, Tutorials

StudioPress Premium WordPress Themes     WP Engine Managed WordPress Hosting

What can I do for you!?

Custom Development

We develop plugins by determining both business/functional and technical requirements, following WordPress development best practices, and using agile methodology to ensure you get the best solution.

Consulting

Have questions? Need a reliable developer to consult? Please contact us today!

Customized Theme

We can customize your theme or child theme, or create a child theme for you based on your needs while enhancing the performance of every individual attribute.

Customized Plugin

We can customize your plugins, extend plugins (e.g., Gravity Forms, Jetpack, Soliloquy) based on your needs ensuring security, performance, and positive business impact.

Contact Us

About Travis Smith

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

Comments

  1. Gijs says

    June 11, 2012 at 10:03 am

    Hi Travis,
    I’m trying to follow your directions but don’t seem to get any further.

    you say i have to paste the complete content of login.php in between the brackets of the new catalog.php.
    This gives me an error.

    can’t you poste a complete sample?

    greetings
    Gijs

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in