Product with different prices to add to basket

Author Message

Lo' F.

Wednesday 13 April 2011 1:17:29 am

Hi there,

Here's the scenario.

I need to create a webshop with some special requirements:

- Each product needs to have different prices:

* 3 different prices depending on the logged user belonging to a specific group of clients

* and 3 different prices for the single item and for the boxes of 6 and 12 of those items

The thing is that my client doesn't want to work on percentages but feel free to manually enter each of the prices with no rules (in other words, it has to be totally up to him).

So I made up a product class with 9 different attributes for the price. And in the template override for that class showed each price for the single item and for the boxes of 6 and 12 items, depending on the logged user. And each price has its own addToBasket button with its own form.

To the basket page, which currently shows only the first entered object's price of the price attribute, I need to pass the product name and the submitted choice (single/box of 6/box of 12) with its specific price.

If I submit those attributes values through hidden input fields in each form I should need to customize the action script to pass those values to the basket.tpl..

Where can I find the script file that takes care of this operation?

Besides, do you think this is the best way I can accomplish my tasks?

loredanaebook.it

Sandra Parente

Wednesday 13 April 2011 1:34:39 am

Didn't you considered the possibility of using different price lists? I mean, managing price lists is simpler than managing nine prices for a single product. Every user/user group shall be associated to a specific price list. Of course you'll have to customize the price datatype for getting the price from different lists when the customer is logged in.

Sandra Parente
www.netbliss.it

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

Main resources:

Total runtime0.0257 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.0075 588.0469152.6406
Module start 'layout' 0.00750.0036 740.687539.4844
Module start 'content' 0.01110.0124 780.171989.2891
Module end 'content' 0.02350.0022 869.460930.2891
Script end 0.0257  899.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.1360140.0002
Check MTime0.00114.3863140.0001
Mysql Total
Database connection0.00176.432610.0017
Mysqli_queries0.003212.528830.0011
Looping result0.00000.096410.0000
Template Total0.00166.410.0016
Template load0.00083.269610.0008
Template processing0.00083.094410.0008
Override
Cache load0.00062.239010.0006
General
dbfile0.00020.935180.0000
String conversion0.00000.041740.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