Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] individual product shipping prices


Recommended Posts

Ok, got it working but when someone orders 2 of the same product, it's putting the shipping cost twice. I want to add it only once for that product no matter how many of that product is ordered.

 

Not sure if this is duable but I was just asking.

 

Nelson

Link to comment
Share on other sites

  • 1 month later...

i have a strange one, have been trying to figure out why i have it.

 

Fatal error: Call to undefined function: tep_get_configuration_key_value() in d:\web\paw\checkout_shipping.php on line 17

 

strange thing, it is lised in catalog/includes/functions/indiv_status.php. did i miss something here on the installation?

Link to comment
Share on other sites

I am sorry if this has been asked in here before and I am sure it has...

 

Using this contribution is it possible to setup a specific price for certain products but leave the individual price blank if you want to use the existing table or flat rate settings?

 

Does that make sense?

 

Cheers,

 

Naz

Eatin' is cheatin' , snoozing is losing, just drink through it!

Link to comment
Share on other sites

nic, niki, is having the same problem I am having...

 

Fatal error: Call to undefined function: get_shiptotal() in /home/httpd/vhosts/mydomain.com/httpsdocs/catalog/includes/modules/shipping/indvship.php on line 53

 

Can someone lend a little help for this great mod?

 

I have these mods installed on a 2.2 ms 2 version of oscommerce

 

Options_as_Images 1.2

Product_images_in_product_listing

PWA 0.71

tabs ver 1.3

admin_infobox

additional_table_rate_options ver 1.1

Attribute_Sort_Order

 

 

Here is my /catalog/includes/modules/shipping/indvship.php file:

 

