Wishlist - How to add "Add to Quote" button in your wishlist


If you want to add "Add to Quote" button in your wishlist, you can follow this two steps procedure

1. Overwrite default wishlist-view.php template
Just copy wishlist-view.php from wp-content/plugins/yith-woocommerce-wishlist-premium/templates/ and paste it under wp-content/themes/<your theme or child>/woocommerce/ (you may need to create woocommerce folder inside your theme)

2. Add code to print add to quote button
With the following code

<!-- Request a Quote -->
<?php
if( function_exists( 'YITH_Request_Quote_Premium' ) ) {
YITH_Request_Quote_Premium()->add_button_shop();
}
?>

You can print "Add to Quote" button inside wishlist rows.
I suggest you to place this code inside product-add-to-cart column: so you should change this portion of code (@253~256)

<!-- Remove from wishlist -->
<?php if( $is_user_owner && $repeat_remove_button ): ?>
<a href="<?php echo esc_url( add_query_arg( 'remove_from_wishlist', $item['prod_id'] ) ) ?>" class="remove_from_wishlist button" title="<?php _e( 'Remove this product', 'yith-woocommerce-wishlist' ) ?>"><?php _e( 'Remove', 'yith-woocommerce-wishlist' ) ?></a>
<?php endif; ?>

to something like this

<!-- Remove from wishlist -->
<?php if( $is_user_owner && $repeat_remove_button ): ?>
<a href="<?php echo esc_url( add_query_arg( 'remove_from_wishlist', $item['prod_id'] ) ) ?>" class="remove_from_wishlist button" title="<?php _e( 'Remove this product', 'yith-woocommerce-wishlist' ) ?>"><?php _e( 'Remove', 'yith-woocommerce-wishlist' ) ?></a>
<?php endif; ?>

<!-- Request a Quote -->
<?php
if( function_exists( 'YITH_Request_Quote_Premium' ) ) {
YITH_Request_Quote_Premium()->add_button_shop();
}

 

Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk