You are here:  » Re-arrange price table elements

Support Forum



Re-arrange price table elements

Submitted by npaitken on Mon, 2009-08-17 12:00 in

Hi David,

I've been doing some web analytics with ClickTale (excellent service BTW). Basically gives you a a kind-of replay video of what people are doing on your site. It's amazing to watch visitor scanning / clicking behaviour!

I've decided to re-arrange the elements in my price table and also want to make things clickable, especially the merchant logos. Nearly everyone I've observed trys to click it!

At the minute my Price Table has the following columns running left to right.

Merchant Name
Merchant Logo
Product Description (clickable)
Price (clickable)
Buy Now button (clickable)

I'd like to change it so that basically everything is clickable and goes to the applicable merchant product page. I think it would be good to have a product thumbnail too and the following flow from left to right.

Product Thumbnail (clickable)
Product Description (clickable)
Merchant Logo (clickable)
Price (clickable)
Buy Now (clickable)

What would the generic code for this be?

Many thanks,
Neil

Submitted by support on Mon, 2009-08-17 12:09

Hi Neil,

Do you mean to have a thumbnail and description in the prices table itself rather than the single image / description at the top?

That's all straight forward - all the data is in the array, just not displayed within the prices table.

Firstly, I think to make everything clickable the easiest way to would be to give an link (A) tag to each table tow (TR). So in html/prices.php, where you have within the foreach loop:

    <tr bgcolor='#ffffcc'>
      ...merchant/product name/price/buy now cells here...
    </tr>

...you would make that:

    <a href='<?php print tapestry_buyURL($product); ?>'>
    <tr bgcolor='#ffffcc'>
      ...merchant/product name/price/buy now cells here...
    </tr>
    </a>

For a thumbnail image column (don't forget the associated column header), you could then use:

      <td><?php print ($product["image_url]?"<img src='".$product["image_url"]."' width='80' border='0' />":"&nbsp;"); ?></td>

...and for description:

      <td><?php print ($product["description"]?$product["description"]:"&nbsp;"); ?></td>

In addition, I would remove the existing link (A) tags from the merchant name (if you are still showing it whilst using logos) and "Buy Now" field as they will be covered by the single link tag for the row...

Hope this helps!

Cheers,
David.

Submitted by npaitken on Mon, 2009-08-17 13:57

Worked perfectly. Thanks David.