Changeset 1702296
- Timestamp:
- 07/25/2017 10:34:12 AM (9 years ago)
- Location:
- yakit
- Files:
-
- 4 edited
-
assets/screenshot-4.png (modified) (previous)
-
assets/screenshot-8.png (modified) (previous)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/yakit-shipping.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
yakit/trunk/readme.txt
r1700078 r1702296 31 31 4. While activating the plugin through the 'Plugins' menu in WordPress (will be prompted with woocommerce authorization screen 32 32 just approve it and proceed with the yakit account setup) 33 5. Once registered/logged into yakit.com, Go back to your store admin dashboard and configure the plugin through the 'Shipping' tabunder34 WooCommerce settings /wp-admin/admin.php?page=wc-settings&tab=shipping 33 5. Once registered/logged into yakit.com, you will be re-directed to store admin dashboard with auto populated Yakit account credentials under 34 woocommerce API tab wp-admin/admin.php?page=wc-settings&tab=api§ion=yakit_settings 35 35 6. Configure the Yakit shipping method for all zones 36 36 a) Click the 'Manage shipping methods' on mouse over the text 'Locations not covered by your other zones' 37 37 b) Click the 'Add shipping method' button, pop-up opens with shipping method dropdown. Select the Yakit shipping and click blue color button. 38 38 c) After adding, mouse over text 'Yakit Shipping' can find the Edit/Delete links. Click edit link. 39 d) Can find the Yakit shipping settings from where you can enter the account detailsand save.39 d) Can enable/disable the Yakit shipping method and save. 40 40 7. Configure the Yakit shipping method for specific shipping zones 41 41 a) Go to admin dashboard Dashboard-> Woocommerce-> Shipping-> Shipping Zones /wp-admin/admin.php?page=wc-settings&tab=shipping … … 44 44 d) While selecting the 'Shipping methods' Click the 'Add shipping method' button, pop-up opens with shipping method dropdown. Select the Yakit shipping and click blue color button. 45 45 e) After adding, mouse over text 'Yakit Shipping' can find the Edit/Delete links. Click edit link. 46 f) Can find the Yakit shipping settings from where you can enter the account details and Save. 46 f) Can enable/disable the Yakit shipping method and Save. 47 8. In order to pull the store orders into Yakit dashboard, click the 'Yakit Shipping Tool' menu under 'Woocommerce' 47 48 48 Please make sure to enter the yakit.com account username and account key to get the real time rates 49 (check the following steps to get the account username and account key) 49 For further support reach us through Y-Chat from yakit.com. 50 50 51 51 ==Yakit.com account creation== … … 54 54 2) Register or login to yakit.com 55 55 3) Click the Yakit shipping tool button from dashboard 56 4) From yakit shipping tool click the preferences and take account key (user login will be the accou tnusername)56 4) From yakit shipping tool click the preferences and take account key (user login will be the account username) 57 57 5) Once your WooCommerce store is linked with your Yakit.com account, you can pull orders into your Yakit dashboard and process them. 58 6) Upon order completion, your c lients will receive the Yakit Tracking Link in the order completion email to track their shipments.58 6) Upon order completion, your customers will receive the Yakit Tracking Link in the order completion email to track their shipments. 59 59 60 60 ===Yakit order pulling=== … … 69 69 2. After clicking activate link reaching woocommerce authorization screen. 70 70 3. Register/Login to Yakit. 71 4. Go to content dashboard https://www.yakit.com/content/dashboard and click the orange color button "Yakit Shipping Tool".71 4. Woocommerce Yakit API settings 72 72 5. Open your store link in new tab and go to woocommerce->settings->Shipping->shipping Zones Yakit tab. 73 73 6. Click the 'Manage shipping methods' on mouse over the text 'Locations not covered by your other zones' 74 74 7. Click the 'Add shipping method' button, pop-up opens with shipping method dropdown. Select the Yakit shipping and click blue color button. 75 8. After adding, mouse over text 'Yakit Shipping' can find the Edit/Delete links. Click edit link. 76 9. Can find the Yakit shipping settings from where you can enter the account details and save. 75 8. Link to 'Yakit Shipping Tool' 77 76 78 77 79 78 == Changelog == 79 80 = v1.1.0 (2017-07-25) = 81 * Automated the Yakit account settings 82 * Simplified the overall process 83 * Yakit Shipping Tool link added under woocommerce menu 80 84 81 85 = v1.0.1 (2017-07-17) = -
yakit/trunk/yakit-shipping.php
r1699589 r1702296 4 4 * Plugin URI: https://www.yakit.com/woocommerce/yakit-for-woocommerce/ 5 5 * Description: * Transparent pricing with no minimums or monthly charges. * Guaranteed duties and taxes along with shipping cost in your shopping cart. * Ship internationally to more than 45 countries now! 6 * Version: 1. 0.06 * Version: 1.1.0 7 7 * Author: Yakit 8 8 * Author URI: https://www.yakit.com/ … … 56 56 $this->init_form_fields(); 57 57 $this->init_settings(); 58 58 59 59 // Save settings in admin if you have any defined 60 60 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); … … 65 65 */ 66 66 function init_form_fields() { 67 $this->instance_form_fields = array( 68 67 $this->instance_form_fields = array( 69 68 'enabled' => array( 70 69 'title' => __( 'Enable', 'yakit' ), … … 73 72 'default' => 'yes' 74 73 ), 75 'accountname' => array(74 /*'accountname' => array( 76 75 'title' => __( 'Account name/Username', 'yakit' ), 77 76 'type' => 'text', … … 90 89 'description' => __( 'Title to be display on site', 'yakit' ), 91 90 'default' => __( 'yakit Shipping', 'yakit' ) 92 ), 91 ),*/ 93 92 ); 94 93 } 95 94 95 96 96 97 97 98 /** … … 105 106 global $woocommerce; 106 107 $this->instance_settings = get_option( $this->get_instance_option_key(), null ); 107 $user_name = $this->instance_settings['accountname']; 108 $password = $this->instance_settings['accountkey']; 109 108 //$user_name = $this->instance_settings['accountname']; 109 //$password = $this->instance_settings['accountkey']; 110 $user_name = get_option('yakit_account_username'); 111 $password = get_option('yakit_account_key'); 110 112 $url = trim("https://shipping.yakit.com/shipperInterface/woocommerceRateProvider"); 111 113 $data['currencyUnit']=get_option('woocommerce_currency'); … … 375 377 } 376 378 379 380 // creating a new sub tab in API settings 381 add_filter( 'woocommerce_get_sections_api', 'add_subtab' ); 382 //add_filter('woocommerce_get_sections_shipping','add_subtab'); 383 function add_subtab( $settings_tabs ) { 384 $settings_tabs['yakit_settings'] = __( 'Yakit Settings', 'woocommerce-yakit-settings-tab' ); 385 return $settings_tabs; 386 } 387 388 389 add_action('admin_menu', 'register_yakit_submenu_page'); 390 391 function register_yakit_submenu_page() { 392 add_submenu_page( 'woocommerce', 'Yakit Shipping Tool', 'Yakit Shipping Tool', 'manage_options', 'yakit-shipping-tool', 'yakit_submenu_page_callback' ); 393 } 394 395 function Yakit_submenu_page_callback() { 396 if(get_option('yakit_account_username')!=='' && get_option('yakit_account_key')!==''){ 397 echo '<h4>Start Shipping!</h4><form action="https://shipping.yakit.com/j_spring_security_check" method="POST" target="new"> 398 <input name="j_username" value="'.get_option('yakit_account_username').'" type="hidden"> 399 <input name="j_password" value="'.get_option('yakit_account_key').'" type="hidden"> 400 <div class="submit_text"></div> 401 <input value="Yakit Shipping Tool" title="Calculate rates and dispatch shipments" type="submit"></form>'; 402 }else{ 403 echo "Please setup the Yakit account by referreing Yakit plugin readme.txt"; 404 } 405 } 406 407 // adding settings (HTML Form) 408 add_filter( 'woocommerce_get_settings_api', 'add_subtab_settings',10, 2 ); 409 function add_subtab_settings( $settings ) { 410 $current_section = (isset($_GET['section']) && !empty($_GET['section']))? $_GET['section']:''; 411 if ( $current_section == 'yakit_settings' ) { 412 if(isset($_GET['au'])) update_option('yakit_account_username',$_GET['au']); 413 if(isset($_GET['ak'])) update_option('yakit_account_key',$_GET['ak']); 414 if(isset($_GET['au']) && isset($_GET['ak'])) echo '<h3 style="color:green;">Thank you for setting up Yakit account! Start shipping!</h3>'; 415 $custom_settings = array(); 416 $custom_settings[] = array( 'name' => __( 'Yakit Settings', 'text-domain' ), 417 'type' => 'title', 418 'desc' => __( 'The following options are used to ...', 'text-domain' ), 419 'id' => 'yakit_settings' 420 ); 421 422 $custom_settings[] = array( 423 'name' => __( 'Account Username', 'text-domain' ), 424 'id' => 'yakit_account_username', 425 'type' => 'text', 426 'default' => get_option('yakit_account_username'), 427 428 ); 429 $custom_settings[] = array( 430 'name' => __( 'Account Key', 'text-domain' ), 431 'id' => 'yakit_account_key', 432 'type' => 'text', 433 'default' => get_option('yakit_account_key'), 434 435 ); 436 $custom_settings[] = array( 'type' => 'sectionend', 'id' => 'test-options' ); 437 return $custom_settings; 438 } else { 439 // If not, return the standard settings 440 return $settings; 441 } 442 } 443 444 377 445 function yakit_validate_order( $posted ) { 378 446
Note: See TracChangeset
for help on using the changeset viewer.