Changeset 1914783
- Timestamp:
- 07/25/2018 12:42:41 PM (8 years ago)
- Location:
- woo-oscommerce-sync/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
woocommerce-osc-sync.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-oscommerce-sync/trunk/readme.txt
r1912165 r1914783 5 5 Requires at least: 3.5.1 6 6 Tested up to: 4.9.4–es_ES 7 Stable tag: 2.0. 57 Stable tag: 2.0.6 8 8 License: AGPLv3.0 or later 9 9 License URI: http://opensource.org/licenses/AGPL-3.0 … … 70 70 71 71 == Changelog == 72 = 2.0.6 = 73 * Include products weight 74 72 75 = 2.0.5 = 73 76 * Fix reimport categories images -
woo-oscommerce-sync/trunk/woocommerce-osc-sync.php
r1912165 r1914783 5 5 Description: Import products, categories, customers and orders from osCommerce to Woocommerce 6 6 Author: Alejandro Aranda 7 Version: 2.0. 57 Version: 2.0.6 8 8 Author URI: http://www.aaranda.es 9 9 Original Author: David Barnes … … 262 262 if ((int) $_POST['dtype']['categories'] == 1) { 263 263 otw_log_delete("importCategories"); 264 $import_cat_counter = 0; 264 265 otw_log("importCategories", "Start Import"); 265 266 otw_run_cats(); 266 267 otw_log("importCategories", "End Import"); 268 } 269 if ((int) $_POST['dtype']['taxes'] == 1) { 270 otw_log_delete("importtaxes"); 271 $import_tax_counter = 0; 272 otw_log("importtaxes", "Start Import"); 273 $sql = "SELECT 274 tr.tax_rates_id, 275 tr.tax_rate, 276 tc.tax_class_title, 277 tc.tax_class_description, 278 tr.tax_priority, 279 tr.tax_rate, 280 tr.tax_description, 281 z.*, 282 c.* 283 284 FROM 285 tax_rates as tr 286 INNER JOIN tax_class as tc ON tr.tax_class_id = tc.tax_class_id 287 INNER JOIN zones as z ON z.zone_id = tr.tax_zone_id 288 INNER JOIN countries as c ON c.countries_id = z.zone_country_id 289 "; 290 //Import the taxes 291 if ($taxes = $oscdb->get_results($sql, ARRAY_A)) { 292 otw_log("importtaxes", "taxes origin total: " . count($taxes)); 293 foreach ($taxes as $tax) { 294 otw_log("importtaxes", json_encode($tax)); 295 296 $sql = " 297 "; 298 $import_tax_counter++; 299 } 300 } 301 302 otw_log("importtaxes", "End Import"); 267 303 } 268 304 if ((int) $_POST['dtype']['products'] == 1) { … … 339 375 update_post_meta($product_id, '_manage_stock', '1'); 340 376 update_post_meta($product_id, '_stock', $product['products_quantity']); 377 update_post_meta($product_id, '_weight', $product['products_weight']); 341 378 $import_prod_counter++; 342 379 … … 756 793 echo '<p>Categories Imported: ' . $import_cat_counter . '</p>'; 757 794 } 795 if ((int) $_POST['dtype']['taxes'] == 1) { 796 echo '<p>Taxes Imported: ' . $import_tax_counter . '</p>'; 797 } 758 798 if ((int) $_POST['dtype']['products'] == 1) { 759 799 echo '<p>Products Imported: ' . $import_prod_counter . '</p>'; … … 808 848 } 809 849 ?>>Categories</label><br> 850 <!-- <label class="control-label"><input type="checkbox" name="dtype[taxes]" value="1" <?php 851 if ((int) $_POST['dtype']['taxes']) { 852 echo " checked "; 853 } 854 ?>>Taxes</label><br>--> 810 855 <label class="control-label"><input type="checkbox" name="dtype[products]" value="1" <?php 811 856 if ((int) $_POST['dtype']['products']) {
Note: See TracChangeset
for help on using the changeset viewer.