=============================================================================== Search By Brand/Model/Year 2.0 http://www.cart-lab.com info@cart-lab.com X-cart version 3.5.x & 3.4.x compatible (C)opyright 2003-2004 CartLab, all rights reserved. Full license at: http://www.cart-lab.com/license.php =============================================================================== Associate Brand, Model, Year and Product type of each individual product. Great for those who use X-cart on Automobile or Bike sites. Drop down lists are generated distinctively by every available product brand, model, year & type associated. Product type is also an optional field that can help you sub-classify your products. 2.0 Includes multi-associating, all 3 new fields can be comma, deliminated to create multiple linking/associating. Also all available values are listed above search categories in 2 columns to allow for easy navigation of your brands, models, etc. Configurable in X-Cart admin: Display either products or categories of found products based on users search criteria. =============================================================================== INSTALLATION: Making a backup of your files is HIGHLY RECOMMENDED before Installing any modifications! 1) Open config.php of your X-Cart installation and add the following line towards the end of the file before the WARNING to leave white space: # # Cart-Lab.com Brand Model Year Mod. # include $xcart_dir."/".DIR_CUSTOMER."/brandmodelyear.php"; 2) Edit include/product_modify.php and find the line similar to the code snippet include/product_modify.php found in this archive and adjust accordingly. 3) Copy the files bmy_search.php and brandmodelyear.php to your customer/ directory. 4) Copy the files search_result.tpl & bmy_cats.tpl into your skin1/customer/main/ replacing the existing search_result.tpl file. 5) Edit skin1/main/product_modify.tpl and copy/paste this code snippet to your skin1/main/product_modify.tpl on your live site, paste it after the of the apply global discounts row. 6) Login to your admin area of x-cart, go to Patch/Upgrade and point the SQL file to the sql.sql file found in this archive, and apply it. 7) Copy and paste the skin1/search_dropdowns.tpl from this archive where you would like the select dropdown search fields to appear. 8) Edit include/func.php; find func_search_products function and replace it with the function defination found in func_search_products.php of this archive. =============================================================================== Also if you would like to add a "View All Brands" Menu above your categories follow these steps: 1) Edit skin1/customer/home.tpl of your x-cart install. Find: { include file="customer/categories.tpl" } Above this line add: { include file="customer/bmy_search.tpl" }
2) Now copy the file skin1/customer/bmy_search.tpl from this archive into your skin1/customer/ directory. =============================================================================== 3.4.x NOTES: If you are using 3.4.x of X-Cart edit bmy_search.php and uncomment the appropiate include/require statements commented in this file. =============================================================================== EXPORT / IMPORT NOTES: Your skin1 directory may differ. Also if you are wanting the ability to import your products into the new fields created with this mod. You will need to edit provider/import.php, provider/export.php and remove, brand and model from the $excluded_columns array for this ability. 1st Item below is what you'll need to find, 2nd item is what your changes should be to these two files to allow for importing of these fields. $excluded_columns = array("provider", "productid", "categoryid", "image_x", "image_y", "add_date", "rating", "sales_stats", "views_stats", "del_stats", "brand", "model"); $excluded_columns = array("provider", "productid", "categoryid", "image_x", "image_y", "add_date", "rating", "sales_stats", "views_stats", "del_stats"); =============================================================================== HOW TO USE: When modifying or adding new products use a , (comma) delimiter to create multiple links to other brands, models, etc. Example: Brand: Macromedia, Microsoft Model: Flash, PowerPoint, Word Start Year: 1999 End Year: 2002 Type: Program, Application Will generate Macromedia, and Microsoft Brand lists. Flash, PowerPoint and Word for Model. etc.