Templates

3.8 Template Files and Locations

In Wp e-Commerce 3.8 we have removed the 3 wp-e-commerce themes we used to support (iShop, MarketPlace, and Default) and replaced them with one default theme located in wp-e-commerce/wpsc-theme/. This does not mean that your old themes will not be used when you upgrade, however support for older themes are limited as some new functionality may rely on the new templates.

3.8 WP e-Commerce searches in 3 different places for templates. In order these are:

  1. Selected WordPress Theme Directory: wp-content/themes/selectedTheme
  2. Old Uploads Directory: wp-content/uploads/wpsc/themes/selectedTheme
  3. Wp e-Commerce Plugin Directory: wp-content/plugins/wp-e-commerce/wpsc-theme

We recommend that if you are going to be editting or creating a new wp-e-commerce theme, that you move ONLY the templates / css files that you are going to edit. That way the other templates will be updated when you update wp-e-commerce.

Developers Note: Please refer to the function wpsc_get_template_file_url in wp-e-commerce/wpsc-includes/theme.functions.php

Template Hierarchy

WP e-Commerce assumes your WordPress theme has a page.php, or a single.php or an index.php like any good WordPress theme should have.

Due to some limitations to the Custom Post Type system implemented by WordPress (for more information on this please read here) WP e-Commerce has an interesting job when rendering Products Pages. Infact most WP e-Commerce pages use two templates. One for the overall look of the site (The arrangements for Header, Sidebar, Content, Footer) and another for The Content section.

Developers Note: Please refer to the function wpsc_all_products_on_page in wp-e-commerce/wpsc-includes/theme.functions.php

Single Product Page

Main Template: For Single Products Pages WP e-Commerce first searches for single-wpsc-product.php if this does not exist then it will search for page.php.

the_content Template: Uses the template wpsc-single_product.php OR single_product.php.

Products Page (default)

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses the template wpsc-products_page.php OR products_page.php.

Products Page (list) *Gold Option

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses the template wpsc-list_view.php OR list_view.php.

Products Page (grid) *Gold Option

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses the template wpsc-grid_view.php OR grid_view.php.

Category Page

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses one of the above default, grid, and list templates

Checkout Page

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses the template wpsc-shopping_cart_page.php OR shopping_cart_page.php.

Cart Widget

Main Template: Does not have a main widget

Widget Template: Uses the template wpsc-cart_widget.php OR cart_widget.php.

Category Widget

Main Template: Does not have a main widget

Category Template: Uses the template wpsc-category_widget.php OR category_widget.php.

Featured Product

Main Template: Does not have a main widget

Featured Product Template: Uses the template wpsc-featured_product.php

Transaction Results Page

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses the template wpsc-transaction_results.php

Users Log Page

Main Template: Uses Page.php, single.php or index.php

the_content Template: Uses the template wpsc-user-log.php