Bulk Custom Menu and Wp-Ecommerce

Goto Appearance -> Menus You can see all categories listed here including wp-ecommerce categories. Just create a new menu for your wp-ecommerce categories. Lets call it “ecomcategories”. You can call this menu in your theme using this code. <?php wp_nav_menu( array(‘menu’ => ‘ecomcategories’ )); ?> You can just drag and drop for sub menus. You … Read more

How can I find out what items a user has purchased? [closed]

Query the table wp_wpsc_purchase_logs, it contains all information about previous purchases. add this to your themes functions.php: /********************************************************* Get purchased articles by user_id or for the current user *********************************************************/ function haet_recently_bought_articles($user_id=0){ if($user_id==0) $user_id=get_current_user_id(); //only if there is an active user, otherwise we would get all purchased items from unregistered users if($user_id>0) { global $wpdb; $sql … Read more

Send email on Job Dispatched from WP e-commerce [closed]

I’d suggest you start by looking at action ‘wpsc_purchase_log_update’, which is triggered in wpsc-includes/purchase-log.class.php and passes the wpsc_purchase_log object. Test the $previous_status member of that object, and the new status value (might be in data member as $data[‘statusno’]) == WPSC_Purchase_Log::JOB_DISPATCHED. Something like this (untested): add_action(‘wpsc_purchase_log_update’, ‘wpse_73707_wpscPurchaseLogUpdate’); /** * trigger event or option to the “Job … Read more

Custom MySQL Query with logic

Thank’s everyone for your attention. If anybody will need to query database with two postmeta, here is the code SELECT p.* , CASE WHEN m1.meta_value=0 OR m1.meta_value IS NULL THEN m2.meta_value ELSE m1.meta_value END meta_value FROM aka_v_posts p LEFT JOIN aka_v_postmeta m1 ON p.id=m1.post_id AND m1.meta_key=’_wpsc_special_price’ LEFT JOIN aka_v_postmeta m2 ON p.id=m2.post_id AND m2.meta_key=’_wpsc_price’ WHERE … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)