*** PLEASE ***

Author Message

john polo

Tuesday 13 December 2005 10:03:18 pm

Please guys i need help, i have posted this a week ago but none of you wrote back something about it. I know you guys know the answer of this. This is kinda hard for me since im newbie on this...

I just need the list my products like the following webpage. What i need to configure to have that setup for my products on my shopping page ?

http://osc.template-help.com/9588/index.php

PLEASE I NEED HELP ON THIS

TY !!

john polo

Wednesday 14 December 2005 3:29:28 am

i did the following by changing design/base/override/templates/line/product.tpl

http://www.donercafe.com/alp/index.php?/food/products

but one line consists of the same product..horizontally....vertically it is ok...

am i missing something here.. how can i set it up so that each table shows different products...



<link href="stylesheet.css" rel="stylesheet" type="text/css">
<body>
<table border="0" cellpadding="0" cellspacing="0" width="42%">
  <tbody>
    <tr>
      <td>
        <table cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <td></td>
            </tr>
            <tr>
              <td height="6"></td>
            </tr>
            <tr>
              <td class="bg">
                <!-- new_products //-->
                <table cellpadding="0" cellspacing="0">
                  <tbody>
                    <tr>
                      <td valign="top" width="257">
                        <table align="center" cellpadding="0" cellspacing="0" width="247">
                          <tbody>
                            <tr>
                              <td align="center" valign="middle" width="118"><span class="content-image">{attribute_view_gui alignment=right image_class=small attribute=$node.object.data_map.image.content.data_map.image}</span></td>
                              <td valign="top" width="128">
                                <table align="center" border="0" cellpadding="0" cellspacing="0" width="120">
                                  <tbody>
                                    <tr>
                                      <td height="2"></td>
                                    </tr>
                                    <tr>
                                      <td height="42" valign="middle"><span class="tx"><strong>{$node.name|wash()}</strong></span></td>
                                    </tr>
                                    <tr>
                                      <td height="2"></td>
                                    </tr>
                                    <tr>
                                      <td class="main" height="52">{attribute_view_gui attribute=$node.object.data_map.short_description}</td>
                                    </tr>
                                  </tbody>
                              </table></td>
                            </tr>
                            <tr>
                              <td colspan="2" height="5"></td>
                            </tr>
                            <tr>
                              <td colspan="2" bgcolor="#e1dcdc" height="1" width="247"></td>
                            </tr>
                            <tr>
                              <td colspan="2" height="10"></td>
                            </tr>
                            <tr>
                              <td colspan="2" align="center" valign="middle"><span class="ch1">{attribute_view_gui attribute=$node.object.data_map.price}<span class="currency_symbol"></span></span>							  <form method="post" action={"content/action"|ezurl}>
                  <input type="image" src={"addcart.jpg" |ezimage }  name="ActionAddToBasket" value="{"Add to basket"|i18n("design/base")}" />
                  <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
                  <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
                  <input type="hidden" name="ViewMode" value="full" /> </form>
                  <a href={$node.url_alias|ezurl}><img src={"details.jpg"|ezimage} border="0" /></a>
							 
