Jump to content
dmGremlin

[contribution] individual product shipping prices

Recommended Posts

i searched

 

checkout_confirmation.php

checkout_payment.php

includes/classes/shipping.php

includes/classes/shopping_cart.php

includes/classes/order.php

 

there's either no

require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;

or it's been quoted out.

Sorry i m new to php.  Post a screen copy, maybe it could help....

 

test.gif[

 

did you get this work??

Share this post


Link to post
Share on other sites
did you get this work??

 

 

YES , I just got it work !!!

 

in the zip file, the "indivship.php" file was in the includes/languages/modules/shipping/ folder.

 

i copied it to the includes/languages/english/modules/shipping/ folder

 

problem solved!!

 

 

but then I got -TABLE_SHIPPING_METHODS error..

 

I followed crashwave's instruction, created the table, input the data 000000 ....and defined in the databaes_tables.php but the error was still there.

 

then I quoted out the //product shipping ........... in categories.php

 

it's finally working now!!

 

THANK YOU Crashwave for your great contribution!

Edited by fayenet

Share this post


Link to post
Share on other sites
did you get this work??

 

 

I can't get pas tthat error either about the redeclare in indvship.php on line 14.

I've checked to comment out /remove the two lines as you said previously, but still no joy.

Please can you help me?

Thanks,

Steve

Share this post


Link to post
Share on other sites

I got it to work, all I did was redownload the zip file and replace the indvship.php on the server with the fresh one, and everything works great..

Share this post


Link to post
Share on other sites

Ok, my mistake...there was another file i had to redownload.

 

Now i get the 1146 - Table 'store.table_products_shipping' doesn't exist

error

 

This is twisting my melons, so to speak! lol

 

Anyone know how to fix this please?

 

Thanks

Share this post


Link to post
Share on other sites
but then I got -TABLE_SHIPPING_METHODS error..

 

didi you define in correct database file

 

 

 

Now i get the 1146 - Table 'store.table_products_shipping' doesn't exist

error

 

Make sure you define in your database files. also table_products_shipping that should be capitalized, don't know if you just wrote it like that :D

 

gonna go Watch a movie with boyfriend now "1M years BC" B) be back soon


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

Share this post


Link to post
Share on other sites

hey crashwave...everything seems to be working ok with the contribution EXCEPT for one thing...on my order confirmation page i am getting the following errors

 

Billing Information 

Billing Address (Edit) : Warning: Variable passed to reset() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 29

Payment Method (Edit): Warning: Variable passed to each() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 30

 

 

LINE 29 and 30 in ot_tax.php reads:

reset($order->info['tax_groups']);
    while (list($key, $value) = each($order->info['tax_groups'])) {

 

please help if you have any idea what is causing this

Share this post


Link to post
Share on other sites
didi you define in correct database file

Make sure you define in your database files. also table_products_shipping  that should be capitalized, don't know if you just wrote it like that  :D

 

gonna go Watch a movie with boyfriend now "1M years BC"  B) be back soon

 

Yes, i defined it in both database files and i also had it all capitalized.

Thanks for help, maybe somebody else has had this problem and sorted it?

 

Thanks,

Steve

Share this post


Link to post
Share on other sites

i had this problem what fixed was this:

put this in sql:

 

CREATE TABLE `TABLE_SHIPPING_METHODS` (

`methods_id` int(10) unsigned NOT NULL auto_increment,

`methods_name` varchar(32) NOT NULL default '',

`methods_module` varchar(32) NOT NULL default '',

`methods_handling_charge` decimal(5,2) NOT NULL default '0.00',

`methods_handling_per_box` tinyint(1) NOT NULL default '0',

`methods_tare_weight` decimal(4,2) NOT NULL default '0.00',

`methods_max_box_weight` tinyint(3) unsigned NOT NULL default '0',

`date_added` datetime default NULL,

`last_modified` datetime default NULL,

`ship_zipcode` varchar(32) NOT NULL default '',

PRIMARY KEY (`methods_id`)

) TYPE=MyISAM AUTO_INCREMENT=14;

 

 

and define it in the database files. I guess you can leave it blank or add you methods like so

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (1, 'Fedex', 'fedex1', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (2, 'Flat Rate', 'flat', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (3, 'Free Shipping', 'freeshipper', 0.00, 0, 0.00, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (4, 'Individual Shipping', 'indvship', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (5, 'Per Item', 'item', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (6, 'Percent', 'percent', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (7, 'Table Rates', 'table', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (8, 'UPS', 'ups', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (9, 'UPSXML', 'upsxml', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (10, 'USPS', 'usps', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (11, 'Zone Based', 'zones', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (12, 'Zonesworld', 'zonesworld', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (13, 'Regions', 'regions', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

Edited by jiqqaman

Share this post


Link to post
Share on other sites

Who is this asnwer directed to?

 

 

i had this problem what fixed was this:

put this in sql:

 

CREATE TABLE `TABLE_SHIPPING_METHODS` (

`methods_id` int(10) unsigned NOT NULL auto_increment,

`methods_name` varchar(32) NOT NULL default '',

`methods_module` varchar(32) NOT NULL default '',

`methods_handling_charge` decimal(5,2) NOT NULL default '0.00',

`methods_handling_per_box` tinyint(1) NOT NULL default '0',

`methods_tare_weight` decimal(4,2) NOT NULL default '0.00',

`methods_max_box_weight` tinyint(3) unsigned NOT NULL default '0',

`date_added` datetime default NULL,

`last_modified` datetime default NULL,

`ship_zipcode` varchar(32) NOT NULL default '',

PRIMARY KEY  (`methods_id`)

) TYPE=MyISAM AUTO_INCREMENT=14;

and define it in the database files. I guess you can leave it blank or add you methods like so

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (1, 'Fedex', 'fedex1', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (2, 'Flat Rate', 'flat', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (3, 'Free Shipping', 'freeshipper', 0.00, 0, 0.00, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (4, 'Individual Shipping', 'indvship', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (5, 'Per Item', 'item', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (6, 'Percent', 'percent', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (7, 'Table Rates', 'table', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (8, 'UPS', 'ups', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (9, 'UPSXML', 'upsxml', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (10, 'USPS', 'usps', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (11, 'Zone Based', 'zones', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (12, 'Zonesworld', 'zonesworld', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

INSERT INTO `TABLE_SHIPPING_METHODS` VALUES (13, 'Regions', 'regions', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

Share this post


Link to post
Share on other sites
Thank You Very Much...

Your a Gent!

 

That solved the problem.

 

Thanks again,

Steve

 

 

Sorry I thought you already did that http://forums.oscommerce.com/index.php?sho...ndpost&p=566919 and it is new instructions http://forums.oscommerce.com/index.php?sho...ndpost&p=566990


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

Share this post


Link to post
Share on other sites
hey crashwave...everything seems to be working ok with the contribution EXCEPT for one thing...on my order confirmation page i am getting the following errors

 

Billing Information 

Billing Address (Edit) : Warning: Variable passed to reset() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 29

Payment Method (Edit): Warning: Variable passed to each() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 30

LINE 29 and 30 in ot_tax.php reads:

reset($order->info['tax_groups']);
? ? while (list($key, $value) = each($order->info['tax_groups'])) {

 

please help if you have any idea what is causing this

 

You didn't edit your order.php file correctly


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

Share this post


Link to post
Share on other sites
You didn't edit your order.php file correctly

 

 

thank you O MIGHTY CRASHWAVE!! lol

 

again thanks I had some lines of code from a diffrent contribution i didnt use and it was conflicting.

Share this post


Link to post
Share on other sites

ok got it all without errors and such

 

but now on my products page it doesnt display the shipping cost (just $) OR add the shipping cost to the total

Edited by swishemart

Share this post


Link to post
Share on other sites
ok got it all without errors and such

 

but now on my products page it doesnt display the shipping cost (just $) OR add the shipping cost to the total

 

 

This does not do that. that is another addition to this contribution.


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

Share this post


Link to post
Share on other sites
This does not do that. that is another addition to this contribution.

 

so what i installed is the Shipping rate per product v2.0....your saying the Shipping rate per product v2.0 adds onto Individual Product Shipping Prices - v4.1???

Edited by swishemart

Share this post


Link to post
Share on other sites
so what i installed is the Shipping rate per product v2.0....your saying the Shipping rate per product v2.0 adds onto Individual Product Shipping Prices - v4.1???

 

 

ok well no reply so ill try and add in Individual Product Shipping Prices - v4.1

Share this post


Link to post
Share on other sites

I don't know anything about Shipping rate per product v2.0. Also that is from 23 Nov 2002 . I don't think you should use two different shipping per product. If you already have Shipping rate per product v2.0 and it works for you leave it. Individual shipping is probably totally different.

shipping per http://www.oscommerce.com/community/contributions,367

individual shipping http://www.oscommerce.com/community/contributions,1333

Edited by crashwave

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

Share this post


Link to post
Share on other sites

ok so i uninstalled Shipping rate per product v2.0 and installed Individual shipping and im getting the same error..crashwave you said i didnt edit my order.php correct...i have gone ove rthis a few times and all looks good..if possible someone please post your order.php so i can see if there are diffrences

 

 

Warning: Variable passed to reset() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 29

Warning: Variable passed to each() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 30

Share this post


Link to post
Share on other sites

I had everything working on my staging server but now on my live site when I checkout on the shipping page it only shows

"This is currently the only shipping method available to use on this order." with no options below it. I'm using all of the same files that were on my staging server???

 

I'm lost :(, any help would be appreciated.

BTW, thank you for the great contribution.

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

×