Enable WooCommerce 2 for The Cause 1.x

1. open style.css
2. find part of code dedicated to WooCommerce, starting with:

/* 6.1 WooCommerce */

ending above next section, starting with:

/* 6.2 Easy WordPress Donations Plugin */

3. replace this section with one attached here: http://themeblossom.info/wp-content/uploads/2014/03/thecause-woo-fix.css

4. find this line:

input.bigButton, button.bigButton, input.bigButtonExtra, button.bigButtonExtra, .form-submit input[type=submit] {height: 45x !important;}

and change it to read:

input.bigButton, button.bigButton, input.bigButtonExtra, button.bigButtonExtra, .form-submit input[type=submit] {height: 45px !important;}

5. open js/themeblossom.js

6. find all instances of:

woocommerce_tabs

and replace them with:

woocommerce-tabs

7. find all instances of:

wooImage

and replace them with:

images

8. remove this line:

$('.images > .mainImage > img').addClass('hasNoLink');

9. remove folder ‘woocommerce‘ completely

10. remove page page-woocommerce.php

11. create new file woocommerce.php and put this inside it:

<?php
/*
@package WordPress
@subpackage The Cause
*/
get_header('sidebar');
?>
<h2><?php woocommerce_page_title(); ?></h2>
<div id="post-<?php echo $postID; ?>">
<div>
<?php get_sidebar('shop'); ?>
<!-- INNER content -->
<div id="inner" class="woocommerce">
<?php woocommerce_content(); ?>
</div>
</div>
</div>
<?php
get_footer();
?>

12. open functions.php

13. find these lines:

define('WOOCOMMERCE_USE_CSS', false);
 update_option('woocommerce_catalog_image_width', 150);
 update_option('woocommerce_catalog_image_height', 150);
 update_option('woocommerce_catalog_image_crop', 1);
 update_option('woocommerce_single_image_width', 283);
 update_option('woocommerce_single_image_height', 237);
 update_option('woocommerce_single_image_crop', 1);
 update_option('woocommerce_thumbnail_image_width', 90);
 update_option('woocommerce_thumbnail_image_height', 90);
 update_option('woocommerce_thumbnail_image_crop', 1);

and below them add these:

add_theme_support( 'woocommerce' );

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );

function custom_override_checkout_fields( $fields ) {
 $fields['billing']['billing_first_name']['placeholder'] = 'First Name';
 $fields['billing']['billing_last_name']['placeholder'] = 'Last Name';
 $fields['billing']['billing_company']['placeholder'] = 'Company Name';
 $fields['billing']['billing_phone']['placeholder'] = 'Phone';
 return $fields;
}

0