View Single Post
  #9  
Old 12-16-2011, 03:46 PM
 
jake8804 jake8804 is offline
 

Newbie
  
Join Date: Dec 2011
Posts: 6
 

Default Re: What is the Smarty variable for Provider company name?

This is from func.product.php:

$product = func_query_first("SELECT $sql_tbl[products].*, $sql_tbl[products].avail-$in_cart AS avail, MIN($sql_tbl[pricing].price) as price $add_fields FROM $sql_tbl[pricing] INNER JOIN $sql_tbl[products] ON $sql_tbl[pricing].productid = $sql_tbl[products].productid AND $sql_tbl[products].productid='$id' $join WHERE 1 ".$login_condition.$p_membershipid_condition.$pric e_condition." GROUP BY $sql_tbl[products].productid");

The problem is that, the way X-Cart is set up, there is no way to join the customers table (where the provider information is also stored) to the products table (where the only reference to the provider is an auto-increment in column products.provider). X-Cart should have put providers in a separate table; then you could easily have a connection between providers and products without creating a many-to-many relationship. Will I have to create an association class/table to eliminate the many-to-many relationship?
__________________
X-Cart 4.4.4 on Unix
Add-ons: Power Filter by *********, BCSE Shipping Per Product.
Reply With Quote