• Resolved tfx22

    (@tfx22)


    Hi Guys – im having trouble with WP ecommerce thumbnail images

    if you look at https://happyhealthyandinspired.com.au/products-page/

    and look at the area that was supposed to be an image on the left of the text you will see what i mean – if i view the product in single product view it works no worries, but in product view the image does not work.

    if i turn thumbnails off in the store settings it goes away alltogether (no image). in the source it appears that the <a ref is malformed

    additional (and perhaps related) i dont have an ADD FEATURE IMAGE area on my products page.

    any ideas? ive spent a whole day trying to work around this issue.

    Tony

    https://www.ads-software.com/plugins/wp-e-commerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • check wpsc-product_page.php template.. the original code is

    <?php if(wpsc_show_thumbnails()) :?>
    	<div class="imagecol" style="width:<?php echo $image_width; ?>;" id="imagecol_<?php echo wpsc_the_product_id(); ?>">
    	<?php if(wpsc_the_product_thumbnail()) :
    		?>
    	<a rel="<?php echo wpsc_the_product_title(); ?>" class="<?php echo wpsc_the_product_image_link_classes(); ?>" href="<?php echo esc_url( wpsc_the_product_image() ); ?>">
    	<img class="product_image" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="<?php echo wpsc_the_product_title(); ?>" title="<?php echo wpsc_the_product_title(); ?>" src="<?php echo wpsc_the_product_thumbnail(); ?>"/>
      </a>
    <?php else: ?>
      <a href="<?php echo esc_url( wpsc_the_product_permalink() ); ?>">
    	<img class="no-image" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="<?php esc_attr_e( 'No Image', 'wpsc' ); ?>" title="<?php echo wpsc_the_product_title(); ?>" src="<?php echo WPSC_CORE_THEME_URL; ?>wpsc-images/noimage.png" width="<?php echo get_option('product_image_width'); ?>" height="<?php echo get_option('product_image_height'); ?>" />
       </a>
    <?php endif; ?>
    	<?php  if(gold_cart_display_gallery()) :
    		echo gold_shpcrt_display_gallery(wpsc_the_product_id(), true);
    		   endif; ?>
      </div><!--close imagecol-->
    <?php endif; ?>

    as I mentioned about wpsc-product_page.php

    I wrote test code for you..

    vphreak.net/php/

    so you can see the difference, your problem is w/ <span> tag in your product_title area. I’m not sure about your level of php. but it’s a starting point for you to figure it out.

    if you couldn’t figure out the span tag. I suspect that there’s filter applying to this..
    such as
    apply_filter(“the_title”);

    you can fix this by doing strip_tags( ); function

    example here:

    <?php echo strip_tags(wpsc_the_product_title()); ?>

    Thread Starter tfx22

    (@tfx22)

    Hi Paul – thanks so much mate … ill give it a go and see what happens

    Tony

    Thread Starter tfx22

    (@tfx22)

    Hi Paul .. alas, while I am a seasoned cludger, I am not a PHP coder.

    Could i trouble you to point me at the name of the file i should edit to somehow strip that pesky <span line out.

    Tony

    that’s ok..

    the file is wpsc-product_page.php

    just run a search for wpsc_the_product_title() then wrap it w/ strip_tags();

    example:

    strip_tags( wpsc_the_product_title( ) );

    Thread Starter tfx22

    (@tfx22)

    Paul – you are a total saint mate!

    after a few false starts, and one where the whole page disappeared, i added around 5 strip_tags to anything that looked like a rel link and finally on the very last tag the image appeared and the code disappeared.

    Blessed are the PHP coders, for they are truly fruitful & divine!

    thanks again mate!

    Tony

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP Ecommerce – manage image error’ is closed to new replies.