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

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 19:06:48
Script start
Timing: Jan 18 2025 19:06:48
Module start 'layout'
Timing: Jan 18 2025 19:06:48
Module start 'content'
Timing: Jan 18 2025 19:06:48
Module end 'content'
Timing: Jan 18 2025 19:06:48
Script end

Main resources:

Total runtime0.0241 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.0088 587.9141152.6250
Module start 'layout' 0.00880.0049 740.539139.4453
Module start 'content' 0.01360.0067 779.984493.3203
Module end 'content' 0.02040.0037 873.304734.3047
Script end 0.0241  907.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003313.6838140.0002
Check MTime0.00145.8242140.0001
Mysql Total
Database connection0.00208.147410.0020
Mysqli_queries0.004217.575630.0014
Looping result0.00000.102910.0000
Template Total0.003213.110.0032
Template load0.00145.670910.0014
Template processing0.00187.400710.0018
Override
Cache load0.00114.434710.0011
General
dbfile0.00145.920280.0002
String conversion0.00000.049540.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