Changeset 46413
- Timestamp:
- 05/17/08 01:29:10 (2 months ago)
- Location:
- quick-shop
- Files:
-
- 27 added
- 2 modified
-
tags/1.3.5 (added)
-
tags/1.3.5/images (added)
-
tags/1.3.5/images/btn_xpressCheckout.gif (added)
-
tags/1.3.5/images/cart_go.png (added)
-
tags/1.3.5/images/cart_remove.png (added)
-
tags/1.3.5/quickshop.php (added)
-
tags/1.3.5/readme.txt (added)
-
tags/1.3.5/tinymce (added)
-
tags/1.3.5/tinymce/cart_add.png (added)
-
tags/1.3.5/tinymce/editor_plugin.js (added)
-
tags/1.3.5/tinymce/langs (added)
-
tags/1.3.5/tinymce/langs/de_de.js (added)
-
tags/1.3.5/tinymce/langs/en.js (added)
-
tags/1.3.5/tinymce/langs/en_US.js (added)
-
tags/1.3.5/tinymce/tinymce.js (added)
-
tags/1.3.5/tinymce/tinymce.php (added)
-
tags/1.3.5/tinymce/window.php (added)
-
tags/1.3.5/tinymce3 (added)
-
tags/1.3.5/tinymce3/cart_add.png (added)
-
tags/1.3.5/tinymce3/editor_plugin.js (added)
-
tags/1.3.5/tinymce3/langs (added)
-
tags/1.3.5/tinymce3/langs/de_de.js (added)
-
tags/1.3.5/tinymce3/langs/en.js (added)
-
tags/1.3.5/tinymce3/langs/en_US.js (added)
-
tags/1.3.5/tinymce3/tinymce.js (added)
-
tags/1.3.5/tinymce3/tinymce.php (added)
-
tags/1.3.5/tinymce3/window.php (added)
-
trunk/quickshop.php (modified) (18 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quick-shop/trunk/quickshop.php
r45527 r46413 5 5 Description: Quick and easy shopping cart with widget! 6 6 Author: Isaac Rowntree 7 Version: 1.3. 47 Version: 1.3.5 8 8 Author URI: http://zackdesign.biz 9 9 … … 91 91 function widget_quickshop($args) 92 92 { 93 if (cart_has_items()) 93 extract($args); 94 95 if (cart_has_items()) 94 96 { 95 97 $defaultSymbol = get_option('quickshop_symbol'); … … 116 118 if (!$freeshipt || ($freeshipt == '')) $freeshipt = 'Shipping is free for orders of $200 and upwards.'; 117 119 118 extract($args); 120 $title = get_option('quickshop_title'); 121 if (($title == '') || !$title ) $title = 'Your Shopping Cart'; 119 122 120 123 echo $before_widget; 121 124 echo '<div class="quickshopcart" style="padding: 5px;">'; 122 echo $before_title . 'Your Shopping Cart'. $after_title;123 124 echo '<br />< form method="post" action=""><table style="width: 100%;">';125 echo $before_title . $title . $after_title; 126 127 echo '<br /><span id="info" style="display: none; font-weight: bold; color: red;">Hit tab or enter to submit new QTY.</span><form method="post" action=""><table style="width: 100%;">'; 125 128 126 129 $count = 1; … … 139 142 140 143 <tr><td style='overflow: hidden;'><a href='".get_permalink($item['postID'])."'>".$item['name']."</a></td> 141 <td style='text-align: center'><form method=\"post\" action=\"\" style='display: inline'>144 <td style='text-align: center'><form method=\"post\" name='cquantity' action=\"\" style='display: inline'> 142 145 <input type='hidden' name='product' value='".$item['name']."' /> 143 146 144 <input type='hidden' name='cquantity' value='1' /><input type='text' name='quantity' value='".$item['quantity']."' size='1' /></form></td>147 <input type='hidden' name='cquantity' value='1' /><input type='text' name='quantity' value='".$item['quantity']."' size='1' onchange='document.cquantity.submit();' onkeypress='document.getElementById(\"info\").style.display = \"\";' /></form></td> 145 148 <td style='text-align: center'>".output_currency(($item['price'] * $item['quantity']),$symbol, $decimal)."</td> 146 149 <td><form method=\"post\" action=\"\"> … … 196 199 197 200 } 201 else 202 { 203 $display = get_option('quickshop_display'); 204 if ($display) 205 { 206 $displayt = get_option('quickshop_displayt'); 207 $title = get_option('quickshop_title'); 208 if (($title == '') || !$title ) $title = 'Your Shopping Cart'; 209 if (($displayt == '') || !$displayt ) $displayt = 'Your Shopping Cart is empty'; 210 echo $before_widget.'<div class="quickshopcart" style="padding: 5px;">'.$before_title . $title . $after_title.'<p>'.$displayt.'<p></div>'.$after_widget; 211 } 212 } 198 213 } 199 214 200 215 function widget_quickshoppaypal($args) 201 216 { 202 if (cart_has_items())203 {204 205 217 extract($args); 218 219 if (cart_has_items()) 220 { 221 222 206 223 207 224 $email = get_bloginfo('admin_email'); … … 230 247 $freeshipt = get_option('quickshop_freeshipt'); 231 248 if (!$freeshipt || ($freeshipt == '')) $freeshipt = 'Shipping is free for orders of $200 and upwards.'; 249 250 $title = get_option('quickshop_title'); 251 if (($title == '') || !$title ) $title = 'Your Shopping Cart'; 232 252 233 253 echo $before_widget; 234 254 echo '<div class="quickshopcart" style=" padding: 5px;">'; 235 echo $before_title . 'Your Shopping Cart'. $after_title;236 237 echo '<br />< table style="width: 100%;">';255 echo $before_title . $title . $after_title; 256 257 echo '<br /><span id="pinfo" style="display: none; font-weight: bold; color: red;">Hit tab or enter to submit new QTY.</span><table style="width: 100%;">'; 238 258 239 259 $count = 1; … … 256 276 257 277 <tr><td style='overflow: hidden;'><a href='".get_permalink($item['postID'])."'>".$item['name']."</a></td> 258 <td style='text-align: center'><form method=\"post\" action=\"\" style='display: inline'>278 <td style='text-align: center'><form method=\"post\" action=\"\" name='pcquantity' style='display: inline'> 259 279 <input type='hidden' name='product' value='".$item['name']."' /> 260 280 261 <input type='hidden' name='cquantity' value='1' /><input type='text' name='quantity' value='".$item['quantity']."' size='1' /></form></td>281 <input type='hidden' name='cquantity' value='1' /><input type='text' name='quantity' value='".$item['quantity']."' size='1' onchange='document.pcquantity.submit();' onkeypress='document.getElementById(\"pinfo\").style.display = \"\";' /></form></td> 262 282 <td style='text-align: center'>".output_currency(($item['price'] * $item['quantity']), $paypal_symbol, $decimal)."</td> 263 283 <td><form method=\"post\" action=\"\"> … … 331 351 332 352 } 353 else 354 { 355 $display = get_option('quickshop_display'); 356 if ($display) 357 { 358 $displayt = get_option('quickshop_displayt'); 359 $title = get_option('quickshop_title'); 360 if (($title == '') || !$title ) $title = 'Your Shopping Cart'; 361 if (($displayt == '') || !$displayt ) $displayt = 'Your Shopping Cart is empty'; 362 echo $before_widget.'<div class="quickshopcart" style="padding: 5px;">'.$before_title . $title . $after_title.'<p>'.$displayt.'<p></div>'.$after_widget; 363 } 364 } 333 365 } 334 366 … … 345 377 { 346 378 347 $addcart = get_option('quickshop_add _cart');379 $addcart = get_option('quickshop_addcart'); 348 380 349 381 if (!$addcart || ($addcart == '') ) … … 391 423 392 424 echo '<div class="wrap"><h2>QuickShop Options</h2>'; 393 if ($_REQUEST['submitform']) {394 //update_quickshop_options();395 }396 425 print_quickshop_form(); 397 426 echo '</div>'; 398 427 399 }400 401 function update_quickshop_options() {402 $updated = false;403 404 update_option('quickshop_currency', $_REQUEST['currency']);405 update_option('quickshop_churl', $_REQUEST['churl']);406 update_option('quickshop_symbol', $_REQUEST['symbol']);407 update_option('quickshop_decimal', $_REQUEST['decimal']);408 update_option('quickshop_pemail', $_REQUEST['pemail']);409 update_option('quickshop_add_cart', $_REQUEST['addcart']);410 if (!$_REQUEST['total'])411 $_REQUEST['total'] = 0;412 if (!$_REQUEST['display'])413 $_REQUEST['display'] = 0;414 update_option('quickshop_display', $_REQUEST['display']);415 update_option('quickshop_total', $_REQUEST['total']);416 update_option('quickshop_location', $_REQUEST['location']);417 update_option('quickshop_freeshipv', $_REQUEST['freeshipv']);418 update_option('quickshop_freeshipt', $_REQUEST['freeshipt']);419 $updated = true;420 421 422 if ($updated) {423 echo '<div id="message" class="updated fade">';424 echo '<p>Options Updated</p>';425 echo '</div>';426 } else {427 echo '<div id="message" class="error fade">';428 echo '<p>Unable to update options</p>';429 echo '</div>';430 }431 428 } 432 429 … … 442 439 $defaultChURL = get_option('quickshop_churl'); 443 440 if (!$defaultChURL || ($defaultChURL == '')) $defaultChURL = 'contact'; 444 $addcart = get_option('quickshop_add _cart');445 if ( !$addcart || ($addcart == '')) $addcart = 'Add to Cart';441 $addcart = get_option('quickshop_addcart'); 442 if ($addcart == '') $addcart = 'Add to Cart'; 446 443 447 444 if (get_option('quickshop_display')) … … 463 460 if (!$freeshipv || ($freeshipv == '')) $freeshipv = '0'; 464 461 $freeshipt = get_option('quickshop_freeshipt'); 465 if (!$freeshipt || ($freeshipt == '')) $freeshipt = 'Shipping is free for orders of $200 and upwards.'; 462 if (($freeshipt == '') || !$freeshipt) $freeshipt = 'Shipping is free for orders of $200 and upwards.'; 463 $displayt = get_option('quickshop_displayt'); 464 if (($displayt == '') || !$displayt) $displayt = 'Your cart is empty.'; 465 466 $title = get_option('quickshop_title'); 467 if (($title == '') || !$title) $title = 'Your Shopping Cart'; 466 468 467 469 … … 471 473 echo ' 472 474 <table class="form-table"> 475 <tr valign="top"> 476 <th scope="row">Shopping Cart title</th> 477 <td><input type="text" name="quickshop_title" value="'.$title.'" /></td> 478 </tr> 473 479 <tr valign="top"> 474 480 <th scope="row">Currency</th> … … 487 493 <tr valign="top"> 488 494 <th scope="row">Display Shopping Cart when Empty?</th> 489 <td><input type="checkbox" name="quickshop_display" value="1" '.$checked.' /> </td>495 <td><input type="checkbox" name="quickshop_display" value="1" '.$checked.' /> - Text to display when empty: <input type="text" name="quickshop_displayt" value="'.$displayt.'" size="70" /></td> 490 496 </tr> 491 497 <tr valign="top"> … … 526 532 <tr valign="top"> 527 533 <th scope="row">Notification text</th> 528 <td><input type="text" name="quickshop_ reeshipt" value="'.$freeshipt.'" size="100" /></td>534 <td><input type="text" name="quickshop_freeshipt" value="'.$freeshipt.'" size="100" /></td> 529 535 </tr> 530 536 </table> … … 533 539 <input type="submit" name="Submit" value="Update Options »" /> 534 540 <input type="hidden" name="action" value="update" /> 535 <input type="hidden" name="page_options" value="quickshop_currency,quickshop_churl,quickshop_symbol,quickshop_decimal,quickshop_pemail,quickshop_addcart,quickshop_total,quickshop_display,quickshop_location,quickshop_freeshipv,quickshop_freeshipt " />541 <input type="hidden" name="page_options" value="quickshop_currency,quickshop_churl,quickshop_symbol,quickshop_decimal,quickshop_pemail,quickshop_addcart,quickshop_total,quickshop_display,quickshop_location,quickshop_freeshipv,quickshop_freeshipt,quickshop_displayt,quickshop_title" /> 536 542 </p> 537 543 538 544 539 <h3>Like what you see? Are you Australian?</h3> 540 <p><a href="http://ozedeals.biz">Please help support Zack Design and the author of Quick Shop by shopping online for hardware, 541 software, tuition, notebooks, and desktop PCs at our online site. We offer great prices and better support.</a></p> 542 <p>Not to mention we have also developed solutions for multiple monitors, seamless integration between 543 computer systems so you can control multiple systems at once, and more!</p> 545 <h3>Do you like QuickShop?</h3> 546 <h4>Websites</h4> 547 <p>Zack Design has completed many websites, themes, and plugins. This one is free for you to use and has been perfected over countless hours. Please either <a href="http://zackdesign.biz/wp-plugins/34">donate</a> or <a href="http://zackdesign.biz/">consider using Zack Design for your next project!</a></p> 548 <h4>Computers</h4> 549 <p><a href="http://ozedeals.biz">ozEdeals.biz</a> is a new shop Zack Design has opened on-line using QuickShop for all to see. (Note: Shipping to Australian residents only)</p> 550 <h4>VirtualBox, Synergy, more than 2 Desktop Monitors, Networks, Linux and more!</h4> 551 <p>Zack Design knows all the tricks when it comes to setting up your office with multiple monitors, seamlessly integrating multiple PCs with different operating systems, virtual machines like VirtualBox for emulating Windows or Linux on your desktop, and can setup and configure wireless and wired networks as well as network servers easily. <a href="http://zackdesign.biz/contact">Contact us today to increase your productivity!</a></p> 544 552 545 553 </form> … … 566 574 function cart_has_items() 567 575 { 568 if (get_option('quickshop_display'))569 return 1;570 else571 {572 576 $count = 0; 573 577 if (isset($_SESSION['qscart']) && is_array($_SESSION['qscart'])) … … 579 583 else 580 584 return 0; 581 }582 585 } 583 586 -
quick-shop/trunk/readme.txt
r45527 r46413 5 5 Requires at least: 2.3 6 6 Tested up to: 2.5 7 Stable tag: 1.3. 47 Stable tag: 1.3.5 8 8 9 9 QuickShop has two shopping-cart widgets, automatically adds buttons to your posts, and includes a TinyMCE editor button. … … 102 102 == Latest Changes == 103 103 104 Changelog: 104 1.3.5 105 106 - Fixed numerous bugs in admin section as well as adding the ability to change the widget title 107 - Added javascript key checking and form submission to QTY changing field to make it less likely to fail - should work everywhere now! 105 108 106 109 1.3.4
