This topic is locked

shopping cart

8/8/2011 5:46:39 PM
PHPRunner General questions
author

I recently visited www.urgfree.com which is a phprunner site. The tables on the list page are listed beside one another. 2 questions.

  1. How can I make tables arrangements side by side and on top of another
  2. How can I display images of offers on the list page if i select show no recorld first page. This is for a shopping cart view.
    Thanks for your help

C
cgphp 8/9/2011

I think that a custom template has been adopted for the urgfree website list page. You can achieve the same result assigning different tempate vars for each category (Appliances, Electronics/Computers, Motor Vehicles and so on) retrieving the numbers of records of each sub-category.
For example:
In the visual editor switch to the html source code and insert a template var like {$first_category}. Then in the "before display" event of the list page enter a code like the following:



global $conn;

$rs = CustomQuery("SELECT sub_category,COUNT(sub_category) as num FROM table_name GROUP BY sub_category",$conn);
$str = "";

while($record = db_fetch_array($rs))

{

$str .= $record['sub_category']." ".$record['num']."<br/>";

}
$xt->assign("first_category",$str);