WP Post Revisions&WP-Ecommerce

wpsc, an abbreviation of wp-shoppingcart, a plugin for WordPress.
Post Revisions Buggy-ness & WP-Shoppingcart plugin
Most people get nervous when it comes to mySQL database tables.So I was glad to find a way to fix this bug without having to use phpmyadmin.

After I upgraded to WP 2.6 and upgraded the wpsc cart plugin to version 3.6.8 I noticed that revision-71 was being inserted into my single product urls. 71 being the id of the edited page.
This bug also happened with WP 2.6 and wp-shoppingcart 3.6.7.It only happened to pages containing wpsc short code:
[shoppingcart ] [productspage ] [tranactionresults ] [userlog ]

I did some forum searching and found this plugin by Jeremy Clark.
Re creating the bug was easy enough to do. All I had to do was deactivate the disable posts revisions plugin and edit a wpsc page. Voila: revision-pageid reappeared in the single product urls all over again.

** Note**
I’m actually using this plugin: Disable Revisions and Autosave
Link: http://exper.3drecursions.com/2008/07/25/disable-revisions-and-autosave-plugin/
Description: Disable the Revisions and Autosave functions. Original idea and code by Lester Chan and Untwisted Vortex. But Jeremy’s does the same thing. Use either one.

I re activated the plugin and deleted the product listing page. I created a new page, pasting the productspage shortcode into it. Then I checked the Admin in Settings and noticed that not only the product listing page link was messed up-the Verify Your Order link was also messed up, because I had edited that page as well after I deactivated the disable post revisions plugin.

Fixing stuff
Get this plugin
Test for whether or not you can just activate this plugin to get rid of the bug without having to delete the page containing some shortcode.If this fixes the bug you don’t need to delete pages.
If the problem still exists delete the page,copy the short code into the new one and publish it.
Check Admin in Settings in Ecommerce to see if your page urls are correct.
If they contain revision-pageid, correct the url and hit Update Page Urls.
Reload the Admin page in Settings>Ecommerce to make sure the corrected link(s) “stick”.
To make absolutely sure this is fixed go back and edit a page containing wpsc short code (just hit save).Then view the page and see if the single product links work.

I am an SEO Master!

SEO Master – 87%

Are you an SEO Expert?

I took this quiz and even though I only got a B+ and I have a lot to learn I think I am well on the way to being effective when it comes to helping my clients make more money with their websites.

I wrote recently on how I redesigned the web site for Lee Lee’s Valise which was already a much searched for and well trafficked though young website.This was my first and only experience redesigning a website that had sitelinks otherwise known as “breakout” site results in Google.I was worried that the action of recreating the existing pages in a WordPress as a CMS environment would wreck the sitelinks. Actually though, because of the ability to redirect old pages using .htaccess and those old page’s popularity, I needn’t have worried.

It took a few weeks and the help of 2 very important plugins for WordPress:the All in one SEO Pack and the Google XML Sitemap Generator to transfer the powerful juice of the old .htm URLs to the dynamically generated WordPress page URLs.Now the redirected URLs no longer get sitelinks generated by Google but the new WP URLs and more importantly the one for the new online store,do. And instead of just 3 sitelinks, Google now gives us 5!

Wp-Ecommerce and nextGen Gallery

For WordPress Users

  • If you have both nextGen and wp-shoppingcart installed but don’t have the gold cart files.
  • If you have nextGen and wp-shoppingcart installed and do have the gold cart files but don’t like the row of thumbs in the pop up thickbox window.
  • If you want to get the Full Size link back in the thickbox pop up window.
  • If you want the pop up images to get resized less in the thickbox pop up window.
  • If you prefer nextGen’s thickbox to wp-shoppingcart’s.

Having both plugins used to create a mess but the authors seem to have reached a compromise:if both plugins are detected,nextGen will *use wp-shoppingcart’s javascript(thickbox).

The Hard Way

Keeps the additional row of thumbs
I opened the wp-shoppingcart plugin folder in plugins and found in js, thickbox.js.
The structure looks like this:
wp-content/
plugins/
wp-shoppingcart/
js/
thickbox.js
I opened up the thickbox.js that nextGen supplies and found the code for the full-size link.

[javascript]"’ id=’TB_FullSize’ title=’Full Size’>Full Size</a>&nbsp;&nbsp;"[/javascript]

Then I opened thickbox.js in wp-shoppingcart/js and added it to the block which begins at line 189 and ends on line 191. If you aren’t comfortable splicing in code you can just paste this entire block from lines 189 to 191 in the file (the line numbers refer to the numbers in the .js file not this snippet)

[javascript]// TODO empty window content instead
jQuery("#TB_window").append("<a href=” id=’TB_ImageOff’ title=’Close’><img id=’TB_Image’ src=’"+url+"’ width=’"+imageWidth+"’ height=’"+imageHeight+"’ alt=’"+caption+"’/></a>" + "<div id=’TB_caption’>"+caption+"<div id=’TB_secondLine’>" + imageCount + "&nbsp;&nbsp;<a href=’" + url + "’ id=’TB_FullSize’ title=’Full Size’>Full Size</a>&nbsp;&nbsp;" + prev.html + next.html + "</div></div><div id=’TB_closeWindow’><a href=’#’ id=’TB_closeWindowButton’ title=’Close’>close</a></div>");
[/javascript]
Be sure to comment out the old block or just cut it
Optional other changes
Pop up images are resized too small. Thickbox.js resizes your images with our old friend math.
Stop it from resizing them too much by editing lines 110 to 111.
Original
[html]
var x = pagesize[0] – 150;
var y = pagesize[1] – 150;[/html]
Edited
[html]
var x = pagesize[0] – 50;
var y = pagesize[1] – 50;[/html]
I am not smarter than the people who wrote this resizing code, so act accordingly.

The Easy Way

But without that extra row of thumbs on the left
Because messing with thickbox.js can lead to trouble (if done wrong your pop ups won’t work) an alternative is uploading nextGen’s thickbox.css and thickbox.js to the wp-shoppingcart folder.
In the end that is what I did. I was very happy with the result. I always thought having the additional row of thumbs on the left of the pop up window was swanky but redundant. If you come to a page of thumbnail pictures do you really need even more thumbs in the actual pop up window?

Instinct
nextGen

These edits or file-switches will be wiped out when you upgrade.
*Apparently you can pick another effect besides thickbox like highslide or smoothbox in Gallery Options>>Effects tab.