Export Woocommerce reviews from WordPress

Posted on September 15, 2013

Product reviews are held in the wp_comments table with all the other comments and in the case of Woocommerce the order status updates. To export the product reviews we need to exclude the comment_author  'WooCommerce’ and join to the wp_posts to return the product title (or any other comments made on other post for that matter). SELECT `post_title` AS Product, `comment_author` AS 'Customer Name', `comment_author_email` AS 'Customer ...

Read More

Want to change some data in a mdb database via a VBscript? Great when you've left a client with the lights switched on, or even a boolean set to true when it should be false. All you need is the path to the database, the table name and the field you want to edit. You may need to build up a little query rather than the simple example of "SELECT * FROM tblTest" Private FileXists Const AppPath ="C:\Path\to\my\database.mdb" Private Sub ...

Read More

Google Calendar BackUp

Posted on November 12, 2012

This is a Visual Basic script that backs up your online Google calendars. All you need to do is copy the code into a text editor such as notepad or my favourite Ultra Edit then save the file as Calendar-BackUp.vbs (not .txt or this is really not going to work for you). Save your newly created file into a folder. This is where your backups are going to be saved. Then we need to edit the following bits of code to get this running: 1) How ...

Read More

Google Calendar Backup

Get Yoast SEO Data

Posted on October 30, 2012

I love the On-page Optimisation in MOZ. This feature allows you to enter your focus keyword against a page for the url you wish to score. Personally I add my focus keywords with a label just to keep it tidy when reporting back. However you can not extract the url from the database as it is created via the get_permalink() or get_page_link() functions. I created GetYoastData which outputs to the browser the required data that can be saved into ...

Read More

CS Cart Download Order Details

Posted on September 18, 2012

Download the basic order details for analysis from CS Cart using MySQL (& phpMyAdmin). Change the year/month parameters for your required data set. SELECT `order_id` AS 'Order Number', DATE( FROM_UNIXTIME( `timestamp` ) ) AS 'Order Date', `total` AS Revenue, DATE_FORMAT( DATE( FROM_UNIXTIME( `timestamp` ) ) , '%Y' ) AS Year, DATE_FORMAT( DATE( FROM_UNIXTIME( `timestamp` ) ) , '%m' ) AS Month, DATE_FORMAT( DATE( FROM_UNIXTIME( ...

Read More

Export SEO Focus Keywords

Posted on August 17, 2012

A quick and dirty export (ie you may need to do a bit of data filtering) of the SEO Focus Keywords data used in the Yoast SEO Wordpress plugin.. The data could then be imported into SEO tools such as MOZ SELECT `meta_value` FROM `wp_postmeta` WHERE `meta_key` = '_yoast_wpseo_focuskw' AND `meta_value` != '' ORDER BY `wp_postmeta`.`meta_key` DESC

Read More

WordPress hook for Yoast SEO plugin

Posted on August 10, 2012

This hook is for the ThemeBlvd WordPress framework and Yoast SEO plugin to enable the meta title tag to be displayed correctly. Add this code snippet to your (preferably in your child theme) functions.php file /*-------------------------------------------------------*/ /* Add hook for Yoast SEO plugin /*-------------------------------------------------------*/ function my_title() { wp_title(''); } function yoast_mods() { remove_action( ...

Read More

WordPress Quick Fix – Change GUID

Posted on August 9, 2012

If you move your site from your developmental domain to your clients domain, you will need to do a bit of housework on the database, fix the URLs for the GUID (globally unique identifier) field in wp_posts table. This is important as the GUID is used to translate your post or page slug to the correct article absolute path if it is entered wrongly. UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.development.com', 'http://www.client.co...

Read More

Financial reporting for CS-Cart

Posted on June 25, 2012

Financial reporting for CS-Cart I have three SQL Queries that make my reporting life a little more comfortable. I'll jump right in assuming you know how to run SQL via phpMyAdmin. Total orders for a given month and year (just edit '2012' & '07' for your requied date) SELECT `order_id` , DATE( FROM_UNIXTIME( `timestamp` ) ) AS order_date, `total` FROM `cscart_orders` WHERE `status` = 'P' AND DATE_FORMAT( DATE( FROM_UNIXTIME( ...

Read More