• Resolved summerlightning

    (@summerlightning)


    WP e-commerce version: 3.9.1
    Site: moonkids.ae

    I would like to remove the shipping calculator on the checkout page and request some help please.

    I have already made some css changes to the checkout page and as standard have two deliver options, collection and delivery. All is fine until the Shipping Country is selected/changed. My fixed rate options are then hidden and the following is displayed: “Please click the Calculate button to refresh your shipping quotes, as your shipping information has been modified.”

    Orders can be processed and include the previously selected delivery option but I would like to stop this.

    I was provided with the following blog post from Justin Sainton, but I am self taught and despite numerous tries on a test site, I cannot get these steps to work.

    https://zao.is/2014/12/remove-shipping-calculator-wp-ecommerce/

    Would someone please explain which code I should be removing from wpsc-shopping_cart_page.php and whether I can then add the other code to prevent the calculation happening to functions.php or I have to create the additional plugin that Justin talks about.

    Thank you,
    Amanda

Viewing 1 replies (of 1 total)
  • Thread Starter summerlightning

    (@summerlightning)

    Finally a result – thanks to spotoremor for the code:

    /**
     * my_wpsc_needs_shipping_recalc()
     *
     * disable shipping_recalc value returned by needs_shipping_recalc() for fixedrate shipping method.
     *
     * @param boolean $needs_shipping_recalc
     * @param obj $wpsc_cart
     * @return boolean
     */
    function my_wpsc_needs_shipping_recalc($needs_shipping_recalc, $wpsc_cart)
    {
    
      if($wpsc_cart->shipping_method == 'fixedrate')
      {
        $needs_shipping_recalc = false;
      }
    
      return $needs_shipping_recalc;
    }
    add_filter('wpsc_needs_shipping_recalc','my_wpsc_needs_shipping_recalc',10,2);
Viewing 1 replies (of 1 total)
  • The topic ‘Remove Shipping Calculator from WP eCommerce’ is closed to new replies.