Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author zorgbargle

    (@zorgbargle)

    Hi,

    The WP e-Commerce Featured Product widget uses one of 2 methods to determine the img src:
    1) if full-size is selected, the WordPress function wp_get_attachment_url is used.
    2) if thumbnail size or custom size is selected, the WP e-Commerce function wpsc_product_image is used.
    From the URL you included, it looks like method 2 is being used, but I’m not sure why the image is not working. I would not expect the URL to point directly to the image in the uploads folder however, because this would be the full-size version.
    Could you try selected different sizes and see if you can narrow down the situations where the error occurs?
    Also, does the error occur if you choose a specific product rather than using the random feature?
    Lastly, are you using the current version of WP e-Commerce?

    Thanks,
    Z

    Thread Starter bircha

    (@bircha)

    Hi,

    I have the latest version of WP, WP e-Commerce and the Featured Product plugin that are available through WP. I am also using the “Allow PHP in Content” plugin as I have registered the widget area within the content area of the page.

    The error does not occur when the widget shows specific products.

    I’ve specified that the widget shows the images in 300x300px size which is also the native size of the featured product images.

    Plugin Author zorgbargle

    (@zorgbargle)

    Hi,

    Thanks for the extra information. I suspect the issue may be related to using the widget within the content area (with the “Allow PHP in Content” plugin). Could you confirm if the issue occurs when you use the widget in a standard widget area without the use of the PHP Content plugin?

    Also, could you provide the php code that you add to your content area to allow the widget to be included? I will need this in order to try and reproduce the problem on my dev machine.

    Thanks,
    Z

    Thread Starter bircha

    (@bircha)

    Hi,

    The issue occurs also when the widget is used in the normal footer areas.

    This is how I use the widget:

    In functions.php I’ll register the sidebar e.g.

    <?php
    	register_sidebar( array(
    		'name' => __( 'Frontpage Content Area', 'twentyeleven' ),
    		'id' => 'sidebar-7',
    		'description' => __( 'An optional widget area for your site content', 'twentyeleven' ),
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget' => '</div>',
    		'before_title' => '<h2 class="widget-title">',
    		'after_title' => '</h2>',
    	) );
    ?>

    An then in the content area I’ll insert the sidebar like this

    <!-- Sidebar 7 -->
    			<?php if ( is_active_sidebar( 'sidebar-7' ) ) : ?>
    			<div class="content-widget-area">
    				<?php dynamic_sidebar( 'sidebar-7' ); ?>
    			</div>
    			<?php endif; ?>
    Plugin Author zorgbargle

    (@zorgbargle)

    Hi,

    Unfortunately I have still not been able to reproduce this issue. Another thing to try is:
    1) Using the random feature, when an image is not displayed, copy the img src attribute (as you described in your first message), and take note of which product should be displayed.
    2) Change the widget to display the product from step 1 – as you indicated previously, this should display the product image correctly. Ensure that the same sizing options are used.
    3) Compare the img src attribute with step 1 – these should normally be the same, but in your case I assume they’re not.

    Hopefully this will give me a bit of a clue as to what’s going wrong.

    Thanks,
    Z

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP e-Commerce Featured Product] Widget does not always show images’ is closed to new replies.