phpShop 2.0

Contents:

  1. phpShop 2.0
  2. Installation
    1. Get the Code
    2. Install and Configure
  3. Upgrading
    1. Upgrading from another 2.x.x version
    2. Upgrading from phpShop 0.x.x
  4. Features
    1. Settings
    2. Countries
    3. Zones
    4. Taxes
    5. Shipping
    6. Payments
    7. Templates
      1. The Basics
    8. Localization

Installation

Get the Code

phpShop 2.0 is currently available for developers only. See more information on Getting the Code.

Install and Configure

Here are the detailed instructions.

  1. Download the distribution and uncompress in your web folder.
  2. Point your browser to the phpshop web folder, adding /install to the URL path.
  3. The installer will load and check your hosting environment for the system requirements.
  4. The installer then prompts to create your initial admin user.
  5. The installer finally creates the phpshop database.
  6. Done.

Upgrading

Upgrading from another 2.x.x version

We will publish instructions on upgrading from version to version with each distribution.

Upgrading from phpShop 0.x.x

This version of phpShop is profoundly different to previous versions. In fact, you could say it is almost completely different. Therefore, there is no convenient upgrade path.

However, phpShop 2.0 allows you to easily move existing categories and products over from csv flat files. We have not developed an exporter for previous versions, but it would not be difficult to do. The data is simply put in the proper format and imported into your new phpShop 2.0 installation. This will be forthcoming shortly after we release 2.0.

Features

Settings

See the settings proposal of variables that will be available globally.

Countries

These are the countries that you allow customers to purchase from. Each country can have a tax rate associated with it. Each country can have one or more shipping methods associated with it.

Zones

Define zones within a country. These are the zones that you allow customers to purchase from. Zones can have a tax rate associated with it.

Taxes

Taxes are set when defining countries and zones.

Shipping

Each country can have one or more shipping rates. phpShop calculates shipping based on weight. Each rate is a price for a given weight range.

Payments

Payment processing occurs at the moment of checkout. phpShop currently support PayPal as its only payment processing service.

Templates

phpShop uses two templates:

  • store template
  • admin template

phpShop uses CakePHP layouts which are explained at http://manual.cakephp.org/chapter/views.

The Basics

A layout contains all the presentational code that wraps around a view.

Layout files are placed in /app/views/layouts.

When you create a layout, you need to tell Cake where to place your controller view code: to do so, make sure your layout includes a place for $content_for_layout (and optionally, $title_for_layout). Here's an example of what a default layout might look like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title_for_layout?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>

<!-- If you'd like some sort of menu to show up on all of your views, include it here -->
<div id="header">
    <div id="menu">...</div>
</div>

<!-- Here's where I want my views to be displayed -->
<?php echo $content_for_layout ?>

<!-- Add a footer to each displayed page -->
<div id="footer">...</div>

</body>
</html>

To set the title for the layout, it's easiest to do so in the controller, using the $pageTitle controller variable.

class UsersController extends AppController
{
    function viewActive()
    {
        $this->pageTitle = 'View Active Users';
    }
}

Localization

We have stick to the KISS principal. phpShop 2.0 allows multiple languages and locales for the web interface.

It does NOT provide for multiple languages in the database data.

This means that phpShop can be used in one language only. You cannot, for example, have a site were a user selects the language and all text, include product information, also changes language.

Someone may one day contribute a plugin that accomplishes this, but it will not be part of the standard phpShop feature set.

Idea:: A possible solution is to write all product descriptions, etc. in multiple languages in the same data fields. Users would see a longer description written in two languages.