*** 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.