First of all, I'm a newbie to this forum, so sorry if i'm posting the thread to incorrect place.

I ve been trying to search for the usage of function wpsc_category_image() (WP e-commerce wordpress plug-in), there were some results but unfortunately I still cannot achieve what I expected.

I want to show all images of wpsc categories, and tried the below codes:

<div class="wpsc_categories wpsc_category_grid group">
<?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1));?>
<a  href="<?php wpsc_print_category_url();?>" 
    class="wpsc_category_grid_item <?php wpsc_print_category_classes_section(); ?>" 
    title="<?php wpsc_print_category_name();?>" 
    style="background:url(<?php echo wpsc_category_image(); ?>)">
</a>
<?php wpsc_end_category_query(); ?>

From what I have read from Internet, these codes should work fine, but somehow the function wpsc_category_image() returned nothing.

Could you guys please tell me the problem in this? I would be very appreciated, I promised my friend to help him make the website, but this is where I still got stuck

Recommended Answers

I don't "do" WP, but are you sure that the plug-in is loaded? Do you get any errors printed to the screen or when you look at "view source" in the browser?

Jump to Post

All 3 Replies

Member Avatar

I don't "do" WP, but are you sure that the plug-in is loaded? Do you get any errors printed to the screen or when you look at "view source" in the browser?

Thanks for your answer, but I'm sure the plugin loaded, as I can use other function like <?php echo wpsc_print_category_image() ?> and they worked fine

Member Avatar

I'm assuming that the wps_category_image should return a filename from the database. Is there a filename in that table's fieldname?

If there is, then perhaps it's an issue with the function itself. You may need to find the function and look into the guts of it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.