Different prices for different user groups

Author Message

Eirik Alfstad Johansen

Wednesday 13 October 2004 3:20:56 am

Hi,

I have a potential client who needs to be able to present different product prices depending on which user group the user belongs to. My first idea was to make two attributes in the product class based on the ezprice datatype, and then manually select one when adding and updating the shopping cart. However, this would envolve modifying the kernel, so I was wondering if anyone has another idea. Perhaps someone has done something similar before?

Thanks in advance !

Sincerely,

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

Eirik Alfstad Johansen

Tuesday 19 October 2004 1:27:57 am

Bump.

Sincerely,

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

Wenyue Yu

Tuesday 19 October 2004 2:29:56 am

Hi,

Is it possible to use "Discount" achieving your result?

Example:
1. Go to shop/Discount and make a group 'G1".
2. Go to group "G1" and add a rule "rule1" which might specify having 12% discount of product X to these discount group.
3. Adding user groups to these discount group.

Then if the price for other groups is 100 kr, the discount group will get 88 kr.

Regards,
wenyue

frank dege

Tuesday 19 October 2004 3:18:20 am

hi erik,

we had a similar problem. discount-groups doesn´t fit the needs of our customer, because the prices are not calculatet by discount rules. the basket-module of ez also takes the first element of the class, which has the datatype "Price" and takes that price out of the product-object.

we implemented an extension. the extension provides some "basket" functions like adding one or more articles to the basket. we "copied" the basket-module to the extension and added some more functions.

frank

Espen Pedersen

Saturday 27 November 2004 4:10:37 am

Frank could you provide me with some more details about how this is done?
Can you do this without "hacking" in the kernel?

-Espen

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

Main resources:

Total runtime1.0736 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.0469152.6406
Module start 'layout' 0.00740.0031 740.687539.4766
Module start 'content' 0.01051.0616 780.1641628.5781
Module end 'content' 1.07220.0014 1,408.742212.1250
Script end 1.0735  1,420.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3765160.0003
Check MTime0.00160.1497160.0001
Mysql Total
Database connection0.00150.137810.0015
Mysqli_queries1.014394.4780670.0151
Looping result0.00060.0571650.0000
Template Total1.043897.220.5219
Template load0.00230.217720.0012
Template processing1.041497.002620.5207
Template load and register function0.00010.007410.0001
states
state_id_array0.00110.106410.0011
state_identifier_array0.00220.204420.0011
Override
Cache load0.00210.1923300.0001
Sytem overhead
Fetch class attribute can translate value0.00040.040240.0001
Fetch class attribute name0.00090.088470.0001
XML
Image XML parsing0.00200.185340.0005
class_abstraction
Instantiating content class attribute0.00000.001780.0000
General
dbfile0.00170.1578220.0001
String conversion0.00000.000740.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0003 secs