Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Postage/Shipping on a Single Item??


UK_Copsy

Recommended Posts

Posted

i would love the answer to this one too. I have seen it done on some oscommerce sites.

 

My guess, is that you perhaps add another property to your products in admin, titled "free shipping". And you check this box if you want this product to be eligible for free shipping. This means you need another field in your database for products table. Then you have to edit the pages which display the product, using an IF statement to see if they have been specified for free shipping or not.

 

Im not keen confident enough, or free enough to actually do this. i would love some more feedback here though. I really want this function.

Posted

you could try individual shipping and then assign a price of $0.00

Posted

does that mean I would then have to assign a price to EVERY other product, whether it be $0 (free) or any other amount? or can all the other items that arent for free shipping stay as they are.

Posted

If you are using zones based shipping with weights then for the product that you want to ship free make the weight zero and add the weight to the shipping zone with a zero cost 0:0

Jeff

Posted
If you are using zones based shipping with weights then for the product that you want to ship free make the weight zero and add the weight to the shipping zone with a zero cost 0:0

Jeff

 

 

Cheers for your input Jeff. I only have one problem, I'm running a Table Shipping Rate with no Weights.

 

Pain in the neck i know. I wish someone could come up with a contrib that would add a 'Free Shipping' option to the product atribs.

 

I would do it... but well, i don't have a clue and I'm thicker than two short planks. So that options out :D

 

Thanks once again

Posted

one of my clients has a catalog, and if the customer only "buys" the catalog (it's free), shipping is free too. This is how I solved it, and I'm sure a similar if statement can be done for a special product too ...

 

I created a new shipping file, in my case I used flat shipping with a rate of zero. Here is the top part of it

<?php
/*
 $Id: flat.php,v 1.40 2003/02/05 22:41:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 class flat {
   var $code, $title, $description, $icon, $enabled;

// class constructor
   function flat() {
     global $order;

     $this->code = 'flat';
     $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
     $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);

	 if (is_object($order)) {
// enable the module if the order only contains virtual products
   if ($this->enabled == true) {
  	 global $cart;
  	 if ($cart->show_total() >= 0.01) {
     $this->enabled = false;
  	 }
   }
	 }

 

in the last fe lines of it, I check if the cart has a value of greater than zero.

if ($cart->show_total() >= 0.01) {
$this->enabled = false;
}

if yes this module will not be shown

 

ALL other files get a similar statement, because if the customer only has a catalog in his cart, I don't want them to show:

if ($cart->show_total() == 0.00) {
$this->enabled = false;
}

I added this to the other 5 shipping modules at the same spot as the above exmple shows.

 

If you check out the shopping cart class, there is a bunch of functions that you could use for the checking. You may need to do a loop for the products, but that should not be a big deal.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...