How do I change the 'Add to Cart' button to just View Product, so it doesn't add to cart right away?
Q: Is it possible to have a "view product" button instead (or additional to) the "add to cart" button on the category page. Or is it possible to add a short description to the items on the category page?
A: Add the below code to `wp-content/yourTheme/functions.php:
if (!function_exists('jigoshop_template_loop_add_to_cart')) {
function jigoshop_template_loop_add_to_cart( $post, $_product ) {
do_action('jigoshop_before_add_to_cart_button');
if ( ($_product->is_in_stock()) || ($_product->is_type('external') )){
$output = '<a href="'.get_permalink($_product->id).'" class="button">'.__('View Product', 'jigoshop').'</a>';
}
else {
$output = '<span class="nostock">'.__('Out of Stock', 'jigoshop').'</span>';
}
echo apply_filters( 'jigoshop_loop_add_to_cart_output', $output, $post, $_product );
do_action('jigoshop_after_add_to_cart_button');
}
}
-
Getting Started
-
Jigoshop Settings
-
Creating Products
-
Using Jigoshop
-
Customize Jigoshop
-
Testings - in case of problems on Jigoshop web site
-
FAQ - Jigoshop plugin user questions
- Add a new tab to a product page / Custom tabs on product pages?
- Adding a Continue Shopping button to the single product page
- Adding Product Category Terms in a dropdown box for Custom Post Meta
- Add Alternate text on product picture and title
- Adding buttons / info to the end of each product
- View all (171 more)
-
FAQ - Jigoshop extensions user questions
-
API
-
Screencasts