Support » Plugin: WP eCommerce » shortcodes to honor category views

  • Resolved nadworks


    I am sharing this based on a solutions that resulted from a premium support ticket:

    Since the last major upgrade of WPeC the theme.functions.php file stopped supporting custom category views (grid and list) when the category was inserted via a shortcode. This broke most of my page displays. Despite several attempts to get this amended by the development team for a new release, this issue has been duly ignored (as so many other issues), even though the solution is available and surprisingly simple:

    1. Go to /plugins/wp-e-commerce/wpsc-includes/theme.functions.php

    2. approx. around line 988 replace

    $saved_display = wpsc_get_customer_meta( 'display_type' );
    $display_type  = ! empty( $saved_display ) ? $saved_display : wpsc_check_display_type();


    //$saved_display = wpsc_get_customer_meta( 'display_type' );
    //$display_type  = ! empty( $saved_display ) ? $saved_display : wpsc_check_display_type();
    if ( isset( $_SESSION['wpsc_display_type'] ) )
    $display_type = $_SESSION['wpsc_display_type'];

    Unless the developers add this simple fix to the next release, make sure you re-edit the file after the next upgrade.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Warning!
    The new release, 3.8.13, is destroying these changes again and you’ll not only lose the fixed functions file, but the disability to apply the above fix altogether.

    The file that needs to get edited in version 3.8.13 is
    ..\wp-content\plugins\wp-e-commerce\wpsc-components\theme-engine-v1\helpers\page.php (approx. line 508)

    @nadworks – Sorry about that. And thanks so much for posting a fix so that the community may benefit.

    If something like that isnt working in WPEC and you’ve gone to the effort to fix it could you please raise an issue in github and post us that fix for us to look at and merge. If we don’t have it we can’t do it (and my apologies if you’ve already submitted it and it didnt make it into 3.8.13).

    Thanks again!!

    Thanks mate. Did you submit the code to github as a pull request that we can merge?

    Aaah, sorry no. Wouldn’t know how to. I’m not a developer. :o(

    Plugin Author Mihai


    Hey there,
    I posted some debugging info on the commit on git

    Keep an eye on that to see what the other devs are saying about the issue and maybe there is an easy fix.

    Just wondering why this thread is being marked as “resolved”.

    Plugin Author Mihai


    Hey there,
    We mark it as resolved after we reply to the topic, is just a way to know that an answer has been provided even if its not all the time the best answer.

    Regarding the category shortcode issue you can take a look at my comment here:

    You could try the change i mentioned at the bottom of the comment but i`m not sure its 100% the best way to do it but i have not noticed any major issue with that change in the code.
    Until one of the devs can take a look and maybe apply a better patch you could try that and see if it works and if any other issues come up from the change.


    So, you have launched yet another upgrade without taking care of this? AGAIN we have to manually hack the core files to fix our sites?

    I am flabbergasted, guys.



    So there’s not a stable fix for this issue?

    Plugin Author Justin Sainton


    Hey guys,

    This fix should be in the 3.8.14 release. Please give the master branch a test to make sure it works for you. The dot releases (3.8.13.x) are strictly for maintenance/security, not bug fixes.

    Hi Folks,

    I am using Version, & have the same issue, but cant seem to find “\wp-content\plugins\wp-e-commerce\wpsc-components\theme-engine-v1\helpers\page.php” at all. I am a newbie into dev and just rying to build a little site to my sis. I went under installed plugins and clicked Edit on WP-e-commerce plugin. Should i be doing it another way?

    WP e-Commerce Grid View LITE Version
    WordPress 3.8

    Appreciate your response.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘shortcodes to honor category views’ is closed to new replies.