WP-E-Commerce Tip: Change the path to the add to cart image

You’re using the theme named iShop.
You’ve moved your themes to the /wp-content/uploads/wpsc directory.
Now you want to get the add to cart image from /wp-content/uploads/wpsc/iShop instead of /wp-content/plugins/wp-e-commerce/themes/iShop
Once this is done, upgrading the plugin won’t get rid of your add to cart image.

products_page.php /wp-content/uploads/wpsc/themes/iShop/products_page.php
Please backup your files before editing!

Find lines 231 to 233

[php]
<?php else: ?>
<input type=’image’ src='<?php echo WPSC_URL; ?>/themes/iShop/images/buy_button.gif’
id=’product_<?php echo wpsc_the_product_id(); ?>_submit_button’
class=’wpsc_buy_button’ name=’Buy’ value="<?php echo __(‘Add To Cart’, ‘wpsc’); ?>" />
<?php endif; ?>[/php]

Change to:

[php]
<?php else: ?>
<?php $upload_dir = wp_upload_dir(); ?>
<input type=’image’ src='<?php echo $upload_dir[‘baseurl’];?>
/wpsc/themes/iShop/images/buy_button.gif’
id=’product_<?php echo wpsc_the_product_id(); ?>_submit_button’
class=’wpsc_buy_button’ name=’Buy’ value="<?php echo __(‘Add To Cart’, ‘wpsc’); ?>" />
<?php endif; ?>[/php]

single_product.php
Find lines 180 to 183
[php]
<?php else: ?>
<input type=’image’ src='<?php echo WPSC_URL; ?>/themes/iShop/images/buy_button.gif’
id=’product_<?php echo wpsc_the_product_id(); ?>_submit_button’
class=’wpsc_buy_button’ name=’Buy’ value="<?php echo __(‘Add To Cart’, ‘wpsc’); ?>" />
<?php endif; ?>[/php]

Change to
[php]
<?php else: ?>
<?php $upload_dir = wp_upload_dir(); ?>
<input type=’image’ src='<?php echo $upload_dir[‘baseurl’];?>
/wpsc/themes/iShop/images/buy_button.gif’
id=’product_<?php echo wpsc_the_product_id(); ?>_submit_button’
class=’wpsc_buy_button’ name=’Buy’ value="<?php echo __(‘Add To Cart’, ‘wpsc’); ?>" />
<?php endif; ?>[/php]

Now all you have to do is upload your add to cart image to the images folder of your theme in your theme’s new location.
If you’re using a .png or .jpg image file type or an image with a different file name than buy_button.gif you have to make sure to edit the code to use the image file name or type.

Marketplace
products_page.php at lines 235 to 238
single_product.php at lines 182 to 184
Tip about the Marketplace theme: it uses atc.gif as the add to cart image, not buy_button.gif.

Default
Tip about the default theme: it uses input type=’submit’ instead of input type=’image’ which is what the 2 other themes use.
So if you’re already using some CSS to style the button I would leave this code alone since upgrading won’t affect your theme.
But if you want to use an image go ahead and edit the files:
products_page.php at lines 233 to 235
single_product.php at lines 179 to 181

In Which Netflix is mean to me and then I write about it

All of a sudden I couldn’t stream any Netflix titles instantly so I called their support line. Found out they put my account on hold December 30th. During our conversation, the operator said I wasn’t being punished and that they were just trying to find a way to make the service work for me because it wasn’t working if so many of their discs were going missing. You think? Well, why if it is a physical disc issue does my complete account have to be suspended? And why did it have to be suspended over the New Year weekend? Even Time Warner wouldn’t do that. I acknowledge the fact that I live on what might be one of the worst USPS mail routes in the USA in a building full of people who might or might not be “borrowing” my Netflix discs and never returning them. But to put someone’s account on hold over a holiday weekend is not very nice at all.

Of course I can’t prove that I’m not building quite a tidy DVD collection at Netflix’s expense. But if you were looking at my account history you’d see that I have returned all of these TV shows:

  • Mad Men:Season:2 (all discs),
  • The Wire:Season 5 (all discs),
  • Damages:Season 1 & 2 (all discs),
  • Jackie Woodman: Season 1 & 2 (all discs),
  • True Blood: Season 1 (all discs)
  • Squidbillies: Volumes 1 & 2 (all discs)

Film:

  • Frozen River,
  • The White Ribbon,
  • The Ghost Writer,
  • Five Easy Pieces,
  • The Secret in their Eyes,
  • The Hangover,
  • District 9,
  • The Hurt Locker,
  • Blindness,
  • 28 Days Later,
  • Black Book,
  • The Diving Bell and the Butterfly

Considering the fact that I gave all of these movies and shows at least a 4 star rating – why would I then keep a bad movie like Expired when I could have kept 28 Days Later, one of my all time favorite movies?

Even though I know it probably wasn’t a person with the power of logic in charge of putting my account on hold and that more likely a computer somewhere keeping track of my missing discs triggered the decision, I am still very much put out.

Normally I would try to spare my 4 subscribers from having to read this sort of of thing but Netflix doesn’t have a contactable email address and so now you have to know what happened,too.