Title: WP E-Commerce requires [productspage] shortcode
Last modified: August 20, 2016

---

# WP E-Commerce requires [productspage] shortcode

 *  [Vincent Robic](https://wordpress.org/support/users/vrobic/)
 * (@vrobic)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/wp-e-commerce-requires-productspage-shortcode/)
 * Hi,
 * I found something that could be improved in the plugin. Here are the steps to
   reproduce the bug:
    - I removed the [productspage] shortcode from the Products page.
    - For some reason, I prefer to use a custom page template that programmatically
      calls do_shortcode(‘[wpsc_products]’);
 * The result is that this **breaks the home page**, by displaying page.php.
 * I first thought that was a permalinks issue. Then I read [in this thread](http://wordpress.org/support/topic/every-page-in-website-replaced-with-product-page?replies=13#post-2902283)
   that “WPeC currently depends on the existence (and published status) of a few
   pages – the products page is one of them.”.
 * Indeed, the problem comes from the wpsc_all_products_on_page() function, where
   $id and $products_page_id are evaluated to null, since wpsc_get_the_post_id_by_shortcode(‘[
   productspage]’) was not found. (you might take a look to wpsc-includes/theme.
   functions.php to understand)
 * In my opinion, testing for the presence of the products page is not a good thing.
   I am aware that WP E-Commerce comes as a _ready to use_ plugin, and might not
   be customized that way.
 * A workaround was to remove wpsc_all_products_on_page() hook using : remove_action(‘
   template_redirect’, ‘wpsc_all_products_on_page’ );
 * I created this thread since I couldn’t find any similar problem in the WP E-Commerce
   forums.
 * [http://wordpress.org/extend/plugins/wp-e-commerce/](http://wordpress.org/extend/plugins/wp-e-commerce/)

Viewing 1 replies (of 1 total)

 *  [aidenb](https://wordpress.org/support/users/aidenb/)
 * (@aidenb)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/wp-e-commerce-requires-productspage-shortcode/#post-3352912)
 * Thanks Vincent, that’s been very helpful!

Viewing 1 replies (of 1 total)

The topic ‘WP E-Commerce requires [productspage] shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-e-commerce_ebebeb.svg)
 * [WP eCommerce](https://wordpress.org/plugins/wp-e-commerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-e-commerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-e-commerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-e-commerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-e-commerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-e-commerce/reviews/)

## Tags

 * [front page](https://wordpress.org/support/topic-tag/front-page/)
 * [home](https://wordpress.org/support/topic-tag/home/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 1 reply
 * 2 participants
 * Last reply from: [aidenb](https://wordpress.org/support/users/aidenb/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/wp-e-commerce-requires-productspage-shortcode/#post-3352912)
 * Status: not resolved