Product creation before adding to basket

Author Message

Karol Radziuk

Thursday 05 May 2011 1:44:51 am

Hi,

I get product informations from an external provider via SOAP. Before user adds it, eZ must create an product object. Can I do this using workflow?

1. Click add to basket

2. Workflow creates product object and forward ist ID (or even 2 products in one time) to the shop add to basket function (Is it possible? This is the crux of the matter)

{$me|attribute(show,1)}

Marko Žmak

Thursday 05 May 2011 5:10:13 am

Just an idea... Why don't you fill your eZ database with product objects generated from this SOAP service and then use a cronjob to update your database regullary?

Then you can use this products with the eZP shop functionality.

Also if you make a call to the SOAP service every time the user adds something to basket, you can have problems due to loss of connectivity or slow connection to the SOAP service.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Gaetano Giunta

Thursday 05 May 2011 9:27:28 am

Do you really need to create full-fledged objects, or could you just add information to your order? The orders are quite flexible by themselves...

Principal Consultant International Business
Member of the Community Project Board

Karol Radziuk

Thursday 05 May 2011 11:37:51 pm

I checked the code a little more thoroughly and I see, that workflows are impossible in my case.
Trigger starts after checking the ObjectID, so I created the new extension for this.

@Marko
My approach is to get allways fresh informations.

@Gaetano
Good point, I forgot about this. Thanks.

{$me|attribute(show,1)}

Quoc Huy Nguyen Dinh

Tuesday 24 May 2011 12:37:24 pm

Gaetano, so it is possible to add info in an order / create an order without having a product?

Gaetano Giunta

Wednesday 25 May 2011 1:01:47 am

@quoc I do not think so - but I never tried...

Principal Consultant International Business
Member of the Community Project Board

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 17 2025 23:53:31
Script start
Timing: Jan 17 2025 23:53:31
Module start 'layout'
Timing: Jan 17 2025 23:53:31
Module start 'content'
Timing: Jan 17 2025 23:53:32
Module end 'content'
Timing: Jan 17 2025 23:53:32
Script end

Main resources:

Total runtime0.7325 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 589.4766152.6406
Module start 'layout' 0.00770.0037 742.117239.4844
Module start 'content' 0.01140.7194 781.6016667.6719
Module end 'content' 0.73080.0016 1,449.273416.1250
Script end 0.7325  1,465.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4688160.0002
Check MTime0.00140.1851160.0001
Mysql Total
Database connection0.00160.214110.0016
Mysqli_queries0.662890.4758700.0095
Looping result0.00090.1284680.0000
Template Total0.699995.620.3500
Template load0.00210.285420.0010
Template processing0.697895.263120.3489
Template load and register function0.00020.032410.0002
states
state_id_array0.00110.154710.0011
state_identifier_array0.00110.154020.0006
Override
Cache load0.00180.2459310.0001
Sytem overhead
Fetch class attribute can translate value0.00090.126540.0002
Fetch class attribute name0.00160.2216100.0002
XML
Image XML parsing0.00470.641240.0012
class_abstraction
Instantiating content class attribute0.00000.0031120.0000
General
dbfile0.00340.4609380.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs