View cart link in 'you already have this in your cart' message

This commit is contained in:
Mike Jolley 2012-03-23 19:15:31 +00:00
parent 418319a85c
commit f0742cdddf
2 changed files with 2 additions and 1 deletions

View File

@ -624,7 +624,7 @@ class WC_Cart {
if ( get_option('woocommerce_limit_downloadable_product_qty')=='yes' && $product_data->is_downloadable() && $product_data->is_virtual() ) {
$qty = ( $cart_item_key ) ? $this->cart_contents[$cart_item_key]['quantity'] + $quantity : $quantity;
if ( $qty > 1 ) {
$woocommerce->add_error( __('You already have this item in your cart.', 'woocommerce') );
$woocommerce->add_error( sprintf('<a href="%s" class="button">%s</a> %s', get_permalink(woocommerce_get_page_id('cart')), __('View Cart &rarr;', 'woocommerce'), __('You already have this item in your cart.', 'woocommerce') ) );
return false;
}
}

View File

@ -147,6 +147,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Feature - Debug/status page with some handy functions to resolve common issues
* Feature - Control default catalog sort order from Catalog Settings
* Feature - Option to use post instead of get to submit paypal standard - form also has target="_top" to work when in iframes
* Tweak - View cart link in 'you already have this in your cart' message
* Tweak - When viewing a product, give shop menu item a class
* Tweak - Layered nav dropdown code to filter displayed terms based on view
* Tweak - Improved wording of stock panel to make less confusing