chrometweaks.org

Has anyone made any money with iPage Reseller hosting?

Click Here To View All Answers...


My 1st question is: Has anyone made any money with iPage Reseller hosting? Thanks in advance for any comment. Second question of mine... Is it possible to take my current osCommerce database and replace it with a new database from a fresh install without loosing all my info?.

I have an error in my current database that I cannot figure out how to fix so I was thinking of just replacing the database.......

Comments (118)

I'm stumped. I'm not so sure what is the right answer to your question. I'll do some investigation and get back to you if I find an good answer. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

This is the error I am receiving.....

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1.

Select products_description as desc_info from products_description where products_id =.

[TEP STOP].

I cannot figure out what or which table is having the problem. I looked in products table but all seemed ok..

Yes I am using phpadmin, not very good with it tho I must admit......

So what do you think I should do?..

Comment #2

Oh, forgot to mention I get this error when I am in the admin panel, and click on customers, then orders and try to edit an order........

Comment #3

That looks like an error somewhere in your code, not in your database..

I suggest you assume that your database is good & look at your code (especially anything you changed recently).

Good Luck,.

Bob..

Comment #4

Have you added any admin contributions? I'm having a hard time seeing where that query would come from on the orders.php. There is no product discription when I look at an order on my site...

Comment #5

I have added a few contributions, last one I added was this:.

Http://www.oscommerce.com/community/contri...rch,Print+order.

PrintOrder Plus Store Logo contribution. It has you edit these following files......

Catalog/includes/languages/english.php.

Catalog/includes/application_top.php.

Catalog/includes/header.php.

Catalog/account_history_info.php.

Catalog/checkout_process.php.

Catalog/checkout_confirmation.php.

Catalog/checkout_success.php.

Admin/orders.php.

Admin/index.php.

Admin/header.php.

Admin/includes/languages/english.php.

Admin/includes/languages/english/invoice.php.

Admin/includes/languages/english/packingslip.php.

Under admin/orders.php this is what it has you edit......

########## ADMIN/ORDERS.PHP ##########.

The next few steps will change the INVOICE and PACKING SLIP buttons to launch a.

JavaScript PopUp-Window for Invoice and Packing Slip, instead of the standard HTML link reference currently used..

Locate the following in admin/orders.php - (unmodified version of file - Line#99).

<script language="javascript" src="includes/general.js"></script>.

</head>.

Add the following code just BEFORE it....

<script language="javascript" src="includes/general.js"></script>.

<script language="javascript"><!.

Function popupWindow(url) {.

Window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res.

Izable=yes,copyhistory=no,width=650,height=500,screenX=150,screenY=150,top=150,le.

Ft=150').

}.

//></script>.

</head>.

**********.

Locate the following line of code - (unmodified version of file - Line#312).

<td colspan="2" align="right"><?php echo '<a href="'tep_href_link(FILENAME_ORDERS_INVOICE, 'oID='$HTTP_GET_VARS['oID'])'" TARGET="_blank">'tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE)'</a> <a href="'tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID='$HTTP_GET_VARS['oID'])'" TARGET="_blank">'tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP)'</a> <a href="'tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')))'">'tep_image_button('button_back.gif', IMAGE_BACK)'</a>'; ?></td>.

Replace with this....

<td colspan="2" align="right"><?php echo '<a href="java script:popupWindow(\''(HTTP_SERVERDIR_WS_ADMINFILENAME_ORDERS_INVOICE)'?'(tep_get_all_get_params(array('oID'))'oID='$HTTP_GET_VARS['oID'])'\')">'tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE)'</a><a href="java script:popupWindow(\''(HTTP_SERVERDIR_WS_ADMINFILENAME_ORDERS_PACKINGSLIP)'?'(tep_get_all_get_params(array('oID'))'oID='$HTTP_GET_VARS['oID'])'\')">'tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP)'</a><a href="'tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')))'">'tep_image_button('button_back.gif', IMAGE_BACK)'</a>'; ?></td>.

**********.

