wp-e-commerce plugin – Second Test Gateway payment option [closed]

I just copied the testmode.merchant.php file (plugins/wp-e-commerce/wpsc-merchants). Renamed it (in my case mynewgateway.merchant.php) and changed name, class_name, display_name and form in the first array. Then changed the class name on line 29 (just changing test to mynewgateway, same as above), the name variable on line 31 and at last the form function name on line … Read more

WordPress Jquery Confliction with Plugin

There are currently two copies of jQuery loaded on site: In header there is jQuery bundled with WordPress, likely requested by some plugin. In footer there is jQuery from Google CDN, likely added by your code? Obviously this is one too many. There are couple of ways to handle it: If you are fine with … Read more

Help alphabetically sorting $terms from get terms(‘wpsc_product_category’

This code works! Sorts by category name (visible name), produces a list of links of categories (that aren’t empty) that are children of category_id. <?php //display sorted list of wpsc product categories $category_id = 10; $terms = get_terms(‘wpsc_product_category’,’hide_empty=1&parent=”.$category_id); usort($terms, function($a, $b) { return strcmp($a->name, $b->name); }); if ($terms) { foreach($terms as $term) { ?> <div> … Read more

modify a function filter

The filter exists to avoid the need for replacements in the plugin code. What you probably need is: add_filter( ‘wpsc_purchase_logs_cap’, ‘wpse_72095_admin_to_editor’ ); function wpse_72095_admin_to_editor() { return ‘edit_others_posts’; } This will change the capability/role to editor.

WP e-commerce: getting products by SKU

WP E-commerce uses WordPress post objects to store products, so you don’t need any special functions or callbacks. query_posts will support everything you need, you can learn about the details of how everything is set up by reading about their database schema. Specifically, the SKU is in the wp_postmeta table with a meta_key of _wpsc_sku.