Re: Customizing Boutique theme (from Elegant Theme) for Marketpress

Hi all

I would like to request for help in this thread to customize Boutique Theme (http://www.elegantthemes.com/demo/?theme=Boutique) for Marketpress.

This theme has support for integration with many shopping cart except Marketpress. I will paste the original codes (selected the codes written for wp-ecommerce) and try to modify for them for Marketpress. Please help to see whether the codes are okay.

Thanks.

The below codes are from functions.php in Boutique Theme.

Original:
This part of the code should be determining which plugin in present.

if ( ! function_exists( 'boutique_active_plugin' ) ) :

function boutique_active_plugin(){

	$active_plugins = get_option('active_plugins');

	$plugin_name = '';
	...
elseif ( in_array( 'wp-e-commerce/wp-shopping-cart.php',$active_plugins ) ) $plugin_name = 'wp_ecommerce';	

	return ( $plugin_name <> '' ) ? $plugin_name : false;

}

I;ve added in this:

elseif ( in_array( 'marketpress/marketpress.php',$active_plugins ) || in_array( 'marketpress.php',$active_plugins ) ) $plugin_name = 'marketpress';

Original:
This part of the code should be setting the price.

function boutique_price(){

	global $post, $boutique_active_plugin_name, $wpdb;

	$price = 0;

	switch ($boutique_active_plugin_name){

case 'wp_ecommerce':

			$price = get_post_meta( $post->ID, '_wpsc_special_price', true ) ? get_post_meta( $post->ID, '_wpsc_special_price', true ) : get_post_meta( $post->ID, '_wpsc_price', true );

			$price = apply_filters( 'et_wp_ecommerce_price_format', number_format( $price, 2 ), $price );

		break;

	}
return $price;

}

endif;

I;ve changed them to:

case 'marketpress':
         $price = get_post_meta( $post->ID, 'mp_sale_price', true ) ? get_post_meta( $post->ID, 'mp_sale_price', true ) : get_post_meta( $post->ID, 'mp_price', true );
      break;

I think the above should be alright.

Will post more codes later to check.