Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] individual product shipping prices


Recommended Posts

Hey everyone!

 

How can I remove the radio button at checkout. I just want individual shipping charges to be tac ons. I think everything will be basically the same. The indv. shipping just needs to be mandatory without a radio button.

 

Thanks alot!!

Link to comment
Share on other sites

Matt,

What do you mean? Do you want it added on even it there is another shipping method?

For two items, one with Indiv and the other without?

 

Rudy

Link to comment
Share on other sites

Rudy,

 

 

I have all of my items on table rate for ground shipping. Oversized items need to have an additional flat rate.

 

So, what you said would be ideal. I want the individual shipping costs to simply addon to the products -- even if there are other shipping charges.

 

What I will do is use the default shipping classes page. This will then show all shipping options even when individual is active.

 

What I need to do now is remove the radio button and have it there in just text.

 

This way customers will see that they had an oversized item and an additional flat rate was added.

 

Thanks,

MAtt

Link to comment
Share on other sites

I downloaded the Individual Product Shipping Prices but I get this error

 

1054 - Unknown column 'p.products_ship_price' in 'field list'

 

select p.products_ship_price, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by pd.products_name

Link to comment
Share on other sites

I figured out how to enter SQL, but now the error is still appearing, but in a different place, when I select category and click on any product I get this, somdody please help me with this I was trying to fix it for 3 days. :angry:

 

1054 - Unknown column 'p.products_ship_price_two' in 'field list'

 

select p.products_ship_price, p.products_ship_price_two, pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '28' and p.products_id = pd.products_id and pd.language_id = '1'

Link to comment
Share on other sites

I edited the admin/categories.php as instructed but now when I go to my admin category I get this error:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site54/fst/var/www/html/oscommerce/admin/includes/functions/database.php on line 99

 

 

here is the database.php

I also pointed out where 99 line is? how can I fix this?

 

$query .= $columns .= ' = null, ';

break;

default:

$query .= $columns . ' = \'' . tep_db_input($value) . '\', ';

break;

}

}

$query = substr($query, 0, -2) . ' where ' . $parameters;

}

 

return tep_db_query($query, $link);

}

 

function tep_db_fetch_array($db_query) {

LINE ------99 return mysql_fetch_array($db_query, MYSQL_ASSOC);

}

 

function tep_db_result($result, $row, $field = '') {

return mysql_result($result, $row, $field);

}

 

function tep_db_num_rows($db_query) {

return mysql_num_rows($db_query);

}

 

function tep_db_data_seek($db_query, $row_number) {

return mysql_data_seek($db_query, $row_number);

}

 

function tep_db_insert_id() {

return mysql_insert_id();

}

 

function tep_db_free_result($db_query) {

return mysql_free_result($db_query);

}

 

function tep_db_fetch_fields($db_query) {

return mysql_fetch_field($db_query);

}

 

function tep_db_output($string) {

return htmlspecialchars($string);

}

 

function tep_db_input($string) {

return addslashes($string);

}

 

function tep_db_prepare_input($string) {

if (is_string($string)) {

return trim(stripslashes($string));

} elseif (is_array($string)) {

reset($string);

while (list($key, $value) = each($string)) {

$string[$key] = tep_db_prepare_input($value);

}

return $string;

} else {

return $string;

}

}

?>

Link to comment
Share on other sites

I just replaced the "categories" in admin and the error dissapeared, can sombody please send me those files that need to be modified I had a lot of trouble doing this?

 

THNKS i really need this so I can get my shop running.

Link to comment
Share on other sites

HI all.. I am back with another question...

 

So far i have my individual shipping contribution working great as it is... but now i would like to add this option to calculate international shipping rates too..

 

Basically what i have now is the individual shipping prices for my products so when they purchase that price comes up but this works for anyone anywhere in the world... but i want it to work in only 1 country and then say that if the country of the costomer was anything other than country A than it should charge a different rate...

 

SO something like if you are in Country A then charge this price... and if you in anyother country then you get charged another rate..

 

 

Appreciate any help. thanks

Link to comment
Share on other sites

  • 1 month later...

Any suggestions for help with this error message?

 

 

 

Sub-Total: 1054 - Unknown column 'products_ship_price_two' in 'field list'

 

