Jump to content
Sign in to follow this  
GetSirius

Free Shipping by product? - osC 2.3

Recommended Posts

I am working on a new install of osC 2.3.1 and I have been trying to find a way to offer free shipping for select products. Does anyone know of a way I can do this?

 

I want to be able to designate certain products to be free shipping, if the customer orders only these products they get free shipping. If the customer orders products with free and not free shipping (USPS) then free shipping is not available. The ability to allow the customer to opt for upgraded (USPS Express) shipping would be a nice addition.

 

I did this with an older osC install using the "Individual Product Shipping Prices" mod and modifying my flat rate shipping to be free shipping but that mod did not seem to work with osC 2.3, I could not find the following line in catalog/admin/categories.php:

 

Step 3) Open catalog/admin/categories.php

(skip to last mod for this file)

Find: echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

Share this post


Link to post
Share on other sites

THANKS for the fast reply, sorry for the delayed response, that is how life is going for me right now.

 

First off, after looking around a little more I think I am using an old version of the modification, I just started using what I had on my computer instead of looking for updates. Also, this mod was not made for osC 2.3. So my question might be stupid to start with. Also now trying some other things to do free shipping by product but I am not good with php code.

Having said that, here is the answer to your question. Drop the subject (for now) if you want!

 

The code that is supposed to be added is as follows:

Find:

echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

 

Below it add:

// INDIV_SM SHIPPING METHODS BEGIN

if(is_array($_POST['shipping_methods'])){

foreach($_POST['shipping_methods'] as $val){

echo tep_draw_hidden_field('shipping_methods[]', $val);

}

}

// INDIV_SM END

Edited by GetSirius

Share this post


Link to post
Share on other sites

The code that is supposed to be added is as follows:

Find:

echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

 

Below it add:

// INDIV_SM SHIPPING METHODS BEGIN

if(is_array($_POST['shipping_methods'])){

foreach($_POST['shipping_methods'] as $val){

echo tep_draw_hidden_field('shipping_methods[]', $val);

}

}

// INDIV_SM END

 

This part of the code exist only in the old version and is part of the form of the "product preview".

 

Since there is no product preview on v2.3.1 and assuming that you did all other changes as requested by the addon correctly, I would say you can ignore this.

 

I don't know the addon, so I don't know what other changes need to be done.

 

The best is you try

Share this post


Link to post
Share on other sites

Thank you!

If I find a way to do this I will share. I can't be the only person who needs to offer free shipping on only one or two products in a category.

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  

×