</td>
                            </tr>
                            <tr>
                              <td colspan="2" height="10"></td>
                            </tr>
                            <tr>
                              <td colspan="2" bgcolor="#c5bbbb" height="1" width="247"></td>
                            </tr>
                          </tbody>
                      </table></td>
                      <td width="1"></td>
                      <td valign="top" width="257">
                        <table align="center" cellpadding="0" cellspacing="0" width="247">
                          <tbody>
                            <tr>
                              <td align="center" valign="middle" width="118"><span class="content-image">{attribute_view_gui alignment=right image_class=small attribute=$node.object.data_map.image.content.data_map.image}</span></td>
                              <td valign="top" width="128">
                                <table align="center" border="0" cellpadding="0" cellspacing="0" width="120">
                                  <tbody>
                                    <tr>
                                      <td height="2"></td>
                                    </tr>
                                    <tr>
                                      <td height="42" valign="middle"><span class="tx"><strong>{$node.name|wash()}</strong></span></td>
                                    </tr>
                                    <tr>
                                      <td height="2"></td>
                                    </tr>
                                    <tr>
                                      <td class="tx" height="52"><span class="main">{attribute_view_gui attribute=$node.object.data_map.short_description}</span></td>
                                    </tr>
                                  </tbody>
                              </table></td>
                            </tr>
                            <tr>
                              <td colspan="2" height="5"></td>
                            </tr>
                            <tr>
                              <td colspan="2" bgcolor="#e1dcdc" height="1" width="247"></td>
                            </tr>
                            <tr>
                              <td colspan="2" height="10"></td>
                            </tr>
                            <tr>
                              <td colspan="2" align="center" valign="middle"><span class="ch1">{attribute_view_gui attribute=$node.object.data_map.price}<span class="currency_symbol"></span></span>							  <form method="post" action={"content/action"|ezurl}>
                  <input type="image" src={"addcart.jpg" |ezimage }  name="ActionAddToBasket" value="{"Add to basket"|i18n("design/base")}" />
                  <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
                  <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
                  <input type="hidden" name="ViewMode" value="full" /> </form>
                  <a href={$node.url_alias|ezurl}><img src={"details.jpg"|ezimage} border="0" /></a></td>
                            </tr>
                            <tr>
                              <td colspan="2" height="10"></td>
                            </tr>
                            <tr>
                              <td colspan="2" bgcolor="#c5bbbb" height="1" width="247"></td>
                            </tr>
                          </tbody>
                      </table></td>
                    </tr>
                  </tbody>
                </table>
                <table cellpadding="0" cellspacing="0">
                  <tbody>
                    <tr>
                      <td valign="top" width="257"></td>
                      <td width="1"></td>
                      <td valign="top" width="257"></td>
                    </tr>
                  </tbody>
                </table>
                <table cellpadding="0" cellspacing="0">
                  <tbody>
                    <tr> </tr>
                  </tbody>
                </table>
                <!-- new_products_eof //-->
              </td>
            </tr>
            <tr>
              <td height="6"></td>
            </tr>
          </tbody>
      </table></td>
    </tr>
  </tbody>
</table>
</body>
</html>

john polo

Wednesday 14 December 2005 12:17:32 pm

No one has an idea ? Come on guys

john polo

Thursday 15 December 2005 4:18:23 am

so no one here can tell me if you can put the products in two columns or not.. ?

Martin Lekvall

Friday 16 December 2005 3:12:19 am

John, Not sure i&#180;m on the spot here but to spread your products in a two-column table when looping through your items check out the {delimiter}-operator. Take a look at sitemap.tpl to get at grip on looping, tables and delimiter.

Some pseudo-code to give a hint could look something like:

{let your_products=fetch( .. fetch-conditions .. ) }
  <table>
    <tr>
    {section name=product loop=$your_products ...}
      <td>{$product.whatever}</td>

    {delimiter modulo=2}
    </tr>
    <tr>
    {/delimiter}

    </tr>
  </table>
  {/section}
{/let}

(I have not been working with the shop-module so maybe the fetch-things are not relevant here but the delimiter-thingy seems to be what you are looking for)

/martin

EzP 3.5.0, OE 2.0
RH-EL3 2.4, mySql 4.1.7, php 4.3.9, apache 1.3.33

john polo

Friday 16 December 2005 3:21:11 pm

Sir first of all I thank you for your answer. I will try this logic and let you know about the result.

thank you

john polo

Saturday 17 December 2005 3:27:18 pm

no sir no luck ... i guess im not doing it rite..it has become kinda frustrating

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

Main resources:

Total runtime1.4078 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.8984152.6094
Module start 'layout' 0.00490.0037 741.507839.3984
Module start 'content' 0.00861.3976 780.9063571.4453
Module end 'content' 1.40620.0016 1,352.351624.2031
Script end 1.4078  1,376.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2309160.0002
Check MTime0.00130.0948160.0001
Mysql Total
Database connection0.00060.044710.0006
Mysqli_queries1.356296.3345690.0197
Looping result0.00060.0456670.0000
Template Total1.372497.520.6862
Template load0.00190.133720.0009
Template processing1.370597.348820.6852
Template load and register function0.00020.015810.0002
states
state_id_array0.00140.099210.0014
state_identifier_array0.00150.109320.0008
Override
Cache load0.00150.1095290.0001
Sytem overhead
Fetch class attribute can translate value0.00080.058520.0004
Fetch class attribute name0.00100.070370.0001
XML
Image XML parsing0.00020.014520.0001
class_abstraction
Instantiating content class attribute0.00000.000870.0000
General
dbfile0.00100.0680100.0001
String conversion0.00000.000640.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 19
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs