Quick solution to create large searchable stock list online

Author Message

steve walker

Tuesday 20 September 2005 7:20:11 am

Hi there,

I was hoping someone might have an idea on approaching a request we've had from a client.

They are an electronics distributor. Consequently, while their product series is not that large (say 500), within a series they could have a 1000 variants. I think their stock list is about 5000ish items at present...

From their inhouse system, they can export a CSV file of stock name, number, and amount in stock. No price at the moment, so they aren't after ecommerce here.

What they want to do is to allow clients to search for stock on their website and get information back on amount in stock etc.

The most obvious solution would be to create an import script that grabs each line of the CSV file and imports it into a small stock class we could create, but:

- this would mean 1000's of data attributes in the backend, and
- from a previous project in which PaulF created an import script for jewellery stock items (about 300 items) we found PHP execute times wouldn't allow us to import the stock all in one go.

So, I wondered if anyone has a suggestion for importing a large about of CSV data into Ez in such a way that it can be searched on, is easy to upload by the client, and stays away from creating too much dbase overhead?

Any input would be greatly appreciated.

Regards, Steve.

http://www.oneworldmarket.co.uk

steve walker

Wednesday 21 September 2005 4:23:09 am

Any thoughts on this? Or is it something Ez is not well setup to do?

Steve.

http://www.oneworldmarket.co.uk

Gabriel Ambuehl

Wednesday 21 September 2005 4:56:24 am

Put the stuff in a real SQL table and write a small extension for it?

Visit http://triligon.org

steve walker

Wednesday 21 September 2005 10:44:20 am

Hi Gabriel,

That could work - except integrating the Ez search so it indexes the additional dbase table too could be tricky.

Ez can be a strange beast at times - its so powerful that it sometimes blasts itself past the normal things in life - like easily uploading a 3 column product list of 5000 items, which like you say could be created in a day with mysql and a few php forms.

Has noone had to deal with this sort of issue previously?

Steve.

http://www.oneworldmarket.co.uk

Gabriel Ambuehl

Wednesday 21 September 2005 11:56:55 am

You could of course have a system cronjob import the data using php-cli, that doesnt fall victim to run time limitations...

Visit http://triligon.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:09:33
Script start
Timing: Jan 19 2025 01:09:33
Module start 'layout'
Timing: Jan 19 2025 01:09:33
Module start 'content'
Timing: Jan 19 2025 01:09:33
Module end 'content'
Timing: Jan 19 2025 01:09:33
Script end

Main resources:

Total runtime0.0259 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0102 589.4141152.6563
Module start 'layout' 0.01020.0029 742.070339.5078
Module start 'content' 0.01310.0103 781.578193.2891
Module end 'content' 0.02330.0025 874.867234.3047
Script end 0.0258  909.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.004717.9934140.0003
Check MTime0.003011.7368140.0002
Mysql Total
Database connection0.00124.678910.0012
Mysqli_queries0.003212.376930.0011
Looping result0.00000.073710.0000
Template Total0.00207.910.0020
Template load0.00135.017810.0013
Template processing0.00072.843210.0007
Override
Cache load0.00103.828810.0010
General
dbfile0.00031.190980.0000
String conversion0.00000.045140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs