Forums / Developer / A simple E-commerce problem

A simple E-commerce problem

Author Message

PaoloMellerio kk

Saturday 20 November 2004 1:28:16 am

Hi,
one of my customer wants to use his Ez site to sell some products; the particularity is that products are "unique pieces" and so when they are sold they must be not available on site anymore. The question is: is there a way to use the template <b>confirmorder.tpl</b> to change the value of an attribute of class product (<b>product available - checkbox</b>) so that when I come back from Paypal(integration with paypal is already working) site with a valid transition, the template changes the value of checkbox "product available" from <i>YES</i> to <i>NO</i>: in this way the product wouldn't be available for the Ecommerce in the exact moment in which is sold.
Any idea?
Txk in advice.

Paolo Mellerio - Clikka!com - http://www.clikka.com/

Paolo Mellerio
http://www.clikka.com

Eirik Alfstad Johansen

Saturday 20 November 2004 2:56:58 am

Hi Paolo,

I don't think you would be able to do this using the confirmorder template. Hoever, you could create a new eventtype and run it as a part of a workflow when the order has been confirmed.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Balazs Halasy

Sunday 21 November 2004 7:15:13 am

Yeah, Eirik is right - you will not be able to do this directly from the template, but a simple/short workflow even should take care of it. Just create a new event and make it do what you want (set the attribute, republish the thing, etc.). and insert it in the right place of the workflow chain. Good luck!

B.

PaoloMellerio kk

Tuesday 23 November 2004 12:47:07 am

Thanks to Eirik and thanks to Balazs.

I hoped the problem could have been solved without the need of programming a workflow event (my knowledge in PHP programming is unsufficient to do that...).
But if there is no other solution, I ask to Erik and Balazs (or someone other) if are available in the Documentation or in the Contribution some examples useful to my needs...

Thanks a lot again.

Paolo Mellerio - Clikka!com - http://www.clikka.com

Paolo Mellerio
http://www.clikka.com

eZ debug

Timing: Jan 19 2025 21:23:54
Script start
Timing: Jan 19 2025 21:23:54
Module start 'content'
Timing: Jan 19 2025 21:23:55
Module end 'content'
Timing: Jan 19 2025 21:23:55
Script end

Main resources:

Total runtime1.4057 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.9531180.8359
Module start 'content' 0.00591.2629 769.7891599.8672
Module end 'content' 1.26880.1368 1,369.6563337.6875
Script end 1.4057  1,707.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2839210.0002
Check MTime0.00150.1065210.0001
Mysql Total
Database connection0.00060.045910.0006
Mysqli_queries1.330694.65261990.0067
Looping result0.00200.13931970.0000
Template Total1.378998.120.6895
Template load0.00220.159220.0011
Template processing1.376797.933220.6883
Template load and register function0.00010.007610.0001
states
state_id_array0.00070.051910.0007
state_identifier_array0.00070.047420.0003
Override
Cache load0.00190.1366240.0001
Sytem overhead
Fetch class attribute can translate value0.00120.088340.0003
Fetch class attribute name0.00130.090870.0002
XML
Image XML parsing0.00190.135640.0005
class_abstraction
Instantiating content class attribute0.00000.001180.0000
General
dbfile0.00550.3910390.0001
String conversion0.00000.000430.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs