/** * Return "Add to Wishlist" button. */ static function add_to_wishlist($atts, $content = null) { global $product, $king_wishlist; $html = king_WISHLIST_UI::add_to_wishlist_button($king_wishlist->get_wishlist_url(), $product->product_type, $king_wishlist->is_product_in_wishlist($product->id)); $html .= king_WISHLIST_UI::popup_message(); return $html; }
<td class="product-stock-status"> <?php $availability = $product_obj->get_availability(); $stock_status = $availability['class']; if ($stock_status == 'out-of-stock') { $stock_status = "Out"; echo '<span class="wishlist-out-of-stock">' . __('Out of Stock', 'king') . '</span>'; } else { $stock_status = "In"; echo '<span class="wishlist-in-stock">' . __('In Stock', 'king') . '</span>'; } ?> </td> <td class="product-add-to-cart"> <?php echo king_WISHLIST_UI::add_to_cart_button($values['prod_id'], $availability['class']); ?> </td> </tr> <?php } } } else { ?> <tr> <td colspan="6" class="wishlist-empty"><?php _e('No products were added to the wishlist', 'king'); ?> </td> </tr> <?php
<?php /** * Share template */ global $king_wishlist, $king; if (!is_user_logged_in()) { return; } if ($king->cfg['wl_facebook'] == 1 || $king->cfg['wl_twitter'] == 1 || $king->cfg['wl_pinterest'] == 1) { echo king_WISHLIST_UI::get_share_links($king_wishlist->get_wishlist_url() . '&user_id=' . get_current_user_id()); }