X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Question converting to a smarty template (https://forum.x-cart.com/showthread.php?t=6550)

ngwheels 03-02-2004 04:10 PM

Question converting to a smarty template
 
Hi guys, I'm working on integrating a site with x-cart, and I'm having some trouble's with these smarty templates. I have this php file & I'm not too sure how I should implement this as a template. I've been reading tutorials all day, but I'm still not sure how I should tackle this, if somebody could point me in the right direction it would be much appreciated.

This is the basic PHP file that I need to implement.

Code:

<?php require_once('../../Connections/cart.php'); ?>
<?php
mysql_select_db($database_cart, $cart);
$query_test = "SELECT wheel_id, Make, Type, Wheel_Size FROM wheels";
$test = mysql_query($query_test, $cart) or die(mysql_error());
$row_test = mysql_fetch_assoc($test);
$totalRows_test = mysql_num_rows($test);
?>
<table border="1">
  <tr>
    <td>wheel_id</td>
    <td>Make</td>
    <td>Type</td>
    <td>Wheel_Size</td>
  </tr>
  <?php do { ?>
  <tr>
    <td><?php echo $row_test['wheel_id']; ?></td>
    <td><?php echo $row_test['Make']; ?></td>
    <td><?php echo $row_test['Type']; ?></td>
    <td><?php echo $row_test['Wheel_Size']; ?></td>
  </tr>
  <?php } while ($row_test = mysql_fetch_assoc($test)); ?>
</table>


Thanks for any help!

B00MER 03-02-2004 11:57 PM

From the looks of this code, you'd be interested in my brand, model, year mod. Here's the details on it:

Allow the ability to insert Brand / Model and Year of each individual product. Great for those who use X-cart on Automobile or Bike sites who need a solution to allow for easy browsing of their inventory. Drop down lists are generated distinctively by every available product brand & model associated.

You can see a working example at:
www.extremepsi.com

hth. ;)

ngwheels 03-03-2004 06:33 PM

Well, I'm not sure if your mod will do what I need or not (I hope so, less work for me :lol: ) To be more specific, I'm looking to add a table like THIS (created dynamicaly) to the product.tpl file. What the problem is I have 1 wheel thats avaliable in 3 or 4 sizes with 5 - 10 different bolt patterns, I want the user to be able search for the wheel & then get a table with all the avaliable types.

Thanks for your quick response!, sorry I couldn't get back quicker.

B00MER 03-04-2004 09:09 PM

Funkydunk has a mod for adding product options to the products listings, this combined with my brand model year search, with a slightly modified products.tpl file to display in a more "wholesale" or "reseller" manner like you have displayed would do such.

hth. ;)


All times are GMT -8. The time now is 10:54 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.