Products options and basket. How to store the selections ?

Author Message

laurent le cadet

Wednesday 03 August 2005 2:14:27 am

Hi,

I'm trying to customize the product class to allowed customers to choose differents options of products.

For exemple the customer can choose a single product wich can belike this :

- product name

- size 1 : price 1
- size 2 : price 2
...

For that, I'm using the multiple option datatype.

But I can't store the selection in the basket.

Anyone ?

Thanks.

laurent le cadet

Wednesday 03 August 2005 3:09:53 am

I found that in basket.tpl :

{section show=$Basket:ProductItem:item.item_object.option_list}
<tr>
  <td class="{$Basket:ProductItem:sequence}" colspan='4'>
     <table class="shop-option_list">
<tr>
<td colspan='3'>
{"Selected options"|i18n("design/standard/shop")}
</td>
</tr>
     {section name=Options loop=$Basket:ProductItem:item.item_object.option_list}
      <tr>
        <td width="33%">{$Basket:ProductItem:Options:item.name}</td>
        <td width="33%">{$Basket:ProductItem:Options:item.value}</td>
        <td width="33%">{$Basket:ProductItem:Options:item.price|l10n(currency)}</td>
      </tr>
    {/section}
     </table>
   </td>
  <td class="{$Basket:ProductItem:sequence}" colspan='5'>
  </td>
</tr>
{/section}

so I renamed the multi-options attribute to "option_list" but there still nothing I can print out :((

Any idea ?

Laurent

laurent le cadet

Wednesday 03 August 2005 5:14:16 am

this do the trick :)

http://ez.no/community/forum/setup_design/shop_options

but this way seems amazing to me (?)

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

Main resources:

Total runtime0.8842 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.4141152.6563
Module start 'layout' 0.00650.0035 742.070339.5078
Module start 'content' 0.01000.8727 781.5781471.5313
Module end 'content' 0.88260.0015 1,253.109412.0938
Script end 0.8841  1,265.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3818160.0002
Check MTime0.00140.1588160.0001
Mysql Total
Database connection0.00100.109010.0010
Mysqli_queries0.823293.1061550.0150
Looping result0.00060.0707530.0000
Template Total0.844395.520.4221
Template load0.00260.293920.0013
Template processing0.841795.194420.4208
Template load and register function0.00010.010810.0001
states
state_id_array0.00080.092710.0008
state_identifier_array0.00190.214420.0009
Override
Cache load0.00210.2393270.0001
Sytem overhead
Fetch class attribute can translate value0.00090.104610.0009
Fetch class attribute name0.00150.172340.0004
XML
Image XML parsing0.00060.063210.0006
class_abstraction
Instantiating content class attribute0.00000.002460.0000
General
dbfile0.00630.7133160.0004
String conversion0.00000.001040.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs