You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the latest public release of the WP E-Commerce plugin and am trying to rewrite an old theme using Mythic as a base.
The plugin uses get_index_template() and get_query_template() which, as far as I can tell, return nothing using a Mythic theme.
This is the error:
Warning: include(): Filename cannot be empty in C:\Development\bookstore\wp-content\plugins\wp-e-commerce\wpsc-components\theme-engine-v1\helpers\page.php on line 1039
Warning: include(): Failed opening '' for inclusion (include_path='.;C:\php\pear') in C:\Development\bookstore\wp-content\plugins\wp-e-commerce\wpsc-components\theme-engine-v1\helpers\page.php on line 1039
This is the WP E-Commerce function in question:
// Template tags
function wpsc_all_products_on_page(){
if ( is_404() ) {
return;
}
global $wp_query,$wpsc_query;
do_action('wpsc_swap_the_template');
$products_page_id = wpsc_get_the_post_id_by_shortcode('[productspage]');
$term = get_query_var( 'wpsc_product_category' );
$tax_term = get_query_var( 'product_tag' );
$obj = $wp_query->get_queried_object();
$id = isset( $obj->ID ) ? $obj->ID : null;
if( get_query_var( 'post_type' ) == 'wpsc-product' || $term || $tax_term || ( $id == $products_page_id )){
$templates = array();
if ( $term && ! is_single() ) {
array_push( $templates, "taxonomy-wpsc_product_category-{$term}.php", 'taxonomy-wpsc_product_category.php' );
}
if ( $tax_term && ! is_single() ) {
array_push( $templates, "taxonomy-product_tag-{$tax_term}.php", 'taxonomy-product_tag.php' );
}
// Attempt to use the [productspage]'s custom page template as a higher priority than the normal page.php template
if ( false !== $productspage_page_template = get_post_meta($products_page_id, '_wp_page_template', true) )
array_push( $templates, $productspage_page_template );
array_push( $templates, 'page.php', 'single.php' );
if ( is_single() )
array_unshift( $templates, 'single-wpsc-product.php' );
// have to pass 'page' as the template type. This is lame, btw, and needs a rewrite in 4.0
if ( ! $template = get_query_template( 'page', $templates ) )
$template = get_index_template();
add_filter( 'thesis_custom_loop', 'wpsc_thesis_compat' );
include( $template );
exit;
}
}
I'm using the latest public release of the WP E-Commerce plugin and am trying to rewrite an old theme using Mythic as a base.
The plugin uses get_index_template() and get_query_template() which, as far as I can tell, return nothing using a Mythic theme.
This is the error:
This is the WP E-Commerce function in question:
I'm going to attempt a workaround similar to https://www.sean-barton.co.uk/2011/08/wp-ecommerce-template-redirect/ and perhaps it can be added to the Plugin Support section on the wiki.
The text was updated successfully, but these errors were encountered: