WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] shortcodes to honor category views (14 posts)

  1. nadworks
    Member
    Posted 11 months ago #

    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();

    with

    //$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.

    http://wordpress.org/plugins/wp-e-commerce/

  2. nadworks
    Member
    Posted 7 months ago #

    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.

  3. nadworks
    Member
    Posted 7 months ago #

    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)

  4. Dan Milward
    Member
    Plugin Author

    Posted 7 months ago #

    @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!!

    https://github.com/wp-e-commerce/WP-e-Commerce/

  5. nadworks
    Member
    Posted 7 months ago #

  6. Dan Milward
    Member
    Plugin Author

    Posted 7 months ago #

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

  7. nadworks
    Member
    Posted 7 months ago #

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

  8. Mihai
    Member
    Plugin Author

    Posted 7 months ago #

    Hey there,
    I posted some debugging info on the commit on git
    https://github.com/wp-e-commerce/WP-e-Commerce/issues/322

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

  9. nadworks
    Member
    Posted 7 months ago #

    Just wondering why this thread is being marked as "resolved".

  10. Mihai
    Member
    Plugin Author

    Posted 7 months ago #

    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:
    https://github.com/wp-e-commerce/WP-e-Commerce/issues/322#issuecomment-31317149

    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.

    Regards
    Mihai

  11. nadworks
    Member
    Posted 7 months ago #

    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.

  12. Marisa
    Member
    Posted 7 months ago #

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

  13. Justin Sainton
    Member
    Plugin Author

    Posted 7 months ago #

    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.

  14. Murali
    Member
    Posted 6 months ago #

    Hi Folks,

    I am using Version 3.8.13.3, & 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 1.0.4.1
    WordPress 3.8

    Appreciate your response.
    Thanks,

Reply

You must log in to post.

About this Plugin

About this Topic