Plugin Directory

Changeset 1702296


Ignore:
Timestamp:
07/25/2017 10:34:12 AM (9 years ago)
Author:
jeyapriya
Message:

Deployed the major version change in yakit account settings

Location:
yakit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • yakit/trunk/readme.txt

    r1700078 r1702296  
    31314. While activating the plugin through the 'Plugins' menu in WordPress (will be prompted with woocommerce authorization screen
    3232just 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' tab under
    34 WooCommerce settings /wp-admin/admin.php?page=wc-settings&tab=shipping
     335. Once registered/logged into yakit.com, you will be re-directed to store admin dashboard with auto populated Yakit account credentials under
     34woocommerce API tab wp-admin/admin.php?page=wc-settings&tab=api&section=yakit_settings
    35356. Configure the Yakit shipping method for all zones
    3636    a) Click the 'Manage shipping methods' on mouse over the text 'Locations not covered by your other zones'
    3737    b) Click the 'Add shipping method' button, pop-up opens with shipping method dropdown. Select the Yakit shipping and click blue color button.
    3838    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 details and save.
     39    d) Can enable/disable the Yakit shipping method and save.
    40407. Configure the Yakit shipping method for specific shipping zones
    4141    a) Go to admin dashboard Dashboard-> Woocommerce-> Shipping-> Shipping Zones /wp-admin/admin.php?page=wc-settings&tab=shipping
     
    4444    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.
    4545    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.
     478. In order to pull the store orders into Yakit dashboard, click the 'Yakit Shipping Tool' menu under 'Woocommerce'
    4748
    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)
     49For further support reach us through Y-Chat from yakit.com.
    5050
    5151==Yakit.com account creation==
     
    54542) Register or login to yakit.com
    55553) 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 accoutn username)
     564) From yakit shipping tool click the preferences and take account key (user login will be the account username)
    57575) 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 clients will receive the Yakit Tracking Link in the order completion email to track their shipments.
     586) Upon order completion, your customers will receive the Yakit Tracking Link in the order completion email to track their shipments.
    5959
    6060===Yakit order pulling===
     
    69692. After clicking activate link reaching woocommerce authorization screen.
    70703. 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".
     714. Woocommerce Yakit API settings
    72725. Open your store link in new tab and go to woocommerce->settings->Shipping->shipping Zones Yakit tab.
    73736. Click the 'Manage shipping methods' on mouse over the text 'Locations not covered by your other zones'
    74747. 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.
     758. Link to 'Yakit Shipping Tool'
    7776
    7877
    7978== 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
    8084
    8185= v1.0.1 (2017-07-17) =
  • yakit/trunk/yakit-shipping.php

    r1699589 r1702296  
    44 * Plugin URI: https://www.yakit.com/woocommerce/yakit-for-woocommerce/
    55 * 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.0
     6 * Version: 1.1.0
    77 * Author: Yakit
    88 * Author URI: https://www.yakit.com/
     
    5656                    $this->init_form_fields();
    5757                    $this->init_settings();
    58  
     58                   
    5959                    // Save settings in admin if you have any defined
    6060                    add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
     
    6565                 */
    6666                function init_form_fields() {
    67                     $this->instance_form_fields = array(
    68  
     67                    $this->instance_form_fields = array(
    6968                     'enabled' => array(
    7069                          'title' => __( 'Enable', 'yakit' ),
     
    7372                          'default' => 'yes'
    7473                          ),
    75                     'accountname' => array(
     74                    /*'accountname' => array(
    7675                        'title' => __( 'Account name/Username', 'yakit' ),
    7776                          'type' => 'text',
     
    9089                          'description' => __( 'Title to be display on site', 'yakit' ),
    9190                          'default' => __( 'yakit Shipping', 'yakit' )
    92                           ),
     91                          ),*/
    9392                    );
    9493                 }
    9594                 
     95               
     96               
    9697               
    9798                /**
     
    105106                    global $woocommerce;
    106107                    $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');
    110112                    $url = trim("https://shipping.yakit.com/shipperInterface/woocommerceRateProvider");
    111113                    $data['currencyUnit']=get_option('woocommerce_currency');
     
    375377}
    376378
     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
    377445    function yakit_validate_order( $posted )   {
    378446 
Note: See TracChangeset for help on using the changeset viewer.