| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Random Manufacturers in Manufacturer menu box | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Random Manufacturers in Manufacturer menu box
Here's a quick mod to show random manufacturers in the Manufacturer menu box. Great for stores that have lots of manufacturers.
Open up modules/Manufacturers/customer_manufacturers.php Find this line: Code:
Change it to this: Code:
Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#2
|
|||||||
|
|||||||
Wow, I just happened to need that for our new X-Mall. Thanks Carrie!
- Mike
__________________
4.1.9 |
|||||||
#3
|
|||||||||
|
|||||||||
Glad I could help! Such a simple mod but would be very useful to many stores. Should be an option in the x-cart admin I think.
Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#4
|
|||||||
|
|||||||
An option, definitely! Manufactureres is a module, so a checkbox in module settings would suffice. I could see though that some stores still need to have control over their order, but it would be a nice way to get people to try different manufacturers, which often is a good result.
Thanks and we quite enjoy your X-mall feature... it adds a whole other dimension to using XC. - Mike
__________________
4.1.9 |
|||||||
#5
|
|||||||||
|
|||||||||
Glad you like the X-mall.
Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#6
|
|||||||
|
|||||||
Re: Random Manufacturers in Manufacturer menu box
Hello Carrie,
I am getting following mysql error I guess due to version change. Can you please post the code for version 4.1.7 ? INVALID SQL: 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SQL QUERY FAILURE:SELECT * FROM xcart_manufacturers USE INDEX (avail) WHERE avail = 'Y' ORDER BY RAND() LIMIT
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#7
|
|||||||
|
|||||||
Re: Random Manufacturers in Manufacturer menu box
I am using 4.1.8, and I have no matching code in my customer_manufactuers.php file.
Here is my file: ustomer_manufacturers.php,v 1.12.2.1 2007/03/22 13:54:54 svowl Exp $ # if ( !defined('XCART_START') ) { header("Location: ../"); die("Access denied"); } $manufacturers_menu = func_query_first_cell("SELECT COUNT(*) FROM $sql_tbl[manufacturers] USE INDEX (avail) WHERE avail = 'Y'"); if ($manufacturers_menu > 0) { if ($config["Manufacturers"]["manufacturers_limit"] > 0) $smarty->assign("show_other_manufacturers", $manufacturers_menu>$config["Manufacturers"]["manufacturers_limit"]); $manufacturers_menu = func_query("SELECT $sql_tbl[manufacturers].*, IF($sql_tbl[images_M].id IS NULL, '', 'Y') as is_image, $sql_tbl[images_M].image_path, IFNULL($sql_tbl[manufacturers_lng].manufacturer, $sql_tbl[manufacturers].manufacturer) as manufacturer, IFNULL($sql_tbl[manufacturers_lng].descr, $sql_tbl[manufacturers].descr) as descr FROM $sql_tbl[manufacturers] USE INDEX (avail) LEFT JOIN $sql_tbl[manufacturers_lng] ON $sql_tbl[manufacturers].manufacturerid = $sql_tbl[manufacturers_lng].manufacturerid AND $sql_tbl[manufacturers_lng].code = '$shop_language' LEFT JOIN $sql_tbl[images_M] ON $sql_tbl[manufacturers].manufacturerid = $sql_tbl[images_M].id WHERE $sql_tbl[manufacturers].avail = 'Y' ORDER BY $sql_tbl[manufacturers].orderby, $sql_tbl[manufacturers].manufacturer".(($config["Manufacturers"]["manufacturers_limit"] > 0) ? " LIMIT ".$config["Manufacturers"]["manufacturers_limit"] : "")); $smarty->assign("manufacturers_menu", $manufacturers_menu); } ?>
__________________
4.1.7 X-Cart Gold Product Configurator Module Advanced Order Management Module RMA Module Feature Compare Module Blue Dream theme by 7Dana.com |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Random Manufacturers in Manufacturer menu box
Try this.
Find the: $manufacturers_menu = func_query( line in the modules/Manufacturers/customer_manufacturers.php file. Then find this in that line: ORDER BY orderby and change it to: ORDER BY RAND() Let me know if that doesn't work. Should be all you need to do though. Thanks! Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#9
|
|||||||
|
|||||||
Re: Random Manufacturers in Manufacturer menu box
Sorry, no matches found.
The closest thing I could find is this: ORDER BY $sql_tbl[manufacturers].orderby,
__________________
4.1.7 X-Cart Gold Product Configurator Module Advanced Order Management Module RMA Module Feature Compare Module Blue Dream theme by 7Dana.com |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Random Manufacturers in Manufacturer menu box
^ That's the same match, replace it.
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|