Permalink
Browse files

WooCommerce conversion and update

  • Loading branch information...
1 parent 8e8613b commit 0425a68eca45e4a3e39804543504b255eb5c31a9 @mikejolley mikejolley committed Aug 10, 2011
Showing with 10,398 additions and 23,580 deletions.
  1. +42 −51 admin/{jigoshop-admin-attributes.php → admin-attributes.php}
  2. +71 −87 admin/{jigoshop-admin-dashboard.php → admin-dashboard.php}
  3. +87 −0 admin/admin-import.php
  4. +77 −87 admin/{jigoshop-admin.php → admin-init.php}
  5. +78 −93 admin/{jigoshop-install.php → admin-install.php}
  6. +83 −84 admin/{jigoshop-admin-post-types.php → admin-post-types.php}
  7. +1,082 −0 admin/admin-settings.php
  8. +0 −583 admin/jigoshop-admin-settings-options.php
  9. +0 −516 admin/jigoshop-admin-settings.php
  10. +0 −192 admin/jigoshop-write-panels.php
  11. +0 −44 admin/write-panels/product-types/grouped.php
  12. +0 −44 admin/write-panels/product-types/virtual.php
  13. +603 −0 admin/writepanels/writepanel-order_data.php
  14. +10 −21 ...ite-panels/product-types/downloadable.php → writepanels/writepanel-product-type-downloadable.php}
  15. +44 −61 admin/{write-panels/product-types/variable.php → writepanels/writepanel-product-type-variable.php}
  16. +84 −0 admin/writepanels/writepanel-product-types.php
  17. +569 −0 admin/writepanels/writepanel-product_data.php
  18. +176 −0 admin/writepanels/writepanels-init.php
  19. +219 −93 assets/css/admin.less
  20. +0 −129 assets/css/datepicker.css
  21. +0 −1,109 assets/css/frontend.css
  22. +7 −7 assets/css/ui.css
  23. +150 −0 assets/css/woocommerce.css
  24. +3 −3 assets/css/{frontend.less → woocommerce.less}
  25. BIN assets/images/add.png
  26. BIN assets/images/calendar.png
  27. BIN assets/images/cross.png
  28. BIN assets/images/cross_white.png
  29. BIN assets/images/edit.png
  30. BIN assets/images/fancybox/fancy_close.png
  31. BIN assets/images/fancybox/fancy_loading.png
  32. BIN assets/images/fancybox/fancy_nav_left.png
  33. BIN assets/images/fancybox/fancy_nav_right.png
  34. BIN assets/images/fancybox/fancy_shadow_n.png
  35. BIN assets/images/fancybox/fancy_shadow_ne.png
  36. BIN assets/images/fancybox/fancy_shadow_nw.png
  37. BIN assets/images/fancybox/fancy_shadow_s.png
  38. BIN assets/images/fancybox/fancy_shadow_w.png
  39. BIN assets/images/fancybox/fancy_title_over.png
  40. BIN assets/images/fancybox/fancybox-x.png
  41. BIN assets/images/fancybox/fancybox-y.png
  42. BIN assets/images/fancybox/fancybox.png
  43. BIN assets/images/icons/menu_icons.png
  44. BIN assets/images/icons/paypal.png
  45. BIN assets/images/icons/skrill.png
  46. BIN assets/images/jigoshop.png
  47. BIN assets/images/jigowatt.png
  48. BIN assets/images/minus.png
  49. BIN assets/images/placeholder.png
  50. BIN assets/images/remove.png
  51. BIN assets/images/star.png
  52. BIN assets/images/tip.png
  53. BIN assets/images/ui/ui-bg_flat_0_aaaaaa_40x100.png
  54. BIN assets/images/ui/ui-bg_glass_55_fbf9ee_1x400.png
  55. BIN assets/images/ui/ui-bg_glass_65_ffffff_1x400.png
  56. BIN assets/images/ui/ui-bg_glass_75_dadada_1x400.png
  57. BIN assets/images/ui/ui-bg_glass_75_e6e6e6_1x400.png
  58. BIN assets/images/ui/ui-bg_glass_75_ffffff_1x400.png
  59. BIN assets/images/ui/ui-bg_highlight-soft_75_cccccc_1x100.png
  60. BIN assets/images/ui/ui-bg_inset-soft_95_fef1ec_1x100.png
  61. BIN assets/images/ui/ui-icons_222222_256x240.png
  62. BIN assets/images/ui/ui-icons_2e83ff_256x240.png
  63. BIN assets/images/ui/ui-icons_454545_256x240.png
  64. BIN assets/images/ui/ui-icons_888888_256x240.png
  65. BIN assets/images/ui/ui-icons_cd0a0a_256x240.png
  66. 0 assets/js/{jquery.fancybox-1.3.4.pack.js → fancybox.js}
  67. +2 −2 assets/js/{script.js → woocommerce.js}
  68. +1 −1 assets/js/{jigoshop_backend.js → woocommerce_admin.js}
  69. 0 assets/js/{jigoshop_frontend.js → woocommerce_plugins.js}
  70. +14 −14 assets/js/write-panels.js
  71. +62 −62 classes/{jigoshop_cart.class.php → cart.class.php}
  72. +120 −118 classes/{jigoshop_checkout.class.php → checkout.class.php}
  73. +18 −18 classes/{jigoshop_countries.class.php → countries.class.php}
  74. +41 −0 classes/coupons.class.php
  75. +13 −13 classes/{jigoshop_customer.class.php → customer.class.php}
  76. +204 −0 classes/gateways/gateway-banktransfer.php
  77. +114 −0 classes/gateways/gateway-cheque.php
  78. +307 −0 classes/gateways/gateway-moneybookers.php
  79. +66 −60 gateways/paypal.php → classes/gateways/gateway-paypal.php
  80. +11 −5 { → classes}/gateways/gateway.class.php
  81. +11 −5 { → classes}/gateways/gateways.class.php
  82. +0 −41 classes/jigoshop_coupons.class.php
  83. +32 −32 classes/{jigoshop_order.class.php → order.class.php}
  84. +8 −8 classes/{jigoshop_orders.class.php → orders.class.php}
  85. +33 −33 classes/{jigoshop_product.class.php → product.class.php}
  86. +11 −11 classes/{jigoshop_product_variation.class.php → product_variation.class.php}
  87. +197 −0 classes/shipping/shipping-flat_rate.php
  88. +116 −0 classes/shipping/shipping-free_shipping.php
  89. +15 −5 { → classes}/shipping/shipping.class.php
  90. +15 −5 { → classes}/shipping/shipping_method.class.php
  91. +20 −20 classes/{jigoshop_tax.class.php → tax.class.php}
  92. +5 −5 classes/{jigoshop_validation.class.php → validation.class.php}
  93. +20 −21 classes/{jigoshop.class.php → woocommerce.class.php}
  94. +0 −108 gateways/cheque.php
  95. +0 −300 gateways/skrill.php
  96. BIN languages/jigoshop-de_DE.mo
  97. +0 −5,198 languages/jigoshop-de_DE.po
  98. +0 −3,729 languages/jigoshop-en_GB.po
  99. BIN languages/jigoshop-fr_FR.mo
  100. +0 −5,011 languages/jigoshop-fr_FR.po
  101. +0 −4,988 languages/jigoshop.pot
  102. +29 −153 readme.txt
  103. BIN screenshot-1.png
  104. BIN screenshot-2.png
  105. BIN screenshot-3.png
  106. BIN screenshot-4.png
  107. BIN screenshot-5.png
  108. BIN screenshot-6.png
  109. BIN screenshot-7.png
  110. BIN screenshot-8.png
  111. BIN screenshot-9.png
  112. BIN shipping/.DS_Store
  113. +0 −182 shipping/flat_rate.php
  114. +0 −107 shipping/free_shipping.php
  115. +181 −0 shortcodes/shortcode-cart.php
  116. +41 −0 shortcodes/shortcode-checkout.php
  117. +528 −0 shortcodes/shortcode-my_account.php
  118. +151 −0 shortcodes/shortcode-order_tracking.php
  119. +154 −0 shortcodes/shortcode-pay.php
  120. +65 −0 shortcodes/shortcode-thankyou.php
  121. +205 −0 shortcodes/shortcodes-init.php
  122. +8 −8 templates/archive-product.php
  123. +5 −5 templates/checkout/form.php
  124. +16 −16 templates/checkout/pay_for_order.php
  125. +48 −48 templates/checkout/review_order.php
  126. +8 −8 templates/loop-shop.php
  127. +5 −5 templates/product_taxonomy.php
  128. +19 −19 templates/single-product-reviews.php
  129. +9 −9 templates/single-product.php
  130. +1 −1 templates/taxonomy-product_cat.php
  131. +1 −1 templates/taxonomy-product_tag.php
  132. +0 −1 version.txt
  133. +80 −0 widgets/widget-cart.php
  134. +100 −0 widgets/widget-featured_products.php
  135. +172 −0 widgets/widget-layered_nav.php
  136. +115 −0 widgets/widget-price_filter.php
  137. +111 −0 widgets/widget-product_categories.php
  138. +57 −0 widgets/widget-product_search.php
  139. +62 −0 widgets/widget-product_tag_cloud.php
  140. +123 −0 widgets/widget-recent_products.php
  141. +31 −0 widgets/widgets-init.php
  142. +574 −0 woocommerce.php
  143. +626 −0 woocommerce_actions.php
  144. +286 −0 woocommerce_emails.php
  145. +288 −0 woocommerce_query.php
  146. +419 −0 woocommerce_taxonomy.php
  147. +84 −0 woocommerce_template_actions.php
  148. +799 −0 woocommerce_template_functions.php
  149. +156 −0 woocommerce_templates.php
