Forums / Developer / Quick solution to create large searchable stock list online

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

eZ debug

Timing: Jan 18 2025 22:17:32
Script start
Timing: Jan 18 2025 22:17:32
Module start 'content'
Timing: Jan 18 2025 22:17:32
Module end 'content'
Timing: Jan 18 2025 22:17:33
Script end

Main resources:

Total runtime0.2736 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 589.1016180.7969
Module start 'content' 0.00700.0130 769.898497.8672
Module end 'content' 0.01990.2532 867.7656527.4219
Script end 0.2731  1,395.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00441.6044200.0002
Check MTime0.00180.6563200.0001
Mysql Total
Database connection0.00110.389210.0011
Mysqli_queries0.210476.87961410.0015
Looping result0.00250.89831390.0000
Template Total0.252692.310.2526
Template load0.00100.367210.0010
Template processing0.251691.932510.2516
Override
Cache load0.00070.264910.0007
Sytem overhead
Fetch class attribute can translate value0.00100.361410.0010
XML
Image XML parsing0.00030.121010.0003
General
dbfile0.00521.9095200.0003
String conversion0.00000.001530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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