Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Does anyone understand this?


lee246

Recommended Posts

I'm trying to install a contribution but the instructions aren't too clear. Can anyone please tell me what this means in plain english:

 

 

 

****************

MYSQL table products_shipping

 

DROP TABLE IF EXISTS `products_shipping`;

CREATE TABLE `products_shipping` (

`products_id` int(11) NOT NULL default '0',

`products_ship_methods_id` int(11) default NULL,

`products_ship_zip` varchar(32) default NULL,

`products_ship_price` varchar(10) default NULL,

`products_ship_price_two` varchar(10) default NULL

) TYPE=MyISAM;

 

Add in includes/databaes_tables.php define('TABLE_PRODUCTS_SHIPPING', 'products_shipping'); //eof

 

*******************************

Files to change

1- Add in includes/databaes_tables.php

define('TABLE_PRODUCTS_SHIPPING', 'products_shipping');

+++++++++++++++++++++++++++

++++++++++++++++++++++++++

2-includes application_top.php

at the end before the ?> add

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping;

Link to comment
Share on other sites

Run the given SQL script against your database using phpmyAdmin, i.e.:

 

DROP TABLE IF EXISTS `products_shipping`;

CREATE TABLE `products_shipping` (

`products_id` int(11) NOT NULL default '0',

`products_ship_methods_id` int(11) default NULL,

`products_ship_zip` varchar(32) default NULL,

`products_ship_price` varchar(10) default NULL,

`products_ship_price_two` varchar(10) default NULL

) TYPE=MyISAM;

 

 

 

Add the text

define('TABLE_PRODUCTS_SHIPPING', 'products_shipping');

 

to the file includes/database_tables.php

 

Point 2 at the end is clear enough

Link to comment
Share on other sites

Ahhhh, the old double post again. I guess if folks just post it four or five times, they'll get lots of different answers to choose from.

 

Lee, double posting not allowed per forum guidelines. See my response to your original post, sorry I didn't answer you fast enough.

 

Tom

Link to comment
Share on other sites

after a lengthy install process i'm now getting the following error when i try to edit the products in my catalogue in the admin area:

 

1146 - Table 'lee246_osc2.TABLE_PRODUCTS_SHIPPING' doesn't exist

 

SELECT * FROM TABLE_PRODUCTS_SHIPPING WHERE products_id=19

Link to comment
Share on other sites

All that the sql command you executed was meant to do was to drop the table products_shipping and recreate it in a different way. Are you using a cvs version of osCommerce, or the default MS2.2?

 

Vger

Link to comment
Share on other sites

Did you do this:

 

Add the text

define('TABLE_PRODUCTS_SHIPPING', 'products_shipping');

 

to the file includes/database_tables.php (on the ADMIN side!)

 

 

It is not resolving the TABLE_PRODUCTS_SHIPPING constant

 

Oh, and next time - remove your username from before table links - no need to make this information public.

Link to comment
Share on other sites

Vger, i'm using a default install of oscommerce, i'm guessing its the default MS2.2.

 

Falsedawn, I have done what you suggested and i'm now recieving a different error along these lines:

 

1146 - Table 'lee246_osc2.TABLE_SHIPPING_METHODS' doesn't exist

 

select methods_id, methods_name from TABLE_SHIPPING_METHODS

 

[TEP STOP]

 

I'm also recieving this error when I try to access the main page of the shop:

Parse error: parse error, unexpected T_STRING in /home/lee246/public_html/testshop1/includes/classes/shopping_cart.php on line 292

 

 

I'm tempted to just do a fresh install and try again.

Link to comment
Share on other sites

If you tried to understand why what you did fixed your previous error, you would know immediately what the first problem is this time.

 

The second error is caused by incorrectly editing the shoping_cart.php file. You _did_ use FTP and a plain text editor and not the OSC file manager to edit, yes?

Link to comment
Share on other sites

Yes I downloaded to file to my computer, then edited it with dreamweaver, then uploaded it again.

 

I know I seem a bit of a pain with all this but I am new to it all so I am on a steep learning curve.

 

Am I right in assuming that the files edited in the public includes folder should also be edited in the admin folder?

Link to comment
Share on other sites

If you used the Dreamweaver FTP client for download and/or upload then stop using it. The Dreamweaver FTP client is known to be unstable, and has a habit of causing problems - especially with php files.

 

I would suggest reinstalling the shopping_cart.php file from an unedited default version.

 

Vger

Link to comment
Share on other sites

If you used the Dreamweaver FTP client for download and/or upload then stop using it.  The Dreamweaver FTP client is known to be unstable, and has a habit of causing problems - especially with php files.

 

lee

 

Specifically, Dreamweaver offers cursed "Code Rewriting" functions :x (in Preferences in the version I have). It's a pretty primitive FTP client, to be sure...but if you disable the damned Rewrite Code options you should be OK with it. It is also true that there are better FTP clients.

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Does anyone have the edited files for this contribution already? That way I could just upload them without messing them up.

 

Sorry, I missed the name of contribution you are trying to install.

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Lee:

 

I don't use that contribution, but I've just scanned the installation instructions. You are aware that there are 10 files to modify (not only the two listed above...)? The problem is that a lot of people--even if they use that contribution--will have also done additional mods to those files for their own purposes. Seems to me that if you can't get through this yourself, you're looking at getting somebody to do the installation for you...

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Would I still be able to install the mod on a default oscommerce install or is it still going to be a big task?

 

On a default install certainly makes it easier, but unfortunately there are no guarantees with any contributions.

 

Comments in the instructions such as

"HOWEVER I might have forgotten to add steps in instructions."
aren't confidence builders. :huh:

 

I suggest reading the Contribution Support thread carefully to get an idea for possible problems. You could also contact the developer. Good luck.

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...