WOOT - WooCommerce Aktif Ürünler Tabloları

[woot_popup_iframe_button]

Bu kısa kod, içinde sayfa iframe ile buton, onclick show popup oluşturur.

  • popup_page_link: sayfaya bağlantı, şablon "WOOT Boş Sayfa” seçilmelidir
  • button_text: bağlantı metni, örneğin: 'Ürün yöneticisine mesaj gönderin'
  • popup_title: Popup başlığı
  • css_class: Bağlantının CSS sınıfı
  • help_title: sağdaki açılır pencere başlığındaki bağlantının metni
  • help_link: pop-up başlığında bağlantı

Demo sayfası: https://demo.products-tables.com/product/single-product-example/

Demo kısa kodu: https://demo.products-tables.com/woot_popup_iframe_button/

Ayrıca okundu: Kısa kodlar tek ürün sayfasına nasıl eklenir


Geliştiricilere örnek olarak kod:

//file functions.php - tablo için sütun oluşturma add_action('woot_profile_extend', function($profile, $action_name) { if ($action_name === 'woot_woocommerce_tables') { $profile['ask_me'] = [ 'title' => 'Bana Sor', 'sipariş' => YANLIŞ, 'eylem' => function($post_id) { return WOOT_HELPER::draw_html_item('a', [ 'href' => 'javascript: new Popup23({iframe: "https://demo.products-tables.com/wpform-contact-ask-me/?product_id=' . $post_id . '", ' . 'izin ver:" ivmeölçer; otomatik oynatma; şifreli medya; jiroskop; içinde resim resim", ' . 'title:"Yöneticiye ürün hakkında soru sorun",help_title:"Pop-up'ta iframe hakkında OKUYUN",help_link:"https://products-tables.com/shortcode/woot_popup_iframe_button/"});void(0); ', 'class' => 'woot-btn' ], 'Bana Sor'); } ]; } return $profile; }, 10, 2);

 

add_shortcode('woot_popup_iframe_button', function($args) { wp_enqueue_script('woot-helper', WOOT_ASSETS_LINK . 'js/helper.js', [], WOOT_VERSION, true); wp_enqueue_script('popup_23', /popup-23.js', ['woot-helper'], WOOT_VERSION, true); wp_enqueue_style('woot-popup-23', WOOT_ASSETS_LINK .'css/popup-23.css', [], WOOT_VERSION); wp_enqueue_style ('woot-general', WOOT_ASSETS_LINK . 'css/general.css', [], WOOT_VERSION); $popup_page_link = ''; if (isset($args['popup_page_link'])) { $popup_page_link = $args[' popup_page_link']; } $button_text = 'Ürün yöneticisine mesaj gönder'; if (isset($args['button_text'])) { $button_text = $args['button_text']; } $popup_header_text = ''; if (isset($args['popup_header_text'])) { $popup_header_text = $args['popup_header_text']; } $css_class = ''; if (isset($args['css_class'])) { $css_class = $args ['css_class']; } return WOOT_HELPER::draw_html_item('a', [ 'href' => "javascript: new Popup23({iframe:\"{$popup_page_link}\", title:\"{$po) pup_header_text}\", style:\"height: 100vh\"});void(0);", 'class' => $css_class ], $button_text); });