How to include a 'Add to Basket' button in a list view of products

Author Message

Adolfo Barragán

Tuesday 16 September 2003 11:42:53 pm

In my list of products I need include the "Add to Basket" button for every product of the list.

I put this code, but it does not work:

{section name=Child loop=$:products sequence=array( bglight, bgdark )}
...
<input type="image" name="ActionAddToBasket" src={"addtocart.gif"|ezimage} width="32" height="32" alt="Add to Basket" />
...
{/section}

How can I assign $ContentObjectID to the correct value (The Object ID associated to the button pressed).

Thanks in advance
Adolfo Barragan

How

Paul Forsyth

Wednesday 17 September 2003 1:42:17 am

I've answered this on the developers forum in reply to the same post you put there.

There is no need to cross post.

Paul

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 31 2025 08:09:23
Script start
Timing: Jan 31 2025 08:09:23
Module start 'layout'
Timing: Jan 31 2025 08:09:23
Module start 'content'
Timing: Jan 31 2025 08:09:23
Module end 'content'
Timing: Jan 31 2025 08:09:23
Script end

Main resources:

Total runtime0.0133 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.0047 588.4219151.2422
Module start 'layout' 0.00470.0021 739.664136.6953
Module start 'content' 0.00690.0050 776.359490.1094
Module end 'content' 0.01190.0014 866.468829.9922
Script end 0.0132  896.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002519.0907140.0002
Check MTime0.00118.2597140.0001
Mysql Total
Database connection0.00064.858910.0006
Mysqli_queries0.002014.783130.0007
Looping result0.00000.084410.0000
Template Total0.00118.010.0011
Template load0.00086.333010.0008
Template processing0.00021.605310.0002
Override
Cache load0.00064.533910.0006
General
dbfile0.001410.428880.0002
String conversion0.00000.044940.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