No criticism intended - just a few small tweaks and we're there!  And what was done before e.g. my if( $has_variants = wpsc……) wasn't quite right - it was checking if ( [...] ) on an assignment ($x = [...] ) - rather than a comparison.  

I do see, from time to time, some clever coding (usually with transients, probably because of the codex) to this effect - 

```php 
if ( false !== ( $x = func() ) ) {

}
```
I can get behind that when readability isn't sacrificed, but that's not quite what was happening there.