Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Question converting to a smarty template

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-02-2004, 04:10 PM
 
ngwheels ngwheels is offline
 

Member
  
Join Date: Feb 2004
Posts: 12
 

Default 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!
Reply With Quote
  #2  
Old 03-02-2004, 11:57 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 03-03-2004, 06:33 PM
 
ngwheels ngwheels is offline
 

Member
  
Join Date: Feb 2004
Posts: 12
 

Default

Well, I'm not sure if your mod will do what I need or not (I hope so, less work for me ) 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.
Reply With Quote
  #4  
Old 03-04-2004, 09:09 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:06 PM.

   

 
X-Cart forums © 2001-2020