yubnub Posted July 25, 2010 Posted July 25, 2010 Hi, I am trying to create a "semi static" (forgive the wording) page for a couple of my manufacturers. The standard oscommerce manufactuer pages work fine for most of the manufactuers I deal with - however their are a couple of suppliers that we deal haviliy with so I want to create unique individual pages that have alot more information on and that really do the brands concerned justice. Creating the template of the new page is no problem - this I have done. On the new page I am going to hardcode text and images etc, however I would like the page to pull all the products of the given manufacturer and display them in the product listing module. Where I am struggling is the query code needed to "pull" just the products from a given manufacturer. I have had a good google and a play with the standard query code but all i can get it to do is display "no products" I would be most grateful for any help or pointers. Thanks in advance for any help, anthony
pick1e Posted August 22, 2010 Posted August 22, 2010 I am doing the same thing. I was looking for tips but I ended up just figuring it out on my own. Here is what I'm doing, maybe an expert can chime in and make sure this is OK (won't make things burst into flame). I hard coded the query: $listing_sql = "the query"; And hard coded the column list: $column_list = array('PRODUCT_LIST_MODEL', 'PRODUCT_LIST_NAME', 'PRODUCT_LIST_PRICE', 'PRODUCT_LIST_BUY_NOW'); Then called the function: <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> Is this how you're doing it? Also, I found that there is a function in there that is parsing table names out of the sql query string, I don't remember where exactly. The shorthand of the table names must be exact or it will mess up. For example I tried to use: $listing_sql = "select products.products_id, products_description.products_name from products inner join products_description on products.products_id = products_description.products_id"; instead of: $listing_sql = "select p.products_id, pd.products_name from products as p inner join products_description as pd on p.products_id = pd.products_id"; And without the shorthand it messed up. The shorthand had to match. Hope that helps, if you hadn't got it working already :) -------------------------------- Justin osC is awesome. Thanks everyone.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.