Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Shipping by product? - osC 2.3


GetSirius

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));

Link to comment
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
Link to comment
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

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...