[eZ 4] Custom Discount and Stock Handling

Author Message

Wenzel Wondra

Tuesday 17 March 2009 9:49:54 am

Hi!

I'm pretty new to ez and hope that you could give me some useful tips on how to handle the following problem:

In my current project we have some kind of concert cards. These cards are split into three types (cat_1, cat_2 and cat_3), with different prices. I've made a custom class with product attributes so far - hopefully I am on the right way? Because ez does not provide stock handling, I have also added some more attributes eg: stock_cat1, stock_cat2 etc.

Now I need to calculate some fixed discount when a user adds eg 3 concert cards of the same attribute/category to the basket. Also the pseudo stock should be corrected after the checkout.

How could that be solved?

thanks,
wewo

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 14:58:42
Script start
Timing: Jan 18 2025 14:58:42
Module start 'layout'
Timing: Jan 18 2025 14:58:42
Module start 'content'
Timing: Jan 18 2025 14:58:42
Module end 'content'
Timing: Jan 18 2025 14:58:42
Script end

Main resources:

Total runtime0.0198 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.0064 591.6484152.6406
Module start 'layout' 0.00640.0034 744.289139.4766
Module start 'content' 0.00990.0072 783.765685.2578
Module end 'content' 0.01710.0026 869.023430.3047
Script end 0.0197  899.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003014.9764140.0002
Check MTime0.00136.4531140.0001
Mysql Total
Database connection0.00073.406710.0007
Mysqli_queries0.003919.509830.0013
Looping result0.00000.071110.0000
Template Total0.00199.610.0019
Template load0.00105.145610.0010
Template processing0.00094.463510.0009
Override
Cache load0.00073.653710.0007
General
dbfile0.002010.335780.0003
String conversion0.00000.042240.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