mbb Posted October 6, 2009 Posted October 6, 2009 Hi Fimble, I was wondering if u could help me with a problem i am facing. Here is my problem, i have 3 categories * Towbars * Trailers * Accessories I want to be able to show a differnt product listing for each category, for example * Towbars table headings want to be:- part#, product name, year etc * Trailers headings want to be:- model, length, width, height etc * Accessories headings want to be:- product, description etc I have changed the index.php page and now it looks at ------------- <?php if ($cPath_array[0]==22){ include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING2);} if ($cPath_array[0]==21){ include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);} if ($cPath_array[0]==34){ include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING3);} ?> ------------- And created the product listing 2 and 3. so now each category is looking at each of the 3 files. But when i edit the product listing 2 and 3 pages i keep getting errors. for example on the trailers page i have removed the fields i didnt want, but it always wants to always display 10 columns Here are the links so u can see what i mean:- towbars ------ http://www.psb-towin...ath=21_25_32_30 trailers ----- http://www.psb-towin...php?cPath=22_26 accessories -- http://www.psb-towin...ex.php?cPath=34 any ideas of how to solve this problem? also is there any possibilty of making seperate tables in the database for the products in each category? and when inserting the new product from admin it only shows the input fields correct for the spefic category im in. Im using sts and oscommerce-2.2rc2a, dont know if this makes any difference Hope this made sense, am desperate for help. Thanks in advance Matthew
multimixer Posted October 6, 2009 Posted October 6, 2009 <?php if ($cPath_array[0]==22){ include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING2);} if ($cPath_array[0]==21){ include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);} if ($cPath_array[0]==34){ include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING3);} ?> and where is the } else { ? Read again the recent tip and trick and compare it to what you did PS sorry for jumping in into a private discussion :) My community profile | Template system for osCommerce - New: Responsive | Feedback channel
mbb Posted October 6, 2009 Author Posted October 6, 2009 i know i dont have the else but that dosnt make a differnce, i have 3 categories and the 3 if statements look at the the 3 categories therefor each category is catered for.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.