Totally Zenned
- Join Date:
- Jun 2008
- Location:
- Washington, DC
- Posts:
- 775
- Plugin Contributions:
- 1
OsCommerce Data Importer - Errors
Willie
Could I get a link to see?
Skip
• 446F63746F722057686F •
Views: 37,960
Totally Zenned
Willie
Could I get a link to see?
Skip
• 446F63746F722057686F •
Zen Follower
New Zenner
Hi, I'm upgrading from osCommerce MS2.2 to Zen Cart 1.39h. I've used the osCommerce Data Importer, and it works for the most part ok, but I've got problems displaying the order history under My Account in the front-end. It only displays orders placed after the data import. In admin all of the history is shown. I've tried with both my own template and the classic one, but with the same result. Any hints on where to look ? :unsure:
The only add-ons installed are:
Ez-Pages Footer Columns
Column Layout Grid for Product Listing 1.3.8
Single List Template
Totally Zenned
Dexter35:
Hi, I'm upgrading from osCommerce MS2.2 to Zen Cart 1.39h. I've used the osCommerce Data Importer, and it works for the most part ok, but I've got problems displaying the order history under My Account in the front-end. It only displays orders placed after the data import. In admin all of the history is shown. I've tried with both my own template and the classic one, but with the same result. Any hints on where to look ? :unsure:
The only add-ons installed are:
Ez-Pages Footer Columns
Column Layout Grid for Product Listing 1.3.8
Single List Template
The OSC order status number that was used. Is it the same number that ZC is using and the definition is the same?
Admin->Localization->Orders Status
Skip
• 446F63746F722057686F •
New Zenner
skipwater:
The OSC order status number that was used. Is it the same number that ZC is using and the definition is the same?
Admin->Localization->Orders Status
Skip
Yes, there is no difference between the order status number/definition that was used in OSC and ZEN. The strange thing is that in admin I get the information I need with complete order history, but when I log in for the exact same customer in frontend, no history is shown. Is the SQL queries that builds this information different in the backend in regards to the frontend?
Dexter
Totally Zenned
Dexter35:
Yes, there is no difference between the order status number/definition that was used in OSC and ZEN. The strange thing is that in admin I get the information I need with complete order history, but when I log in for the exact same customer in frontend, no history is shown. Is the SQL queries that builds this information different in the backend in regards to the frontend?
Dexter
From what I can tell the front end uses the customer ID in the session to get the history information.
Where the admin side doesn't.
You can look at the front end code yoursite/includes/modules/pages/account_history/header_php.php.
Code that calls history:
$history_query_raw = "SELECT o.orders_id, o.date_purchased, o.delivery_name,
o.billing_name, ot.text as order_total, s.orders_status_name
FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s
WHERE o.customers_id = :customersID
AND o.orders_id = ot.orders_id
AND ot.class = 'ot_total'
AND o.orders_status = s.orders_status_id
AND s.language_id = :languagesID
ORDER BY orders_id DESC";
The best I can suggest is to look at the customer ID in the session and see if it matches the customer ID for history.
Skip
• 446F63746F722057686F •
Zen Follower
i don't know if this helps but i had like one or two errors during the import.
what i did was go back to my oem database and go into myphpadmin and repair and optimze all the tables. it kills off the left over chunks on the tables, extra bs basiclaly.
try it again after doing that.
good lukc. the script is definitely awesome.
don't mess with willie bee. i may go crazy on you.
New Zenner
skipwater:
From what I can tell the front end uses the customer ID in the session to get the history information.
Where the admin side doesn't.You can look at the front end code yoursite/includes/modules/pages/account_history/header_php.php.
Code that calls history:
$history_query_raw = "SELECT o.orders_id, o.date_purchased, o.delivery_name,
o.billing_name, ot.text as order_total, s.orders_status_name
FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s
WHERE o.customers_id = :customersID
AND o.orders_id = ot.orders_id
AND ot.class = 'ot_total'
AND o.orders_status = s.orders_status_id
AND s.language_id = :languagesID
ORDER BY orders_id DESC";
>
> The best I can suggest is to look at the customer ID in the session and see if it matches the customer ID for history.
>
> Skip
Thanks for the tip, but I'm pretty new to session debugging :lookaroun , so if you could point me in the right direction in what/where to look I would very much appreciate it :smile:
Totally Zenned
willie bee:
It is in the admin side
the front page should show
MAIN CAT1 | MAIN CAT2 | MAIN CAT 3
each cat has a 160x120 image attached to it
please ssee atttachemtns.
This has been solved.
The error came from not populating the categories_status field in ZC.
Inserting a 1 into the categories_status field fixed it. A new version OsCommerce Data Importer 2.1 has been uploaded.
Skip
• 446F63746F722057686F •
New Zenner
Hi
First off, thank you for a nice tool skipwater :)
Since i am having some issues with importing my osc database to zen i was thinking about trying the latest version of this tool. I checked at http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=918 and i can only find v2.0 there and I see you say on the former post that you have uploaded v2.1. Does it have to get approved first before its available?
Thanks :)
--
DB
Totally Zenned
Digiblood:
Hi
First off, thank you for a nice tool skipwater :)
Since i am having some issues with importing my osc database to zen i was thinking about trying the latest version of this tool. I checked at http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=918 and i can only find v2.0 there and I see you say on the former post that you have uploaded v2.1. Does it have to get approved first before its available?
Thanks :)
--
DB
It has not been approved yet but you can download it from here oscommerce_data_importer_v2-1.zip
Skip
• 446F63746F722057686F •
New Zenner
Thanks so much for making this available! Works great. :bigups:
Totally Zenned
goosedesign:
Thanks so much for making this available! Works great. :bigups:
Thanks for the kind words.
Skip
• 446F63746F722057686F •
Zen Follower
it was either keep using osCommerce again since our old site used it or zen cart. skips mod is what made us finally move over to zen cart and he's been oh so helpful. this mod definitely needs to be promoted more with the zen cart software on the front zc page to bring more future converters over.
thanks so much
don't mess with willie bee. i may go crazy on you.
New Zenner
Hi,
I have managed to import products and customers but when I try to import the orders (about 19000) is fails after only 2600 with the following:
Fatal error: Out of memory (allocated 23068672) (tried to allocate 24 bytes) in /home/username/public_html/test/import_osc_orders.php on line 316
PHP memory limit is set to 64M, but I did try increasing to 256M but it didn't make any difference!
Any help would be appreciated.
Chris Rickards
Totally Zenned
rickcj:
Hi,
I have managed to import products and customers but when I try to import the orders (about 19000) is fails after only 2600 with the following:
Fatal error: Out of memory (allocated 23068672) (tried to allocate 24 bytes) in /home/username/public_html/test/import_osc_orders.php on line 316
PHP memory limit is set to 64M, but I did try increasing to 256M but it didn't make any difference!
Any help would be appreciated.
Chris Rickards
Where did you set the new memory value, php.ini file, htaccess, or in the php file itself?
After increasing php memory did phpinfo() show the memory set to your new value?
If you do not have access to php.ini you might try adding this to your htaccess file.
php_value max_execution_time 200
php_value mysql.connect_timeout 240
php_value memory_limit 256M
Skip
• 446F63746F722057686F •
New Zenner
I have a VPS so made the change in WHM and it did show the new limit in phpinfo.
New Zenner
Hi,
I tried increasing the memory limit to 512M but it still displayed the error: Fatal error: Out of memory (allocated 23068672) (tried to allocate 24 bytes) in /home/username/public_html/test/import_osc_orders.php on line 316
Is there anything else you can suggest?
Thanks,
Chris
Totally Zenned
rickcj:
Hi,
I tried increasing the memory limit to 512M but it still displayed the error: Fatal error: Out of memory (allocated 23068672) (tried to allocate 24 bytes) in /home/username/public_html/test/import_osc_orders.php on line 316
Is there anything else you can suggest?
Thanks,
Chris
It seem that no matter what you set php memory to. Your server is only allowing 23068672 bytes.
If you have a local setup of zc you might want to do the conversion there. Then import the new data to your web server.
Skip
• 446F63746F722057686F •
New Zenner
Hi,
Thank's, i'll check with the host.
Regards,
Chris
Tell staff why this post should be reviewed.