Changeset 3211875
- Timestamp:
- 12/22/2024 05:52:43 PM (16 months ago)
- Location:
- cartlink-generator
- Files:
-
- 14 added
- 8 edited
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (modified) (previous)
-
assets/screenshot-4.png (added)
-
tags/1.0.1 (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/admin-scripts.js (added)
-
tags/1.0.1/assets/admin-styles.css (added)
-
tags/1.0.1/cartlink-generator.php (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/admin-page.php (added)
-
tags/1.0.1/includes/ajax-functions.php (added)
-
tags/1.0.1/includes/hooks.php (added)
-
tags/1.0.1/includes/utilities.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/templates (added)
-
tags/1.0.1/templates/admin-page.php (added)
-
trunk/assets/admin-scripts.js (modified) (4 diffs)
-
trunk/assets/admin-styles.css (modified) (2 diffs)
-
trunk/cartlink-generator.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/templates/admin-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cartlink-generator/trunk/assets/admin-scripts.js
r3211475 r3211875 13 13 clearTimeout(timeout); 14 14 15 jQuery(".gvncl_notfound").remove(); 15 16 // Set a new timeout to delay the AJAX request 16 17 timeout = setTimeout(() => { … … 32 33 const suggestions = response.data; 33 34 35 34 36 // Create the dropdown 35 37 let dropdown = document.getElementById('autocomplete-dropdown'); … … 38 40 dropdown.id = 'autocomplete-dropdown'; 39 41 document.querySelector('.wrapautogen').appendChild(dropdown); 42 } 43 44 if(suggestions==''){ 45 jQuery("#autocomplete-dropdown").html('<p class="gvncl_notfound">No products found</p>'); 46 return; 40 47 } 41 48 … … 69 76 dropdown.innerHTML = ''; 70 77 jQuery(".pregenerate").parent().show(); 78 jQuery("#selected-products").show(); 71 79 }); 72 80 }); -
cartlink-generator/trunk/assets/admin-styles.css
r3211475 r3211875 1 1 #selected-products .quantity{width:60px} 2 #selected-products .product-row,.wrapnput{display:flex;padding:10px;max-width:100%; width:500px}2 #selected-products .product-row,.wrapnput{display:flex;padding:10px;max-width:100%;} 3 3 #selected-products .product-row-inner{display:flex;align-self:center} 4 4 #selected-products .product-row>span{flex-grow:1;padding-right:10px} … … 8 8 #product-search{width:100%} 9 9 .autogenresponse{margin-top:30px;margin-left:10px;margin-right:10px} 10 .wrapautogen{padding-left:15px} 10 11 .wrapautogen{margin:20px} 12 /* General Styles */ 13 #wpbody-content { 14 font-family: Arial, sans-serif; 15 background: #f9f9f9; 16 padding: 20px; 17 border-radius: 10px; 18 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 19 box-sizing: border-box; 20 } 21 22 /* Page Title */ 23 h1 { 24 text-align: center; 25 font-size: 2em; 26 color: #333; 27 margin-bottom: 30px; 28 } 29 30 /* Search Box */ 31 .wrapnput { 32 display: flex; 33 justify-content: center; 34 margin-bottom: 20px; 35 margin-left:0px; 36 margin-right:0px; 37 } 38 39 #product-search { 40 width: 60%; 41 padding: 12px 15px; 42 font-size: 1.1em; 43 border: 2px solid #ddd; 44 border-radius: 30px; 45 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 46 transition: all 0.3s ease; 47 } 48 49 #product-search:focus { 50 outline: none; 51 border-color: #007cba; 52 box-shadow: 0 4px 8px rgba(0, 123, 186, 0.2); 53 } 54 55 /* Autocomplete Dropdown */ 56 #autocomplete-dropdown { 57 margin-top: 10px; 58 max-width: 60%; 59 margin-left: auto; 60 margin-right: auto; 61 background: #fff; 62 border: 0px solid #ddd; 63 border-radius: 10px; 64 overflow: hidden; 65 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 66 } 67 68 .autocomplete-item { 69 padding: 10px 15px; 70 font-size: 1em; 71 cursor: pointer; 72 transition: background 0.3s ease; 73 } 74 .gvncl_notfound{padding:10px} 75 .autocomplete-item:hover { 76 background: #f0f8ff; 77 } 78 79 /* Selected Products Section */ 80 #selected-products { 81 max-width: calc(60% - 40px); 82 margin: 20px auto; 83 padding: 10px; 84 background: #fff; 85 border: 1px solid #ddd; 86 border-radius: 10px; 87 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 88 } 89 90 91 .product-row { 92 display: flex; 93 align-items: center; 94 justify-content: space-between; 95 padding: 10px 15px; 96 border-bottom: 1px solid #eee; 97 } 98 99 .product-row:last-child { 100 border-bottom: none; 101 } 102 103 .product-row span { 104 flex-grow: 1; 105 font-size: 1.1em; 106 color: #333; 107 } 108 109 .product-row-inner { 110 margin-left: 10px; 111 } 112 113 .quantity, .price { 114 width: 80px; 115 padding: 5px 10px; 116 font-size: 1em; 117 border: 1px solid #ddd; 118 border-radius: 5px; 119 } 120 121 /* Generate Link Section */ 122 #generate-link { 123 display: block; 124 margin: 20px auto; 125 padding: 12px 30px; 126 background: #007cba; 127 color: #fff; 128 font-size: 1.2em; 129 border: none; 130 border-radius: 30px; 131 cursor: pointer; 132 transition: background 0.3s ease; 133 } 134 135 #generate-link:hover { 136 background: #005f8c; 137 } 138 139 /* Footer Section */ 140 div[style*="margin-top:100px"] { 141 text-align: center; 142 font-size: 0.9em; 143 color: #666; 144 } 145 146 div[style*="margin-top:100px"] a { 147 color: #007cba; 148 text-decoration: none; 149 font-weight: bold; 150 } 151 152 div[style*="margin-top:100px"] a:hover { 153 text-decoration: underline; 154 } 155 156 /* Responsive Adjustments */ 157 @media (max-width: 768px) { 158 #selected-products,#autocomplete-dropdown,#product-search { 159 width: 90%; max-width: 90% !important; 160 } 161 162 #autocomplete-dropdown, #selected-products { 163 max-width: 90%; 164 } 165 } 166 167 168 /* Style for the Custom Discount and Expire Days sections */ 169 #customdiscount, #expiredays { 170 display: flex; 171 align-items: center; 172 justify-content: center; 173 margin: 20px auto; 174 font-size: 1.1em; 175 color: #333; 176 } 177 178 /* Input Fields */ 179 #customdiscount input, #expiredays input { 180 margin-left: 10px; 181 padding: 10px; 182 width: 80px; 183 font-size: 1em; 184 border: 1px solid #ddd; 185 border-radius: 5px; 186 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 187 transition: all 0.3s ease; 188 } 189 190 #customdiscount input:focus, #expiredays input:focus { 191 outline: none; 192 border-color: #007cba; 193 box-shadow: 0 4px 8px rgba(0, 123, 186, 0.2); 194 } 195 196 /* Label Alignment */ 197 #customdiscount label, #expiredays label { 198 display: flex; 199 align-items: center; 200 justify-content: space-between; 201 font-size: 1.1em; 202 font-weight: bold; 203 color: #555; 204 } 205 206 /* Container Wrapping */ 207 #customdiscount, #expiredays { 208 max-width: 400px; 209 text-align: left; 210 } 211 212 /* Responsive Adjustments */ 213 @media (max-width: 768px) { 214 #customdiscount, #expiredays { 215 flex-direction: column; 216 align-items: flex-start; 217 } 218 219 #customdiscount input, #expiredays input { 220 margin-left: 0; 221 margin-top: 10px; 222 } 223 } -
cartlink-generator/trunk/cartlink-generator.php
r3211475 r3211875 3 3 * Plugin Name: CartLink Generator for WooCommerce 4 4 * Description: Create dynamic cart links with pre-filled products, quantities, and custom prices, perfect for businesses interacting via chat to reduce purchase steps and drive faster conversions. 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Author: Guaven Labs 7 7 * Text Domain: cartlink-generator … … 18 18 define( 'GUAVEN_CARTLINK_GENERATOR_PATH', plugin_dir_path( __FILE__ ) ); 19 19 define( 'GUAVEN_CARTLINK_GENERATOR_URL', plugin_dir_url( __FILE__ ) ); 20 define( 'GUAVEN_CARTLINK_GENERATOR_VERSION', '1.0. 0.2');20 define( 'GUAVEN_CARTLINK_GENERATOR_VERSION', '1.0.1.0'); 21 21 22 22 -
cartlink-generator/trunk/readme.txt
r3211752 r3211875 8 8 WC tested up to: 9.4 9 9 Requires Plugins: woocommerce 10 Stable tag: 1.0. 010 Stable tag: 1.0.1 11 11 License: GPLv2 or later 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 17 17 18 18 Create pre-filled **cart and checkout links** for your customers with one click! 19 CartLink Generator for WooCommerce empowers store owners and merchants to create dynamic cart links with pre-filled products, quantities, and custom prices. This is particularly helpful for shops and businesses that interact with customers via chat, enabling them to quickly generate cart links for faster conversions. The plugin simplifies the customer journey, reducing the steps to purchase by 3-4 steps compared to traditional e-commerce workflows. 19 20 CartLink Generator for WooCommerce empowers store owners and merchants to create dynamic cart links with pre-filled products, quantities, and custom prices. This is particularly helpful for shops and businesses that interact with customers via chat, enabling them to quickly generate cart links for faster conversions. 21 The plugin reduces the steps to purchase by 3-4 steps compared to traditional e-commerce workflows. 20 22 21 23 ### Key Features: 22 - Create and share dynamic cart links.24 - Create and share dynamic cart/checkout links. 23 25 - Customize redirection to either the **Cart** page or **Checkout** page. 24 26 - Add the menu as a top-level item or under the WooCommerce submenu. … … 78 80 == Screenshots == 79 81 80 1. ** Admin Interface**: Easily configure and generate cart links.82 1. **Conversation with Your Clients**. 81 83 2. **Product Autocomplete**: Search and add products efficiently to cart links. 82 3. **Generated Direct Checkout Page**: Shareable cart link ready for customers to use. 84 3. **Admin Interface**: Easily configure and generate cart links. 85 4. **Generated Direct Checkout Page**: Shareable cart link ready for customers to use. 86 5. **Generated Direct Checkout Page**: Shareable cart link ready for customers to use. 83 87 84 88 == Changelog == 89 90 = 1.0.1 = 91 * UI improvements. 85 92 86 93 = 1.0.0 = -
cartlink-generator/trunk/templates/admin-page.php
r3211475 r3211875 7 7 <div class="clear clearfix"></div> 8 8 <div class="wrapautogen"></div> 9 <div id="selected-products" ></div>9 <div id="selected-products" style="display:none"></div> 10 10 11 <br> 11 12 <!-- Add fixed subtotal field --> 12 < label style=" display: none;margin-left: 10px; margin-top: 20px; margin-bottom: 10px; ">Custom Subtotal Discount (if there is): <input type="text" class="pregenerate" id="fixed-subtotal"13 style="width: 50px; max-width: 100%;">13 <p id="expiredays"><label style="display: none;margin-left: 10px; margin-top: 20px; margin-bottom: 10px; ">Custom Subtotal Discount (if there is): 14 <input type="text" class="pregenerate" id="fixed-subtotal" style="width: 50px; max-width: 100%;"> 14 15 </label> 15 < br>16 </p> 16 17 17 <p ><label style="display: none;margin-left: 10px; margin-top: 20px; margin-bottom: 10px; ">Expire Days: <input type="number" class="pregenerate" id="expire-days" value="1" placeholder="Default 1"18 <p id="customdiscount"><label style="display: none;margin-left: 10px; margin-top: 20px; margin-bottom: 10px; ">Expire Days: <input type="number" class="pregenerate" id="expire-days" value="1" placeholder="Default 1" 18 19 style="width: 50px; max-width: 100%;"> 19 20 </label></p>
Note: See TracChangeset
for help on using the changeset viewer.