Jump to content
Latest News: (loading..)
Sign in to follow this  
sinopia

Free shipping with other options

Recommended Posts

Hello, I'm using v2.3.4, and I was looking to have free shipping but also other options for express shipping.

Currently I have zones and table but when free shipping is enable it disabled both and only show the free shipping option.

Does anyone knows how I can show free shipping and table option for express shipping? (they pay a bit more but it's faster delivery).

Share this post


Link to post
Share on other sites

What I only found is when free shipping is enable to show all options and for example disable zones.php for that price, so it'll show free shipping and table.

Share this post


Link to post
Share on other sites

Otherwise I disable ot_shipping, create a new table what if cart is over X€ enable that module (which will be for free shipping). Zones get disable if it's over X€ and the table shows always... Any suggestion?

Share this post


Link to post
Share on other sites

@sinopia

Is this a new installation? If so, please realize that osC v2.3.4 is way out of date, and will not continue to run as our hosts upgrade to the newer versions of PHP. So, if this is a new install, I'd strongly suggest you start over with the Community build of osC (see link in my signature below).

If this is not a new installation, you should begin thinking about moving your shop up to the latest version. Unfortunately, it is not an in-place upgrade. You'd basically create the new store in a separate sub-directory, migrate over your database and images, and re-apply any add-ons and/or styling changes you made (you kept good notes, didn't you?)

M


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

It's a current live websit, it's has been updated to new PHP 7. As this moment just was looking for this issue.

Free delivery gets enable at over 29.90, but when it appers it disabled zones and table modules. I just needed to keep the tables when free shipping is enabled.

Also the free shipping is only for country of the store. Otherwise I've to change zones to set free shipping only for the country and over X€ price...

Share this post


Link to post
Share on other sites

@sinopia

A stock 2.3.4 shop will have issues with PHP 7. To try and make your old store work under PHP 7 will take a lot of work, and will result in a FrankenShop fork that no-one else will be able to support.

Your choices are:

1) Spend a lot of time and effort to make your shop run under PHP 7 (not recommended), or ...

2) Ask your host to roll PHP back to 5.x (a temporary fix, while you ...)

3) Upgrade your shop to the latest Community build of osC (link in my signature below).

M


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

@ArtcoInc I completly understand, and I'm thank you that you're answering me. But I've change already to have compatibility with PHP 7, it works everything fine.

The issue is only about the shipping.. Just needed to set free shipping only for zones (only country zone because I've also foreign) and keep always table module...

Share this post


Link to post
Share on other sites

I could set it working as I needed.

Few changes on checkout_shipping.php, disabling zones for country store when it's free, but now I've to fix the radio buttons... 

Share this post


Link to post
Share on other sites
Posted (edited)

I'm having some issues in the radio buttons now... The selectRowEffect works but the input is now selected/checked and at the checkout_confirmation.php I get always the free shipping option by default..

Any suggestion how to fix this?

Edited by sinopia
edit

Share this post


Link to post
Share on other sites
8 hours ago, sinopia said:

The issue is only about the shipping.. Just needed to set free shipping only for zones (only country zone because I've also foreign) and keep always table module...

This is relatively easy to accomplish with a $0.00 flat rate module.

Take the flat rate module - and make a "new" copy of the module and language file - calling (for example "free"), editing the language file to however you wish it to display... And add something like:

	  if ( ($this->enabled == true) && ($order->info['subtotal'] < 30) ) {
      $this->enabled = false;
      return;
      }	  

Which would make this module active over $30 - while giving your customer the option to continue with any other of your normal, paid, shipping modules.

There are several in the addons/app area, however they are hard to find.

Share this post


Link to post
Share on other sites

@greasemonkey thank you for you answer.

I tried to display free shipping (if over 30) and all other options, and then disabling zones with:

      if (($order->delivery['country_id'] == STORE_COUNTRY) && ($order->info['total']) > 29.90) {
        $check_flag = true;
      }
        
      if ($check_flag == false) {
        $this->enabled = false;
      }

It kinda works... But the radio button stop to working correctly and I can't figure it out.. Wanna check my checkout_shipping.php?

Share this post


Link to post
Share on other sites

v2.3.4 - I know it should be updated, but the website is currently live with a lot of traffic and also a lot of core changes, it would take a bit to get the last version (but of course everything should be always updated..)

 

I use ot_shipping.php for free shipping in orders over 29,90€.

Zones for national and internacional (free shipping is only for national) and Table for a express shipping only for national.

By default is total is less than 29,90€ is show both options (Zones and Table - which is correct) but then is total is more than 29,90€ it only show the free shipping (if national) but I wanted to show the table module even if free shipping is avaliable.

 

I tried to edit checkout_shipping.php to display all options it kinda works but then the radio buttons doesn't work properly. I think it's something related with with javascript code because I get:

Uncaught TypeError: Cannot set property 'checked' of undefined

And also tried to disable zones for national when the option free shipping shows (because it's the same delivery and there's no need to show to select that option when it's free..)

Share this post


Link to post
Share on other sites

Well.. I've disabled free shipping at ot_shipping.php and added flat with 0.00€ for national only and

    if ( ($this->enabled == true) && ($order->info['subtotal'] < 29.90) ) {
      $this->enabled = false;
      return;
    }	

and zones with:

      if ( ($this->enabled == true) && ($order->delivery['country_id'] == STORE_COUNTRY) && ($order->info['subtotal'] > 29.90) ) {
        $this->enabled = false;
        return;
      }   

It seems to work, I've to test now if it's everything correct.

Share this post


Link to post
Share on other sites
Posted (edited)

I've saw now that orders paid with PayPal are not showing the shipping_module at table orders.

I've the recent version of PayPal App (using Standard) but it's missing 'shipping_module' => $shipping['id'], as checkout_process.php has..

It shows the price of shipping at orders_total but not the shipping module selected.. To fix just need to add 

 'shipping_module' => $shipping['id']

In this case? will variable $shipping['id'] work or it should be

'shipping_module' => $order->info['payment_method']

To get the respective module used?

Edited by sinopia
edit

Share this post


Link to post
Share on other sites
Posted (edited)

I mean..

 

$order->info['shipping_method']  - which contain a string with description of shipping module;

$shipping['id'] - contains a string "spu_spu" for Store Pickup, "flat_flat" for Flat Rate shipping.

well $order->info['shipping_method'] works but show the description, I found to use $shipping['id'] - needed to add global $shipping:

    function confirmation() {
      global $cartID, $cart_PayPal_Standard_ID, $customer_id, $languages_id, $order, $order_total_modules, $shipping;

But it works fine.

Edited by sinopia
edit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×