Locate the following line of code near the end of the file - (unmodified version of file - Line#402).

$contents[] = array('align' => 'center', 'text' => '<a href="'tep_href_link(FILENAME_ORDERS_INVOICE, 'oID='$oInfo->orders_id)'" TARGET="_blank">'tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE)'</a> <a href="'tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID='$oInfo->orders_id)'" TARGET="_blank">'tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP)'</a>');.

Replace with this....

$contents[] = array('align' => 'center', 'text' => '<a href="java script:popupWindow(\''(HTTP_SERVERDIR_WS_ADMINFILENAME_ORDERS_INVOICE)'?'(tep_get_all_get_params(array('oID', 'action'))'oID='$oInfo->orders_id)'\')">'tep_image_button('button_invoice.gif', IMAGE_ORDERs_INVOICE)'</a><a href="java script:popupWindow(\''(HTTP_SERVERDIR_WS_ADMINFILENAME_ORDERS_PACKINGSLIP)'?'(tep_get_all_get_params(array('oID'))'oID='$oInfo->orders_id)'\')">'tep_image_button('button_packingslip.gif', IMAGE_ORDERs_PACKINGSLIP)'</a>');.

########## END ###.

So what could be wrong?......that is if it's even the orders.php file thats the problem.....

Thanks guys for all your help with this..

Comment #6

Well, when I click on edit on the orders page it goes to admin/orders.phps?selected_box=customers&page=1&oID=55&action=edit&osCAdminID=.

It's the action=edit that tells it what to do next. It requires the file admin/includes/classes/order.php and prints out the order..

I think the problem is there somewhere, not in your database. I would try going back to the old orders.php and see if it works...

Comment #7

Also, what did you change in the header.php? I still don't see that query. Where is it coming from?..

Comment #8

Ok first of all I dont think it's the printorder contribution giving me the headaches, but I think it's this contribution that I installed before the printorder ......

EZ New Fields.....

Http://www.oscommerce.com/community/contri...earch,new+field.

I think that this where my problem is......

Files affected:.

Catalog/includes/languages/english.php.

Catalog/admin/includes/languages/english/categories.php.

Catalog/admin/categories.php.

Catalog/product_info.php.

Under the admin/catagories.php file, it says to do this:.

Line:458-461.

AFTER THESE LINES: <tr>.

<td class="main"><?php echo TEXT_PRODUCTS_PRICE; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_input_field('products_price', $pInfo->products_price); ?></td>.

</tr>.

ADD THESE LINES: <tr>.

<td class="main"><?php echo TEXT_PRODUCTS_RETAIL_PRICE; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_input_field('products_retail_price', $pInfo->products_retail_price); ?></td>.

</tr>.

I do not have this line:.

<td class="main"><?php echo TEXT_PRODUCTS_PRICE; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_input_field('products_price', $pInfo->products_price); ?></td>.

So I stuck it here inbetween these lines:.

<td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td>.

</tr>.

<tr>.

<td class="main"><?php echo TEXT_PRODUCTS_RETAIL_PRICE; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_input_field('products_retail_price', $pInfo->products_retail_price); ?></td>.

</tr>.

<tr bgcolor="#ebebff">.

<td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>.

I dont know if thats the cause.....if it's in the admin/orders.php file, I do not know where the problem would be in it......

I can let you look at the orders file if you want or if you tell me a section to show you I can......

This is worrying me very much, my store is all set and I put in alot of time into it, hate to see me have to start over from this little error......

Comment #9

That is why every contrib says backup, backup, backup!!! Then you should only make small changes at one time and test, test, test..

I would say your database is probably intact. Maybe you could unzip a fresh copy of OSC and then then upload the admin folder into a new folder, say admin2, and then copy the config.php file over to that folder and see if it works...

Comment #10

Good idea.....will try that, only think is I have several contributions I will have to go back over......

Thanks..

Comment #11

Is it possible to take my current osCommerce database and replace it with a new database from a fresh install without loosing all my info?.

I have an error in my current database that I cannot figure out how to fix so I was thinking of just replacing the database.......

Comment #12

How do you know you have an error in your database? Can you just redo one table in the database? Do you have phpmyadmin? You can drop a table and then go to the oscommerce.sql in the install folder and get the table format and set the table back up..

You need to backup your database. You can use the backup tool on the admin page or use phpmyadmin and get a backup in text format before you reinstall. If you just reinstall it will put back in all the stock example OSC data...

Comment #13


This question was taken from a support group/message board and re-posted here so others can learn from it.