<?php
/*
 $Id: indvship.php,v 1.0 2003/07/07 00:00:01 hpdl Exp $
 by D. M. Gremlin

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

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

// class constructor
   function indvship() {
     global $order;
     $this->code = 'indvship';
     $this->title = MODULE_SHIPPING_INDVSHIP_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_INDVSHIP_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_INDVSHIP_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_INDVSHIP_TAX_CLASS;
     $this->enabled = ((MODULE_SHIPPING_INDVSHIP_STATUS == 'True') ? true : false);

// Enable Individual Shipping Module
     $this->enabled = MODULE_SHIPPING_INDVSHIP_STATUS;
     if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_INDVSHIP_ZONE > 0) ) {
       $check_flag = false;
       $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_INDVSHIP_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
       while ($check = tep_db_fetch_array($check_query)) {
         if ($check['zone_id'] < 1) {
           $check_flag = true;
           break;
         } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
           $check_flag = true;
           break;
         }
       }

       if ($check_flag == false) {
         $this->enabled = false;
       }
     }
   }

// class methods

  function quote($method = '') {
     global $order, $cart;
  $shiptotal = $cart->get_shiptotal();

     $this->quotes = array('id' => $this->code,
                           'module' => MODULE_SHIPPING_INDVSHIP_TEXT_TITLE,
                           'methods' => array(array('id' => $this->code,
                                                    'title' => MODULE_SHIPPING_INDVSHIP_TEXT_WAY,
                                                    'cost' => $shiptotal)));

     if ($this->tax_class > 0) {
       $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }

     if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

     return $this->quotes;
   }
   
 

   function check() {
     if (!isset($this->_check)) {
       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_INDVSHIP_STATUS'");
       $this->_check = tep_db_num_rows($check_query);
     }
     return $this->_check;
   }

   function install() {
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Individual Shipping Prices', 'MODULE_SHIPPING_INDVSHIP_STATUS', 'True', 'Do you want to offer individual shipping prices?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_INDVSHIP_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_INDVSHIP_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_INDVSHIP_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
   }

   function remove() {
     
     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }

   function keys() {
     return array('MODULE_SHIPPING_INDVSHIP_STATUS', 'MODULE_SHIPPING_INDVSHIP_TAX_CLASS', 'MODULE_SHIPPING_INDVSHIP_ZONE', 'MODULE_SHIPPING_INDVSHIP_SORT_ORDER');
   }
 }
?>

 

 

I will be working on this and if I find a solution, I will post it here.

 

All suggestions appreciated.

Thanks!

 

Starkness

Link to comment
Share on other sites

i have a strange one, have been trying to figure out why i have it.

 

Fatal error: Call to undefined function: tep_get_configuration_key_value() in d:\web\paw\checkout_shipping.php on line 17

 

strange thing, it is lised in catalog/includes/functions/indiv_status.php. did i miss something here on the installation?

Having the same problem, find a fix yet? :(

Go New England Patriots!!!!

Link to comment
Share on other sites

OK I have the above problem fixed but I have a new one ;)

 

I'm using this with a template and when I get to the shipping total screen it reverts back to a funky looking default osc page. I'm assuming the modifications in the checkout_shipping.php need to be made in the checkout_shipping.tpl.php file of the template?

 

Am I right about that, and what is the code that I need to put in the tpl file?

Go New England Patriots!!!!

Link to comment
Share on other sites

  • 2 weeks later...

Hello to all from Mozambique.

 

I seem to have screwed something up in this contribution, but I can't seem to figure out what it is. It might be related to XPatriotsX's problem, but I'm not certain. Everything is working fine from the admin side. However, now that I've installed this contribution, I'm getting this error:

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/httpd/vhosts/artmozambique.com/httpdocs/catalog/includes/classes/shopping_cart.php on line 17

 

Here is the code I have from that area of the page:

 

  class shoppingCart {
   var $contents, $total, $weight, $cartID, $content_type;
// mod indvship 
      // first mod ok  $this->shiptotal += ($products_ship_price * $qty); 
     $this->shiptotal += ($products_ship_price); 
     if ($qty > 1) { 
       if ($products_ship_price_two > 0) { 
      $this->shiptotal += ($products_ship_price_two * ($qty-1)); 
      } else { 
     $this->shiptotal += ($products_ship_price * ($qty-1)); 
    } 
} 
  // end indvship

 

Could anyone, for the love of gosh, please help me with this? I'm tired and I want to go to bed.

 

Cheers,

 

Jonathan

Link to comment
Share on other sites

Hi there,

This has been asked many times and still, no answer. Please, can someone please answer this and let us know how it can be done?

 

Individual Product Shipping Prices - v3.1 installed

It all works fine, but there is a problem integrating other shipping methods...

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 it works great and the shipping is $5.00 and it shows up as the only shipping option at checkout

 

And...

 

When you add a product to your shopping cart WITHOUT individual shipping price set, the normal shipping fees are figured in and the customer can choose what shipping method they want (I have USPS and UPS installed in Admin). This too workd great.

 

BUT...

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 AND you add another product to your shopping cart WITHOUT individual shipping price set, the only shipping option shown is the individual shipping and the total shipping fee is only $5.00. Shipping for the other item is not added in with the $5.00

 

It needs to add the shipping for the OTHER item WITH the $5.00 so that the total shipping cost is $x.xx

 

Anyone has a solution for this?

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I have individual shipping installed but it's not quite what I want. We have a table rate that we use based on order total, but some of our products are digital downloads. I have set the shipping cost to 0.0 for these products, yet they still charge the table rate shipping. Is there a way to fine tune this contribution or is my code messed up (again)?

 

Terrye

Link to comment
Share on other sites

I have individual shipping installed but it's not quite what I want. We have a table rate that we use based on order total, but some of our products are digital downloads. I have set the shipping cost to 0.0 for these products, yet they still charge the table rate shipping. Is there a way to fine tune this contribution or is my code messed up (again)?

 

Terrye

 

My site is ready to go live, other than this one little problem. Can anyone help please? I have digital products that don't have shipping and I have a flat table rate for everything else.

Anyone?

Link to comment
Share on other sites

Hi there,

This has been asked many times and still, no answer. Please, can someone please answer this and let us know how it can be done?

 

Individual Product Shipping Prices - v3.1 installed

It all works fine, but there is a problem integrating other shipping methods...

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 it works great and the shipping is $5.00 and it shows up as the only shipping option at checkout

 

And...

 

When you add a product to your shopping cart WITHOUT individual shipping price set, the normal shipping fees are figured in and the customer can choose what shipping method they want (I have USPS and UPS installed in Admin). This too workd great.

 

BUT...

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 AND you add another product to your shopping cart WITHOUT individual shipping price set, the only shipping option shown is the individual shipping and the total shipping fee is only $5.00. Shipping for the other item is not added in with the $5.00

 

It needs to add the shipping for the OTHER item WITH the $5.00 so that the total shipping cost is $x.xx

 

Anyone have a solution for this?

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I have the same problem a couple of you guys have mentioned:

 

I need to be able to specificy a fixed shipping rate for each item, then a different price for each 4additional item - but I need to do it for the continental US and the Rest of the World.

 

I've got everything else setup but can't seem to get this to work and I'm despairing. My client needs this to work ASAP and I'm not really a PHP programmer - just more of a fiddler, so to speak.

 

If anyone has ANY suggestions on how to make that work, I'd appreciate it. Thanks.

Link to comment
Share on other sites

I hope someone has a fix or update for this...

 

I have Individual Product Shipping Prices installed on osC 2.2 MS2

 

I have turned on:

Individual Product Shipping Prices

UPS

USPS

 

It works great until you add a product where the Individual Product Shipping Prices are NOT set to your shopping cart ALONG with a product that DOES have it set.

 

When you go to checkout, only shipping option to choose from is the Individual Product Shipping Prices set price for that one product and the other shipping is not added to the order at all.

 

Is there a way to have this mode add up the Individual Product Shipping Prices AND the regular shipping fees together at checkout?

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

Does anyone know how to modify this code to have a fixed shipping price per product, for multiple shipping methods? I have 4 shipping method costs added to my products description table, and depending on the ship method chosen, add a slight mark-up to these costs. It seems like a simple modification, but I haven't been able to pull it off. Anybody else need something like this?

Link to comment
Share on other sites

  • 3 weeks later...

I hope someone has a fix or update for this...

 

I have Individual Product Shipping Prices installed on osC 2.2 MS2

 

I have turned on:

Individual Product Shipping Prices

UPS

USPS

 

It works great until you add a product where the Individual Product Shipping Prices are NOT set to your shopping cart ALONG with a product that DOES have it set.

 

When you go to checkout, only shipping option to choose from is the Individual Product Shipping Prices set price for that one product and the other shipping is not added to the order at all.

 

Is there a way to have this mode add up the Individual Product Shipping Prices AND the regular shipping fees together at checkout?

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

  • 2 weeks later...

hello,

 

I have installed the latest version of Individual Shipping Prices v3.1

 

It is not working. I am running the latest release of oscommerce as well.

 

I added the tables to the db, uploaded all the changed files and the fields show up when you add a product, but when i enter a price for the shipping of that item and submit it, then go back into edit it, the price for shipping is 0 and it does not add it to the cart.

 

whats the deal?

Link to comment
Share on other sites

  • 1 month later...

I have everything installed correctly. When I go into the admin panel and add a shipping price to the item, the change does not get into the database (there is no error or anything)

 

Has anyone else experienced this and if so, how can I resolve

 

Issue: When using "Individual Product Shipping Prices", the changes I submit for the product do not get comitted to the database.

 

Thank you!

 

Ron

Link to comment
Share on other sites

  • 2 weeks later...

Your answer is in this forum topic a few pages before this one.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

As much as this is needed and the MANY people who have requested this fix, still nothing???

 

This has been asked many times and still, no answer. Please, can someone please answer this and let us know how it can be done?

 

Individual Product Shipping Prices - v3.1 installed

It all works fine, but there is a problem integrating other shipping methods...

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 it works great and the shipping is $5.00 and it shows up as the only shipping option at checkout

 

And...

 

When you add a product to your shopping cart WITHOUT individual shipping price set, the normal shipping fees are figured in and the customer can choose what shipping method they want (I have USPS and UPS installed in Admin). This too workd great.

 

BUT...

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 AND you add another product to your shopping cart WITHOUT individual shipping price set, the only shipping option shown is the individual shipping and the total shipping fee is only $5.00. Shipping for the other item is not added in with the $5.00

 

It needs to add the shipping for the OTHER item WITH the $5.00 so that the total shipping cost is $x.xx

 

Anyone has a solution for this?

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

  • 2 weeks later...
hello,

 

I have installed the latest version of Individual Shipping Prices v3.1

 

It is not working.  I am running the latest release of oscommerce as well.

 

I added the tables to the db, uploaded all the changed files and the fields show up when you add a product, but when i enter a price for the shipping of that item and submit it, then go back into edit it, the price for shipping is 0 and it does not add it to the cart.

 

whats the deal?

 

I'm getting excatly the same problem. How did you resolve this? If you found a post somewhere, where?

 

Thanks.

 

Peter.

Link to comment
Share on other sites

Do the products have to have a weight for this to work? It works fine when products have a weight but when there is no weight I get nothing

 

As much as this is needed and the MANY people who have requested this fix, still nothing???

 

 

When you add a product to your shopping cart WITH individual shipping price set to $5.00 AND you add another product to your shopping cart WITHOUT individual shipping price set, the only shipping option shown is the individual shipping and the total shipping fee is only $5.00. Shipping for the other item is not added in with the $5.00

 

It needs to add the shipping for the OTHER item WITH the $5.00 so that the total shipping cost is $x.xx

 

I'm actually working on this. I got it to show all shipping methods (individual and whatever). I need to solve the weight thing first to see what it does. Right now I am at checkout and selecting a method.

Edited by crashwave

q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Link to comment
Share on other sites

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...