WPEC Product instead of category title : SOLUTION

Reports about issues that you encounter in Suffusion
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

WPEC Product instead of category title : SOLUTION

Postby minty » 01 Dec 2011, 11:14

The Wordpress e-Commerce WPEC plugin currently has an issue where on Category pages, instead of the Category title being displayed (eg "Dresses") it displays a product name (eg "Blue Dress").

While this is a WPEC issue, I post this here so anyone else using that and Suffusion can solve it. Hopefully WPEC will fix it in future, but they're bug-stomping in my experience is less than optimal.

You need to edit Suffusion's 'post-header.php'. At line 118 is this:

Code: Select all
if (!is_singular()) {
?>
<<?php echo $header_tag; ?> class="posttitle"><?php echo suffusion_get_post_title_and_link(); ?></<?php echo $header_tag; ?>>


Change to:

Code: Select all
if (!is_singular()) {
?>
<<?php echo $header_tag; ?> class="posttitle">
<?php if ('wpsc-product' == get_post_type() ){
$category_name= wpsc_category_name(); ?> <a href="" rel="bookmark" title=" <?php $category_name; ?>"><?php echo $category_name; ?></a> <?php
} else {
?>


Hope that's useful to someone.
minty
 
Posts: 35
Joined: 21 Sep 2010, 21:55

Re: WPEC Product instead of category title : SOLUTION

Postby sayontan » 01 Dec 2011, 14:24

Thanks. I can include this in a future iteration of the Suffusion Commerce Pack, when I add support for WP e-commerce.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10168
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: WPEC Product instead of category title : SOLUTION

Postby minty » 02 Dec 2011, 02:57

You're welcome, especially for all the support you offer for your fab theme.
minty
 
Posts: 35
Joined: 21 Sep 2010, 21:55

Re: WPEC Product instead of category title : SOLUTION

Postby minty » 20 Dec 2011, 22:28

I think I left a tiny bit off the end. To be very clear, replace this code:

Code: Select all
if (!is_singular()) {
      ?>
   <<?php echo $header_tag; ?> class="posttitle"><?php echo suffusion_get_post_title_and_link(); ?></<?php echo $header_tag; ?>>
   <?php
   }


with this:

Code: Select all
if (!is_singular()) {
?>
<<?php echo $header_tag; ?> class="posttitle">
<?php if ('wpsc-product' == get_post_type() ){
$category_name= wpsc_category_name(); ?> <a href="" rel="bookmark" title=" <?php $category_name; ?>"><?php echo $category_name; ?></a> <?php
} else {
 echo suffusion_get_post_title_and_link();} ?></<?php echo $header_tag; ?>>
   <?php
   }
minty
 
Posts: 35
Joined: 21 Sep 2010, 21:55


Return to Bug Reports

Who is online

Users browsing this forum: Google [Bot] and 2 guests