Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Rajdip Sinha Roy

    (@rajdipsinharoy)

    My pleasure. Glad to help you.
    Love From India.😃

    Plugin Author Rajdip Sinha Roy

    (@rajdipsinharoy)

    Mon plaisir. Heureux de vous aider.
    L’amour de l’Inde.😃

    @backpackingseries

    They written wrong version in file first and then again they update the repo.
    Teach @shiprocket first, how to maintain a plugin..

    Really Hilarious

    @backpackingseries

    Hi,

    Shiprocket is just worst. They will not give you anything.
    I created my own plugin using Shiprocket for my clients.

    If you need my own created plugin then you can contact me at rajdipsinharoy@yahoo.in

    Thanks & Regards,
    Rajdip Sinha Roy

    Rajdip Sinha Roy

    (@rajdipsinharoy)

    @promact Here is your link https://wordpress.org/plugins/shiprocket/

    And I’m not the developer of this plugin so if you need any extended support then you can contact me at rajdipsinharoy@gmail.com

    REMOVE THIS BELOW CODE FROM wp-content/plugins/shiprocket/shiprocket-woocommerce-shipping-calculator.php

    LINE NO: 223

    add_action(‘woocommerce_single_product_summary’, ‘shiprocket_show_check_pincode’, 20);

    /**
    * Show an option to check serviceability to a pincode
    *
    * @return null
    */
    function Shiprocket_Show_Check_pincode()
    {

    global $product;

    $settings = get_option(‘woocommerce_shiprocket_woocommerce_shipping_settings’);

    if (!isset($settings[‘integration_id’])) {
    return true;
    }

    ?>
    <div>
    <input type=”text” id=”shiprocket_pincode_check” name=”shiprocket_pincode_check” value=”” placeholder=”Enter Pincode”>

    <button id=”check_pincode” onClick=”checkPincode()”> Check Pincode </button>
    </div>
    <div><p id=”pincode_response”></p></div>

    <script>
    function checkPincode() {
    var pincode = document.getElementById(“shiprocket_pincode_check”).value;
    if(pincode == ”){
    jQuery(‘#pincode_response’).text(“This pincode field is required!”)
    }else{
    var url = “<?php echo SHIPROCKET_WC_RATE_URL; ?>”;

    url += “?weight=” + “<?php echo $product->weight; ?>” + “&cod=1&delivery_postcode=” + pincode;

    url += “&store_url=” + “<?php echo get_site_url(); ?>”;

    url += “&merchant_id=” + “<?php echo $settings[‘integration_id’];?>”;

    url += “&unit=” + “<?php echo get_option(‘woocommerce_weight_unit’);?>”;

    var token = ‘ACCESS_TOKEN:’ + ‘<?php echo SHIPROCKET_ACCESS_TOKEN; ?>’;

    jQuery.ajax({
    url: url,
    headers: {‘authorization’: token},
    success: function(response) {
    if(response.status == 200) {
    var recommeded_courier_id = response.data.recommended_courier_company_id;
    var available_couriers = response.data.available_courier_companies;
    var recommeded_courier = available_couriers.filter(c => c.courier_company_id == recommeded_courier_id);
    if(recommeded_courier_id !== null && recommeded_courier_id !== ”){
    var recommeded_courier = available_couriers.filter(c => c.courier_company_id == recommeded_courier_id);
    var etd = recommeded_courier[0].etd;
    }else{
    var etd = available_couriers[0].etd;
    }
    var msg = <span>You’ll get your product by + etd + !</span>;

    jQuery(‘#pincode_response’).html(msg);
    }
    else {
    jQuery(‘#pincode_response’).text(“This pincode is not serviceable!”)
    }
    },
    error: function(error){
    jQuery(‘#pincode_response’).text(“This pincode is not serviceable!”)
    }
    });
    }
    }

    </script>
    <?php
    }

    REMOVE THIS BELOW CODE FROM wp-content/plugins/shiprocket/shiprocket-woocommerce-shipping-calculator.php
    LINE NO: 223

    add_action(‘woocommerce_single_product_summary’, ‘shiprocket_show_check_pincode’, 20);

    /**
    * Show an option to check serviceability to a pincode
    *
    * @return null
    */
    function Shiprocket_Show_Check_pincode()
    {

    global $product;

    $settings = get_option(‘woocommerce_shiprocket_woocommerce_shipping_settings’);

    if (!isset($settings[‘integration_id’])) {
    return true;
    }

    ?>
    <div>
    <input type=”text” id=”shiprocket_pincode_check” name=”shiprocket_pincode_check” value=”” placeholder=”Enter Pincode”>

    <button id=”check_pincode” onClick=”checkPincode()”> Check Pincode </button>
    </div>
    <div><p id=”pincode_response”></p></div>

    <script>
    function checkPincode() {
    var pincode = document.getElementById(“shiprocket_pincode_check”).value;
    if(pincode == ”){
    jQuery(‘#pincode_response’).text(“This pincode field is required!”)
    }else{
    var url = “<?php echo SHIPROCKET_WC_RATE_URL; ?>”;

    url += “?weight=” + “<?php echo $product->weight; ?>” + “&cod=1&delivery_postcode=” + pincode;

    url += “&store_url=” + “<?php echo get_site_url(); ?>”;

    url += “&merchant_id=” + “<?php echo $settings[‘integration_id’];?>”;

    url += “&unit=” + “<?php echo get_option(‘woocommerce_weight_unit’);?>”;

    var token = ‘ACCESS_TOKEN:’ + ‘<?php echo SHIPROCKET_ACCESS_TOKEN; ?>’;

    jQuery.ajax({
    url: url,
    headers: {‘authorization’: token},
    success: function(response) {
    if(response.status == 200) {
    var recommeded_courier_id = response.data.recommended_courier_company_id;
    var available_couriers = response.data.available_courier_companies;
    var recommeded_courier = available_couriers.filter(c => c.courier_company_id == recommeded_courier_id);
    if(recommeded_courier_id !== null && recommeded_courier_id !== ”){
    var recommeded_courier = available_couriers.filter(c => c.courier_company_id == recommeded_courier_id);
    var etd = recommeded_courier[0].etd;
    }else{
    var etd = available_couriers[0].etd;
    }
    var msg = <span>You'll get your product by <strong> + etd + </strong> !</span>;

    jQuery(‘#pincode_response’).html(msg);
    }
    else {
    jQuery(‘#pincode_response’).text(“This pincode is not serviceable!”)
    }
    },
    error: function(error){
    jQuery(‘#pincode_response’).text(“This pincode is not serviceable!”)
    }
    });
    }
    }

    </script>
    <?php
    }

    This “pincode isn’t servicable” issue is now resolved.
    Delete Old plugin and install latest plugin from here.

Viewing 8 replies - 1 through 8 (of 8 total)