Template Changes in 1.2

This guide highlights each of the template changes made in the Shopp 1.2 built-in template files compared to how they existed up to Shopp 1.1.9 to help make the transition to Shopp 1.2 easier.

Guide Conventions

In order to clearly and completely detail what has changed this article will use the following conventions:

Each changeset is shown in reverse order working from the bottom of the template file back up to the top to help preserve line number references as accurately as possible.

The original default template lines are shown under the heading Original followed by the relative line numbers.

Line numbers are relative to the original default templates shipped with the Shopp 1.1.9 release. Custom markup or other code may shift the actual lines, in which case the original tag will need to be located to determine the proper location of the change.

Templates are listed in the order of functional importance so that you begin making the absolute minimum changes necessary to prevent functionality issues.

Change sets that are labelled with localization are only needed if translation to other languages is needed in the templates, otherwise they may be completely skipped (if English is the only language needed for the storefront).

New Template Files in 1.2

Shopp 1.2 introduces a number of new built-in templates. For themes that have Shopp content templates installed and enabled, when any of the new templates are missing the built-in templates in the Shopp plugin files are used automatically. To customize the new templates they will need to be copied to your theme. The easiest way to copy the new templates to your theme is from the WordPress Admin under Shopp → Setup → Presentation settings. Under the Theme Templates setting, Shopp will detect the missing theme files and provide a Re-install Missing Templates button. Click the button to copy only the missing template files to your theme, your other template files will remain untouched.

The following are the new templates added in 1.2:

account-downloads.php

account-orders.php

account-profile.php

email-order.php

email-shipped.php

email.css

login-recover.php

Discontinued Templates

In addition to adding new template files, the following template files are no longer used by Shopp in version 1.2:

notify.php

order.php

account.php

The account.php template now splits the different account dashboard views into their own template files including the new account-downloads.php, account-orders.php and account-profile.php. With the new Developer API added in 1.2, it is easy to register new account pages that will automatically use account-{name}.php structured template names to make it much easier to add new pages and customize their function and layout.

Preserving Customizations

In Shopp 1.1, the account.php template uses if() conditions to determine which layout to show. If you have customized those sections, it is best to copy your changes, section-by-section, into the corresponding new account-{name}.php template file.

To make these instructions easier to follow, the following walkthroughs are written to assume that you have used the Re-install Missing Templates process described above. Following the conventions of this guide, remember to work from the bottom of the file to the top.

Account Profile

Copy the entire code from below the if (...): line to above the endif; line.

Paste the copied code into the account-profile.php template file.

Remove the entire section (including the if() and endif; lines) from the account.php.

Remove the <form> elements

Remaining in the file are two <form> element lines that can be removed from the account.php template file as they are no longer necessary. The line numbers below refer to the remaining line numbers from the default account.php from Shopp 1.1.9 after removing the above sections.