WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Product Category Edit bug – Catalog View resets to Default

[Resolved] Product Category Edit bug – Catalog View resets to Default

  • Each time I re-edit an existing Product Category, the Category View drop-down resets to Default View.

    We have our Product Categories set at Grid View.

    It seems the Category View value is not being properly read in from the settings.

    Running WPEC 3.8.9.5

Viewing 13 replies - 1 through 13 (of 13 total)
  • I looked into this further in firebug.

    I get the following array data for the $categories array in /wp-ecommerce/wpsc.admin/includes/save-data.functions.php

    Array ( [term_id] => 1505 [name] => Stillson & Pipe Wrenches [slug] => stillson-pipe-wrenches [term_group] => 0 [term_taxonomy_id] => 1513 [taxonomy] => wpsc_product_category [description] => [parent] => 120 [count] => 2 [nice-name] => [image] => Stillson Wrenches.jpg [fee] => 0 [active] => 1 [order] => 0 [display_type] => grid [image_height] => [image_width] => [use_additional_form_set] => )

    The display_type is set to grid.

    When I look in firebug, the following code is showing:

    <select name='display_type'>
                    <option value='default'>Default View</option>
                    <option value='list'>List View</option>
                    <option value='grid'  checked='checked'>Grid View</option>
    </select>

    But the “Default View” is the selected item in the drop-down and that’s what it saves as each time.

    Same behaviour in Chrome, FF and IE.

    Any ideas?

    Should the option not have selected=’selected’ as an attribute rather than checked=’checked’

    Found the bug in /wp-ecommerce/wpsc.admin/includes/save-data.functions.php

    Lines 335, 336 and 337 should have
    selected( $display_type, 'default' );
    instead of
    checked( $display_type, 'default' );

    Can yo please update the WPEC core?

    I have noticed this and it is annoying, I can do it myself but as soon as I hand the site over to client I just know they will forget to re select grid view each time. I will try the fix above and hope that works thanks Lime Canvas

    that fix didn’t seem to work for me ๐Ÿ™

    taking your lead on where to look Lime Canvas, I did this to make the grid view the default on mine:

    line 163 (and the few lines following) change to this:

    <option value='grid'<?php checked( _wpsc_is_display_type_supported( 'grid' ), false ); ?><?php checked( $display_type, 'grid' ); ?>><?php esc_html_e('Grid View', 'wpsc'); ?></option>
    							<option value='default'<?php disabled( $display_type, 'default' ); ?>><?php esc_html_e('Default View', 'wpsc'); ?></option>
    							<option value='list'<?php disabled( _wpsc_is_display_type_supported( 'list' ), false ); ?><?php checked( $display_type, 'list' ); ?>><?php esc_html_e('List View', 'wpsc'); ?></option>

    line 336 (and the few lines following) change to this:

    <option value='grid' <?php checked( _wpsc_is_display_type_supported( 'grid' ), false ); ?><?php checked( $display_type, 'grid' ); ?>><?php esc_html_e( 'Grid View', 'wpsc' ); ?></option>
                     <option value='default'<?php disabled( $display_type, 'default' ); ?>><?php esc_html_e( 'Default View', 'wpsc' ); ?></option>
                    <option value='list'<?php disabled( _wpsc_is_display_type_supported( 'list' ), false ); ?><?php checked( $display_type, 'list' ); ?>><?php esc_html_e('List View', 'wpsc'); ?></option>
                    <option value='grid' <?php disabled( _wpsc_is_display_type_supported( 'grid' ), false ); ?><?php checked( $display_type, 'grid' ); ?>><?php esc_html_e( 'Grid View', 'wpsc' ); ?></option>

    This seems to be working fine so far…

    Cool @igloobob – I hope WPEC take note and apply the fix.

    They are not so good at responding to the community here ๐Ÿ™

    You’re not wrong! It seems every corner I turn I run into another problem, upon searching the web, all I find is users asking for help and trying to muddle solutions between themselves. I wouldn’t mind but I’ve paid about $100 for gold cart and other plugins.

    Their customer service SUCKS.

    Today’s first hair pulling issue:

    getting payments to show accepted rather than pending after paypal payment!

    any ideas?

    I am having a similar issue, I basically want category pages in WPEC to show as default view but want to select individual categories to view as grid view (I have Gold Cart) I accepted the fact that once products are marked as featured I could not get the featured on their own page, so what I do is get a product categorized normally and cross-categorize it with my ‘Featured’ product category, and when the Featured category is viewed I want Grid View but otherwise I want Default view, when I go to Products > Categories > Featured > Catalog View: Set to Grid View it does not save despite saying ‘Item Updated Successfully’, how would I get this to do as it’s told? Thanks

    I have posted this if this will help new replies come in it is remotely similar to the main issue featured here – Thanks: http://wordpress.org/support/topic/category-pages-wpec

    Plugin Author Justin Sainton

    @justinsainton

    Sorry to hear you guys have been having issues. When you find legitimate bugs like this, GitHub is the place to report. If you review the latest commits, I’ve made some of the changes you’ve implemented. Please let me know if they resolve the issues for you.

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

    Coming back real quick, I have stumbled across this page looking for the PHP document responsible for default view, list view and grid view seem to have their own files. -That’s all I want, can’t find it anywhere tho?

    Cheers
    -Dan.

    (P.S: Can started threads be shut down here?)

    webbrewers

    @webbrewers

    This is still an issue. I applied the fix above but still the individual category setting overrides the global presentation ยป setting. Since it has “default” as the default option, that’s what gets saved.
    I already submitted a ticket at github.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Product Category Edit bug – Catalog View resets to Default’ is closed to new replies.