select products_id, products_price, products_ship_price, products_ship_price_two, products_tax_class_id, products_weight from products where products_id = '44'

 

[TEP STOP]

Link to comment
Share on other sites

Any suggestions for help with this error message?

 

 

 

Sub-Total: 1054 - Unknown column 'products_ship_price_two' in 'field list'

 

select products_id, products_price, products_ship_price, products_ship_price_two, products_tax_class_id, products_weight from products where products_id = '44'

 

[TEP STOP]

Link to comment
Share on other sites

Have a look in MySql database for the field

 

'products_ship_price_two'

 

you may have misspelt it or it not there.. And also try and go and see where ever you have 'products_ship_price' that you also have 'products_ship_price_two'

 

good luck ;)

Link to comment
Share on other sites

Thanks!

 

I added that line to the database. It took away the error message and I can process orders.

 

However.... I only have the "indvidual shipping" mod installed and I have added a new product with individual shipping costs.

 

Upon checkout no shipping fees are added or displayed for the product. What could I be doing wrong?

Link to comment
Share on other sites

iamclogger,

 

Make sure that you follow the installation instructions for placing the field 'products_ship_price' and 'products_ship_price_two' ,

 

there could be a possibility that there is that field is missing in your code when it tells it to save the new shipping rates in the database,

 

Most probably is that you must have left that field out, have another look at the

admin/categories.php page and read the readme file that came with the contribution..

 

It's easily missed i have had that problem once.

 

;)

Link to comment
Share on other sites

Please help

 

I have set it up and uploaded everything, but when I go to check out I get this:

 

Fatal error: Call to undefined function: get_shiptotal() in /homepages/46/d98455693/htdocs/shop/catalog/includes/modules/shipping/indvship.php on line 51

 

Any ideas

 

Here is a copy of the file that is causing the problems:

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

 

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;

$shiptot = $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' => $shiptot)));

 

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

}

}

?>

Link to comment
Share on other sites

  • 2 weeks later...

Hi, Is it possible for the indiv. shipping module to add the shipping cost at the checkout without it being an option. If I have two items w/different ship methods, customers have the option to select the cheapest one which usually is the indiv. ship. price.

 

I'd like it to just add it to the order w/o the customer selecting it.

 

Thanks

rudy

 

Let me know what you think.

Link to comment
Share on other sites

  • 3 weeks later...

question is at checkout.

 

Once I have selected some items and go to checkout, my shipping price is way too high. Basically an item is 17.99 and the indiv. shipping is 4.75. but the shipping price is not correct. I then hit refresh thinking maybe that's what I need to do, but when i do that, the shipping price goes higher. All I have that should be running is Ind. ship and ONE tax rate of 6%. Does anyone know how to fix this?

Edited by jcrou82
Link to comment
Share on other sites

Hi there, sorry for this if it's been answered but reading through all 13 of these pages things got a bit unclear for me (what was done, what needs to be customly done etc etc) and I'd like to ask:

 

The question is:

If I have all my products with their own individual shipping prices (as i want to), can I then have them have alternative individual shipping prices depending on shipping location?

 

EG:

Product1 has shipping of $5 in North America, $20 rest of the world

 

Product2 has shipping of $8 in North America, $10 for UK, $20 for rest of the world

 

 

 

Can the module do this?

 

 

Thanks for your help and time :)

 

Rob

Link to comment
Share on other sites

I am getting this error when trying to edit a product:

 

1054 - Unknown column 'p.products_ship_price_two' in 'field list'

select p.products_ship_price, p.products_ship_price_two, pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '41' and p.products_id = pd.products_id and pd.language_id = '1'

[TEP STOP]

 

What is wrong?

 

Thanks,

Nicholas LeBlanc

Link to comment
Share on other sites

Hi there,

 

I have installed the 'Individual Product Shipping Prices - v1.0'.

It all works fine.

But It does one thing I would not like it to do.

 

If I have a product which I want to ship for a special shipping price it works fine, you get the individual shipping price as shipping option during check-out.

It also works fine for the other products (without individual shipping price) as it shows only my other shipping options during check-out.

But if someone buys a product with an individual shipping price in combination with other products (not individualy priced for shipping) I want it to show during check-out only the normal shipping options and not the individual priced shipping option as it does now.

 

Anyone has a solution for this?

 

Robert

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