@@ -2,23 +2,20 @@
/**
* Functions used for the attributes section in WordPress Admin
*
- * The attributes section lets users add custom attributes to assign to products - they can also be used in the layered nav widgets.
+ * The attributes section lets users add custom attributes to assign to products - they can also be used in the layered nav widget.
*
- * @author Jigowatt
+ * @author WooThemes
* @category Admin
- * @package JigoShop
+ * @package WooCommerce
*/
/**
* Attributes admin panel
*
* Shows the created attributes and lets you add new ones.
* The added attributes are stored in the database and can be used for layered navigation.
- *
- * @since 1.0
- * @usedby jigoshop_admin_menu2()
*/
-function jigoshop_attributes() {
+function woocommerce_attributes() {
global $wpdb;
@@ -30,9 +27,9 @@ function jigoshop_attributes() {
if ($attribute_name && $attribute_type && !taxonomy_exists('product_attribute_'.strtolower(sanitize_title($attribute_name)))) :
- $wpdb->insert( $wpdb->prefix . "jigoshop_attribute_taxonomies", array( 'attribute_name' => $attribute_name, 'attribute_type' => $attribute_type ), array( '%s', '%s' ) );
+ $wpdb->insert( $wpdb->prefix . "woocommerce_attribute_taxonomies", array( 'attribute_name' => $attribute_name, 'attribute_type' => $attribute_type ), array( '%s', '%s' ) );
- update_option('jigowatt_update_rewrite_rules', '1');
+ update_option('woocommerce_update_rewrite_rules', '1');
wp_safe_redirect( get_admin_url() . 'admin.php?page=attributes' );
exit;
@@ -47,7 +44,7 @@ function jigoshop_attributes() {
$attribute_type = $_POST['attribute_type'];
- $wpdb->update( $wpdb->prefix . "jigoshop_attribute_taxonomies", array( 'attribute_type' => $attribute_type ), array( 'attribute_id' => $_GET['edit'] ), array( '%s' ) );
+ $wpdb->update( $wpdb->prefix . "woocommerce_attribute_taxonomies", array( 'attribute_type' => $attribute_type ), array( 'attribute_id' => $_GET['edit'] ), array( '%s' ) );
endif;
@@ -60,9 +57,9 @@ function jigoshop_attributes() {
if ($delete>0) :
- $att_name = $wpdb->get_var("SELECT attribute_name FROM " . $wpdb->prefix . "jigoshop_attribute_taxonomies WHERE attribute_id = '$delete'");
+ $att_name = $wpdb->get_var("SELECT attribute_name FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_id = '$delete'");
- if ($att_name && $wpdb->query("DELETE FROM " . $wpdb->prefix . "jigoshop_attribute_taxonomies WHERE attribute_id = '$delete'")) :
+ if ($att_name && $wpdb->query("DELETE FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_id = '$delete'")) :
$taxonomy = 'product_attribute_'.strtolower(sanitize_title($att_name));
@@ -85,9 +82,9 @@ function jigoshop_attributes() {
endif;
if (isset($_GET['edit']) && $_GET['edit'] > 0) :
- jigoshop_edit_attribute();
+ woocommerce_edit_attribute();
else :
- jigoshop_add_attribute();
+ woocommerce_add_attribute();
endif;
}
@@ -96,40 +93,37 @@ function jigoshop_attributes() {
* Edit Attribute admin panel
*
* Shows the interface for changing an attributes type between select, multiselect and text
- *
- * @since 1.0
- * @usedby jigoshop_attributes()
*/
-function jigoshop_edit_attribute() {
+function woocommerce_edit_attribute() {
global $wpdb;
$edit = absint($_GET['edit']);
- $att_type = $wpdb->get_var("SELECT attribute_type FROM " . $wpdb->prefix . "jigoshop_attribute_taxonomies WHERE attribute_id = '$edit'");
+ $att_type = $wpdb->get_var("SELECT attribute_type FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_id = '$edit'");
?>
- <div class="wrap jigoshop">
- <div class="icon32 icon32-attributes" id="icon-jigoshop"><br/></div>
- <h2><?php _e('Attributes','jigoshop') ?></h2>
+ <div class="wrap woocommerce">
+ <div class="icon32 icon32-attributes" id="icon-woocommerce"><br/></div>
+ <h2><?php _e('Attributes', 'woothemes') ?></h2>
<br class="clear" />
<div id="col-container">
<div id="col-left">
<div class="col-wrap">
<div class="form-wrap">
- <h3><?php _e('Edit Attribute','jigoshop') ?></h3>
- <p><?php _e('Attribute taxonomy names cannot be changed; you may only change an attributes type.','jigoshop') ?></p>
+ <h3><?php _e('Edit Attribute', 'woothemes') ?></h3>
+ <p><?php _e('Attribute taxonomy names cannot be changed; you may only change an attributes type.', 'woothemes') ?></p>
<form action="admin.php?page=attributes&amp;edit=<?php echo $edit; ?>" method="post">
<div class="form-field">
- <label for="attribute_type"><?php _e('Attribute type', 'jigoshop'); ?></label>
+ <label for="attribute_type"><?php _e('Attribute type', 'woothemes'); ?></label>
<select name="attribute_type" id="attribute_type" style="width: 100%;">
- <option value="select" <?php if ($att_type=='select') echo 'selected="selected"'; ?>><?php _e('Select','jigoshop') ?></option>
- <option value="multiselect" <?php if ($att_type=='multiselect') echo 'selected="selected"'; ?>><?php _e('Multiselect','jigoshop') ?></option>
- <option value="text" <?php if ($att_type=='text') echo 'selected="selected"'; ?>><?php _e('Text','jigoshop') ?></option>
+ <option value="select" <?php if ($att_type=='select') echo 'selected="selected"'; ?>><?php _e('Select', 'woothemes') ?></option>
+ <option value="multiselect" <?php if ($att_type=='multiselect') echo 'selected="selected"'; ?>><?php _e('Multiselect', 'woothemes') ?></option>
+ <option value="text" <?php if ($att_type=='text') echo 'selected="selected"'; ?>><?php _e('Text', 'woothemes') ?></option>
</select>
</div>
- <p class="submit"><input type="submit" name="save_attribute" id="submit" class="button" value="<?php _e('Save Attribute', 'jigoshop'); ?>"></p>
+ <p class="submit"><input type="submit" name="save_attribute" id="submit" class="button" value="<?php _e('Save Attribute', 'woothemes'); ?>"></p>
</form>
</div>
</div>
@@ -144,37 +138,34 @@ function jigoshop_edit_attribute() {
* Add Attribute admin panel
*
* Shows the interface for adding new attributes
- *
- * @since 1.0
- * @usedby jigoshop_attributes()
*/
-function jigoshop_add_attribute() {
+function woocommerce_add_attribute() {
?>
- <div class="wrap jigoshop">
- <div class="icon32 icon32-attributes" id="icon-jigoshop"><br/></div>
- <h2><?php _e('Attributes','jigoshop') ?></h2>
+ <div class="wrap woocommerce">
+ <div class="icon32 icon32-attributes" id="icon-woocommerce"><br/></div>
+ <h2><?php _e('Attributes', 'woothemes') ?></h2>
<br class="clear" />
<div id="col-container">
<div id="col-right">
<div class="col-wrap">
<table class="widefat fixed" style="width:100%">
<thead>
<tr>
- <th scope="col"><?php _e('Name','jigoshop') ?></th>
- <th scope="col"><?php _e('Type','jigoshop') ?></th>
- <th scope="col"><?php _e('Terms','jigoshop') ?></th>
+ <th scope="col"><?php _e('Name', 'woothemes') ?></th>
+ <th scope="col"><?php _e('Type', 'woothemes') ?></th>
+ <th scope="col"><?php _e('Terms', 'woothemes') ?></th>
</tr>
</thead>
<tbody>
<?php
- $attribute_taxonomies = jigoshop::$attribute_taxonomies;
+ $attribute_taxonomies = woocommerce::$attribute_taxonomies;
if ( $attribute_taxonomies ) :
foreach ($attribute_taxonomies as $tax) :
?><tr>
<td><a href="edit-tags.php?taxonomy=product_attribute_<?php echo strtolower(sanitize_title($tax->attribute_name)); ?>&amp;post_type=product"><?php echo $tax->attribute_name; ?></a>
- <div class="row-actions"><span class="edit"><a href="<?php echo add_query_arg('edit', $tax->attribute_id, 'admin.php?page=attributes') ?>"><?php _e('Edit', 'jigoshop'); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo add_query_arg('delete', $tax->attribute_id, 'admin.php?page=attributes') ?>"><?php _e('Delete', 'jigoshop'); ?></a></span></div>
+ <div class="row-actions"><span class="edit"><a href="<?php echo add_query_arg('edit', $tax->attribute_id, 'admin.php?page=attributes') ?>"><?php _e('Edit', 'woothemes'); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo add_query_arg('delete', $tax->attribute_id, 'admin.php?page=attributes') ?>"><?php _e('Delete', 'woothemes'); ?></a></span></div>
</td>
<td><?php echo ucwords($tax->attribute_type); ?></td>
<td><?php
@@ -196,7 +187,7 @@ function jigoshop_add_attribute() {
</tr><?php
endforeach;
else :
- ?><tr><td colspan="5"><?php _e('No attributes currently exist.','jigoshop') ?></td></tr><?php
+ ?><tr><td colspan="5"><?php _e('No attributes currently exist.', 'woothemes') ?></td></tr><?php
endif;
?>
</tbody>
@@ -206,28 +197,28 @@ function jigoshop_add_attribute() {
<div id="col-left">
<div class="col-wrap">
<div class="form-wrap">
- <h3><?php _e('Add New Attribute','jigoshop') ?></h3>
- <p><?php _e('Attributes let you define extra product data, such as size or colour. You can use these attributes in the shop sidebar using the "layered nav" widgets. Please note: you cannot rename an attribute later on.','jigoshop') ?></p>
+ <h3><?php _e('Add New Attribute', 'woothemes') ?></h3>
+ <p><?php _e('Attributes let you define extra product data, such as size or colour. You can use these attributes in the shop sidebar using the "layered nav" widgets. Please note: you cannot rename an attribute later on.', 'woothemes') ?></p>
<form action="admin.php?page=attributes" method="post">
<div style="width:47%; float:left; margin:0 1% 0 0;">
<div class="form-field">
- <label for="attribute_name"><?php _e('Attribute Name', 'jigoshop'); ?></label>
+ <label for="attribute_name"><?php _e('Attribute Name', 'woothemes'); ?></label>
<input name="attribute_name" id="attribute_name" type="text" value="" />
</div>
</div>
<div style="width:47%; float:left; margin:0 1% 0 0;">
<div class="form-field">
- <label for="attribute_type"><?php _e('Attribute type', 'jigoshop'); ?></label>
+ <label for="attribute_type"><?php _e('Attribute type', 'woothemes'); ?></label>
<select name="attribute_type" id="attribute_type" style="width: 100%;">
- <option value="select"><?php _e('Select','jigoshop') ?></option>
- <option value="multiselect"><?php _e('Multiselect','jigoshop') ?></option>
- <option value="text"><?php _e('Text','jigoshop') ?></option>
+ <option value="select"><?php _e('Select', 'woothemes') ?></option>
+ <option value="multiselect"><?php _e('Multiselect', 'woothemes') ?></option>
+ <option value="text"><?php _e('Text', 'woothemes') ?></option>
</select>
</div>
</div>
<div class="clear"></div>
- <p class="submit"><input type="submit" name="add_new_attribute" id="submit" class="button" value="<?php _e('Add Attribute', 'jigoshop'); ?>"></p>
+ <p class="submit"><input type="submit" name="add_new_attribute" id="submit" class="button" value="<?php _e('Add Attribute', 'woothemes'); ?>"></p>
</form>
</div>
</div>
@@ -237,7 +228,7 @@ function jigoshop_add_attribute() {
/* <![CDATA[ */
jQuery('a.delete').click(function(){
- var answer = confirm ("<?php _e('Are you sure you want to delete this?', 'jigoshop'); ?>");
+ var answer = confirm ("<?php _e('Are you sure you want to delete this?', 'woothemes'); ?>");
if (answer) return true;
return false;
});
Oops, something went wrong.

0 comments on commit 0425a68

Please sign in to comment.