PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.1
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.1
3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 2.8.17 2.8.18 All 259 releases
wpfunnels / admin / modules / setup-wizard / components / Content / CreateProduct.vue

CreateProduct.vue in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.1, at admin/modules/setup-wizard/components/Content/CreateProduct.vue

73 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <button
3 class="btn-default wpfnl-create-product-btn"
4 id="wpfnl-create-product-btn"
5 data-id=""
6 @click="showCreateProductModal"
7 >
8 <span class="create-product-icon">
9 <svg width="12" height="12" fill="none" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">><path stroke="#363B4E" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M5.918.9v10.013M.9 5.907h10.032"/></svg>
10 </span>
11 Create New Product
12 </button>
13
14 <div class="wpfnl-modal-overlay" v-if="isCreateProduct">
15 <div class="wpfnl-modal-wrapper" >
16 <div class="wpfnl-modal-close">
17 <span class="wpfnl-modal-close-btn" @click="removeCreateProductModal">
18 <svg width="12" height="13" fill="none" viewBox="0 0 12 13" xmlns="http://www.w3.org/2000/svg">><path stroke="#7A8B9A" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 1.969l-10 9.99m0-9.99l10 9.99"></path></svg>
19 </span>
20 </div>
21
22 <span className="wpfnl-loader" v-if="isShowModalLoader"></span>
23 <div id="wpfnl-create-product" :style="{ display: !isShowModalLoader ? 'block' : 'none' }">
24 </div>
25 </div>
26 </div>
27 </template>
28
29 <script>
30 export default {
31 name: 'CreateProduct',
32 components: {
33
34 },
35 data: function () {
36 return {
37 isCreateProduct: false,
38 isShowModalLoader: false,
39 productUrl: window?.setup_wizard_obj?.product_url,
40 }
41 },
42 methods: {
43 showCreateProductModal: function () {
44 this.isCreateProduct = true;
45 this.isShowModalLoader = true;
46
47 setTimeout(() => {
48 var container = document.getElementById('wpfnl-create-product');
49
50 // Create an iframe element
51 var iframe = document.createElement('iframe');
52
53 // Set the attributes of the iframe
54 iframe.setAttribute('src', this.productUrl);
55 iframe.setAttribute('width', '100%');
56 iframe.setAttribute('height', '100%');
57 iframe.setAttribute('frameborder', '0');
58
59 iframe.addEventListener('load', () => {
60 this.isShowModalLoader = false;
61 });
62
63 container.appendChild(iframe);
64 // Append the iframe to the container div
65 }, 100);
66 },
67 removeCreateProductModal: function () {
68 this.isCreateProduct = false
69 jQuery('#wpfnl-create-product').empty()
70 },
71 }
72 }
73 </script>