products_page.php

This page is a reference to all ‘Template tags’ used in your themes products_page.php file.

wpsc_has_breadcrumbs()

Returns: True or False depending on whether your shop is using breadcrumbs.
Parameters: None.
Usage: Used to check whether the breadcrumb code should be displayed.
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php if(wpsc_has_breadcrumbs()) : ?>
//breadcrumb code goes here
< ?php endif; ?>

wpsc_have_breadcrumbs()

Returns: True or False depending on whether your shop has breadcrumbs to loop through.
Parameters: None.
Usage: Used to loop through your breadcrumbs.
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php while (wpsc_have_breadcrumbs()) : ?>
//breadcrumb code goes in here
< ?php endwhile; ?>

wpsc_the_breadcrumb()

Returns: Nothing.
Parameters: None.
Usage: Used to iterate through the breadcrumbs
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php while (wpsc_have_breadcrumbs()) : ?>
wpsc_the_breadcrumb();
//use breadcrumb here
< ?php endwhile; ?>

wpsc_breadcrumb_url()

Returns: The breadcrumb URL.
Parameters: None.
Usage: Used to echo out the breadcrumb URL
Defined: wpsc-includes/wpsc_query.php

Example

 
<a href='<?php echo wpsc_breadcrumb_url(); ?>'>
//something in here will act as the link for this breadcrumb
</a> &raquo;

wpsc_breadcrumb_name()

Returns: The breadcrumb name.
Parameters: None.
Usage: Used to echo out the breadcrumb name
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php echo wpsc_breadcrumb_name(); ?>

wpsc_display_categories()

Returns: True or False depending on whether your site has show categories on products pages turned on.
Parameters: None.
Usage: Used to check whether categories should be shown on the products page.
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php if(wpsc_display_categories()): ?>

wpsc_start_category_query()

Returns: True or False depending on whether your site has show categories on products pages turned on.
Parameters:Associative Array, category_group and show_thumbnails.
The default parameters respectively are 1 and the set option for ’show_category_thumbnails’.
Usage: Gets passed the query and makes it into a global variable, then starts capturing the html for the category loop
Defined: wpsc-includes/category.functions.php

Example

 
< ?php wpsc_start_category_query(
   array('category_group'=> 1,
            'show_thumbnails'=>
             get_option('show_category_thumbnails'))); 
?>

wpsc_print_category_url()

Returns:URL of category
Parameters: None.
Usage: Used to echo out URLs for categories, Must be used inside the wpsc category loop.
Defined: wpsc-includes/category.functions.php

Example

 
<a href="<?php wpsc_print_category_url();?>"
class="wpsc_category_grid_item" title='
< ?php wpsc_print_category_name();?>'>
< ?php wpsc_print_category_image(45, 45); ?>
</a>

wpsc_print_category_name()

Returns:Category Name
Parameters: None.
Usage: Used to echo out category names, Must be used inside the wpsc category loop.
Defined: wpsc-includes/category.functions.php

Example

 
<a href="<?php wpsc_print_category_url();?>"
class="wpsc_category_grid_item" title='
< ?php wpsc_print_category_name();?>'>
< ?php wpsc_print_category_image(45, 45); ?>
</a>

wpsc_print_category_image(width, height)

Returns:Category Image
Parameters: Width (int), Height(int)
Usage: Used to echo out html image tag for gategory images, Must be used inside the wpsc category loop.
Defined: wpsc-includes/category.functions.php

Example

 
<a href="<?php wpsc_print_category_url();?>"
class="wpsc_category_grid_item" title='
< ?php wpsc_print_category_name();?>'>
< ?php wpsc_print_category_image(45, 45); ?>
</a>

wpsc_print_subcategory()

Returns:Places the shortcode for the subcategories,
Parameters: Container start and end HTML elements i.e

    ,

Usage: Used to echo out subcategories, Must be used inside the wpsc category loop.
Defined: wpsc-includes/category.functions.php

Example

 
< ?php wpsc_print_subcategory("", ""); ?>
OR
< ?php wpsc_print_subcategory("<ul>", ""); ?>

wpsc_end_category_query()

Returns:Nothing BUT outputs all the category HTML, Used at the end of the wpsc category loop.
Parameters: None
Usage: Used to echo outcategories HTML
Defined: wpsc-includes/category.functions.php

Example

 
< ?php wpsc_end_category_query(); ?>

wpsc_display_products()

Returns: Boolean, True or False depending on whether Products are to be displayed or not
Parameters: None
Usage: Used to determine whether products should be displayed or not.
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php if(wpsc_display_products()): ?>

wpsc_category_image()

Returns: Full path to cateogry image or False if no image for the category.
Parameters: Does not require any parameters but can accept a category_id as a parameter.
Usage: Used to display the path to a category image.
Defined: wpsc-includes/category.functions.php

Example

 
<img src='<?php echo wpsc_category_image(); ?/>' alt='
< ?php echo wpsc_category_name(); ?>' 
title='< ?php echo wpsc_category_name(); ?>' />

wpsc_category_image()

Returns: Full path to cateogry image or False if no image for the category.
Parameters: Does not require any parameters but can accept a category_id as a parameter.
Usage: Used to display the path to a category image.
Defined: wpsc-includes/category.functions.php

Example

 
<img src='<?php echo wpsc_category_image(); ?/>' alt='
< ?php echo wpsc_category_name(); ?>' 
title='< ?php echo wpsc_category_name(); ?>' />

wpsc_category_name()

Returns: Category name
Parameters: Does not require any parameters but can accept a category_id as a parameter.
Usage: Used to display the category name.
Defined: wpsc-includes/category.functions.php

Example

 
<img src='<?php echo wpsc_category_image(); ?/>' alt='
< ?php echo wpsc_category_name(); ?>' 
title='< ?php echo wpsc_category_name(); ?>' />

wpsc_category_description()

Returns: Category Description
Parameters: Does not require any parameters but can accept a category_id as a parameter.
Usage: Used to display the category description.
Defined: wpsc-includes/category.functions.php

Example

 
< ?php echo wpsc_category_description(); ?>

wpsc_has_pages()

Returns:True if paginationis turned on and the page requires pagination.
Parameters: None
Usage: Used to check whether to display pagination.
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php
         if(wpsc_has_pages() &&
          ((get_option('wpsc_page_number_position') == 1 ) || 
          (get_option('wpsc_page_number_position') == 3)))  :
 ?>

wpsc_the_page()

Returns:Nothing
Parameters: None
Usage: Used to citerate through the pages
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php while (wpsc_have_pages()) : wpsc_the_page(); ?>

wpsc_page_is_selected()

Returns: Boolean, true if current page is the selected page.
Parameters: None
Usage: Used to check whether the current page is the selected page.
Defined: wpsc-includes/wpsc_query.php

Example

 
< ?php if(wpsc_page_is_selected()) :?>
  •