Reducing stock quantity when an order is confirmed

Author Message

Felix Laate

Thursday 01 September 2005 5:49:31 am

Hi all!

I'm doing (after all these years) my first ez shop. Each product has an attribute "quantity".

What I would like, is that whenever a user confirms an order, this quantity is lowered by one.

I understand that it's possible to hack the kernel to make this work, but this has unwanted consequenses..

I think that I could (in the same way that an object of an class is updated) put some code into the "confirmorder-template" that achieves this.

Has anyone done similar things? And do they want to share the experience(s)?

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

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 18 2025 22:16:25
Script start
Timing: Jan 18 2025 22:16:25
Module start 'layout'
Timing: Jan 18 2025 22:16:25
Module start 'content'
Timing: Jan 18 2025 22:16:27
Module end 'content'
Timing: Jan 18 2025 22:16:27
Script end

Main resources:

Total runtime1.6844 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.2734152.6406
Module start 'layout' 0.00700.0045 741.914139.4766
Module start 'content' 0.01161.6713 781.3906460.5469
Module end 'content' 1.68290.0014 1,241.93758.1250
Script end 1.6843  1,250.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00520.3112160.0003
Check MTime0.00190.1115160.0001
Mysql Total
Database connection0.00180.108110.0018
Mysqli_queries1.636297.1430460.0356
Looping result0.00060.0335440.0000
Template Total1.641197.420.8205
Template load0.00260.155120.0013
Template processing1.638497.274020.8192
Template load and register function0.00010.006510.0001
states
state_id_array0.00190.110410.0019
state_identifier_array0.00310.186520.0016
Override
Cache load0.00220.1278110.0002
Sytem overhead
Fetch class attribute can translate value0.00060.037910.0006
Fetch class attribute name0.00110.068220.0006
XML
Image XML parsing0.00040.024210.0004
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00150.0875160.0001
String conversion0.00000.000540.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 5
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs