WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] empty image at the top of single product page (9 posts)

  1. nami44
    Member
    Posted 8 months ago #

    Hi there,
    I'd just upgraded my WP e-Commerce to 3.8.12.1, and when I verified the display on IE9 and Chrome, there is an empty image at the top of single product page (nothing on Firefox) just before breadcrumb, while on my category page, image is correctly displayed (I use Gold Cart Plugin).
    I think it's displayed with

    <?php
    global $wp_query;
    $image_width = get_option('product_image_width');
    $image_height = get_option('product_image_height');
    ?>

    Why it works on category page and it doesn't on single product page?
    And how can I remove this image from both pages?
    Any idea?

    http://wordpress.org/plugins/wp-e-commerce/

  2. nicknack
    Member
    Posted 8 months ago #

    Can you post a url?

  3. nami44
    Member
    Posted 8 months ago #

    Yes, nicknack!
    My category page is here: http://atelier-knits.com/shop/deco/
    and a single page: http://atelier-knits.com/shop/deco/oldforge/

    Thanks in advance :)

  4. nicknack
    Member
    Posted 8 months ago #

    Looks like your theme is using featured images at the top of each page.
    Your category pages have a featured image but your single product pages do not therefore there's nothing to show. Anything before this div grid_view_products_page_container is created by your theme so that's where I'd start looking rather than at the plugin.

  5. nami44
    Member
    Posted 8 months ago #

    First, thanks nicknack for your help!

    My theme is twenty twelve that actually uses featured images at the top of each page.
    So I commented out this code in content.php which is a part of single.php and page.php
    <?php the_post_thumbnail(); ?>
    That works on my blog posts (no image even when featured image is set), but does neither on product category page (featured image displayed) nor on my single product page (empty image).

    And when I remove featured image from my products, there is no image on product category page, but always this ungracefully empty image on single product page!

    Another problem: this featured image setting works on "product preview"! I have a featured image on preview page when this is set and no image when I remove this!

  6. nicknack
    Member
    Posted 8 months ago #

    Looks like <?php the_post_thumbnail(); ?> is also used in content-page.php as well, have you tried commenting it out from there to see what happens?

  7. nami44
    Member
    Posted 8 months ago #

    WOW! It happens that it works!
    Thanks infinitely nicknack :)

    By the way, trying to find the code displaying featured images, I've found this in wpsc-functions.
    `function wpsc_check_thumbnail_support() {
    if ( !current_theme_supports( 'post-thumbnails' ) ) {
    add_theme_support( 'post-thumbnails' );
    add_action( 'init', 'wpsc_remove_post_type_thumbnail_support' );
    }
    }
    add_action( 'after_setup_theme', 'wpsc_check_thumbnail_support', 99 );

    function wpsc_remove_post_type_thumbnail_support() {
    remove_post_type_support( 'post', 'thumbnail' );
    remove_post_type_support( 'page', 'thumbnail' );
    }
    '
    This would replace the wpsc's featured image support by the theme support? (I'm newbie in php!)

  8. nicknack
    Member
    Posted 8 months ago #

    Yes that looks like it's 'turning on' featured images if it's not already in a theme's functions.php file.
    Although your issue was theme related rather than plugin related

  9. nami44
    Member
    Posted 8 months ago #

    Definitely. Thank you for your help!

Reply

You must log in to post.

About this Plugin

About this Topic